Skip to content

docs(deployment): name the two service-mode variables for the marketplace publish - #1790

Merged
huangyiirene merged 1 commit into
mainfrom
claude/issue-1784-cloud-login-site-audit
Sep 8, 2026
Merged

huangyiirene merged 1 commit into
mainfrom
claude/issue-1784-cloud-login-site-audit

Conversation

@huangyiirene

Copy link
Copy Markdown
Collaborator

Fixes #1784

An audit, not a find-and-replace. Every occurrence of objectstack cloud login was followed to the command it actually leads to before any verdict was reached. One of eleven was wrong.

The two flows, measured

flow credential source is cloud login right?
pnpm publish:marketplace → scripts/publish-marketplace.mjs OS_CLOUD_URL + OS_CLOUD_API_KEY from process.env, and nowhere else ⛔ no
objectstack package publish (the CLI) ~/.objectstack/cloud.json, or OS_CLOUD_API_KEY / OS_TOKEN as a bearer ✅ yes

Script, re-measured at this commit rather than inherited: readFileSync 0 · homedir 0 · cloud login 0 · cloud.json 0 · OS_TOKEN 0, against a control of process.env 5. It opens no credential file of any kind.

CLI, measured on this repo's pinned @objectstack/cli@17.3.0: dist/commands/package/publish.js:31 imports tryReadCloudConfig from utils/cloud-config.js, which resolves join(homedir(), '.objectstack', 'cloud.json') — the login step really does feed this path. Its --token flag is env-bound to OS_CLOUD_API_KEY and --org to OS_ORG_ID, so both auth modes the marketplace guides document are real.

Per-site verdict — 11 occurrences across 8 files

# site the instruction leads to verdict
1 README.md:106 objectstack package publish — step 3 of the same block ✅ correct — untouched
2 docs/DEPLOYMENT.md:62 pnpm publish:marketplace — line 64 of the same block ⛔ wrong — corrected here
3 content/docs/marketplace/fork-hotcrm.mdx:112 objectstack package publish — §7, same block ✅ correct — untouched
4 content/docs/marketplace/fork-hotcrm.zh-Hans.mdx:112 same, read in its own register ✅ correct — untouched
5 content/docs/marketplace/fork-hotcrm.zh-Hant.mdx:112 same, read in its own register ✅ correct — untouched
6 content/docs/marketplace/publishing-your-first-app.mdx:20 objectstack package publish — §4 ✅ correct — untouched
7 …publishing-your-first-app.zh-Hans.mdx:20 same, read in its own register ✅ correct — untouched
8 …publishing-your-first-app.zh-Hant.mdx:20 same, read in its own register ✅ correct — untouched
9 content/docs/marketplace/publishing-your-first-app.mdx:164 401 troubleshooting for the CLI publish; names both real modes ✅ correct — untouched
10 …publishing-your-first-app.zh-Hans.mdx:164 same, read in its own register ✅ correct — untouched
11 …publishing-your-first-app.zh-Hant.mdx:164 same, read in its own register ✅ correct — untouched

Two further hits are excluded as non-instructions: docs/RELEASE_STRATEGY.md:84 (already the corrected ⛔ warning) and two lines inside .changeset/release-strategy-publish-auth-is-service-mode.md (prose describing that correction).

⭐ The prior that content/docs/marketplace/** is right held, and is now measured rather than assumed — those six pages never invoke pnpm publish:marketplace at all. Nothing in that tree moved, so the three-locale rule was never engaged.

⚠️ Roster re-derived, and it differs. The card carried "10 further occurrences" as the previous dev's count. Searching the tree myself gives 11 command-string occurrences in 8 files. The extra one is the 401 Unauthorized line at :164, present in all three locales — those are three occurrences, not a family of one. This is my reading, recorded rather than reconciled; it changes no verdict, since all three are correct.

The correction

docs/DEPLOYMENT.md §Marketplace Deployment prescribed objectstack cloud login → pnpm build → pnpm publish:marketplace — the identical defect that PR #1783 corrected in docs/RELEASE_STRATEGY.md, sitting in a second file that points at the same script. Following that shape, the section now:

  • names OS_CLOUD_URL and OS_CLOUD_API_KEY in the same fenced block as the publish command, so the block is copy-paste complete;
  • marks the dry-run as the credential-free one (the asymmetry is real: DRY_RUN short-circuits the credential check);
  • keeps cloud login only as a ⛔ warning, and says which path it is right for — deleting the string would have traded a stale instruction for a differently-wrong one;
  • links RELEASE_STRATEGY.md §Marketplace Publish as the single source of truth rather than restating it, matching how CONTRIBUTING.md cross-links it.

⛔ No guard was added or proposed. ⛔ scripts/publish-marketplace.mjs was not touched — the script is not wrong. ⛔ content/docs/releases/ untouched.

Gates

pnpm verify — exit 0, captured before any pipe (> /tmp/verify.log 2>&1; EXIT=$?), full chain at 3b7d83a1:

validate && typecheck && lint && lint:i18n-gate && hygiene && hygiene:tokens && build && test

  • Test Files 164 passed (164) · Tests 3439 passed | 1 skipped (3440)
  • ✓ source token ratchet clean

line_budget: NOT APPLICABLE, per the gate's own scope line — Source token ratchet — authored surface: src/**/*.ts minus src/translations, src/data. This diff is .md only and never enters that surface.

link-check.yml scans .md exact, so docs/DEPLOYMENT.md is genuinely read by it — the new relative link RELEASE_STRATEGY.md (a sibling inside docs/) is in its scope. Its green would say nothing about the eight .mdx pages, but none of those moved.

files_changed: docs/DEPLOYMENT.md · .changeset/deployment-marketplace-publish-auth-is-service-mode.md (empty frontmatter — the sanctioned "releases nothing" declaration changeset-check.yml documents, preferred over the label as committed evidence).

Refs, none closing here: the audit was framed by #1782 and PR #1783; CONTRIBUTING.md cross-linking came from PR #1780; the roster-short-by-one-tree shape is #1460 / #1467 / #1676 / #1729.


🤖 Generated with Claude Code

https://claude.ai/code/session_01PpRjGNnwyo2J1rrmekxB1W


Generated by Claude Code

…lace publish

§Marketplace Deployment told a maintainer to run `objectstack cloud login`, then
`pnpm build`, then `pnpm publish:marketplace`. Step 1 writes nothing step 3 reads.

Re-measured on `scripts/publish-marketplace.mjs`: `readFileSync` 0, `homedir` 0,
`cloud login` 0, `cloud.json` 0, `OS_TOKEN` 0, against a control of `process.env` 5
— it opens no credential file of any kind, so no login step could supply what it
wants. The section now names `OS_CLOUD_URL` and `OS_CLOUD_API_KEY` in the same
fenced block as the publish command, marks the dry-run as the credential-free one,
and links `RELEASE_STRATEGY.md` as the single source of truth.

The `cloud login` line is kept only as a warning rather than deleted: measured on
the pinned `@objectstack/cli@17.3.0`, `dist/commands/package/publish.js` imports
`tryReadCloudConfig` from `utils/cloud-config.js`, which resolves
`join(homedir(), '.objectstack', 'cloud.json')` — so the command is exactly right
for the CLI publish path, and naming which path it belongs to is the inoculation.

The other ten occurrences of the string were each followed to the command they
lead to, all of which is `objectstack package publish`, and are left untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PpRjGNnwyo2J1rrmekxB1W
@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
hotcrm Ignored Ignored Sep 8, 2026 1:43pm UTC

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audit the 10 remaining objectstack cloud login sites against the script each one leads to — correct only the wrong ones

2 participants