Skip to content

fix(cli): rename project -> environment in comment prose (environments/**, api-client.ts) - #12479

Merged
os-litant merged 1 commit into
mainfrom
claude/issue-12432-environments-docblock-noun
Aug 26, 2026
Merged

fix(cli): rename project -> environment in comment prose (environments/**, api-client.ts)#12479
os-litant merged 1 commit into
mainfrom
claude/issue-12432-environments-docblock-noun

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Fixes#12432

What

Comment-axis-only follow-up to the v5.0 project -> environment rename (ADR-0006). PR #12429 (#12153) already rewrote every user-visible string in these five CLI files; this PR updates the docblock/inline-comment prose in the same files so the comments agree with what the code now prints and returns.

Files (exactly the six named by the card)

  • packages/cli/src/commands/environments/list.ts
  • packages/cli/src/commands/environments/bind.ts
  • packages/cli/src/commands/environments/create.ts
  • packages/cli/src/commands/environments/show.ts
  • packages/cli/src/commands/environments/switch.ts
  • packages/cli/src/utils/api-client.ts

Re-census on current origin/main (do not trust the card's counts — both #12432's own body and the PM's claim comment say so explicitly)

Full-file grep for project (case-insensitive, whole word, every line — not a phrase literal, so a wrapped docblock line does not hide anything) across the six files, then each hit classified by hand as comment / identifier / API-surface:

Changed (12 comment-prose sites — one more than the card's "13 docblocks + api-client.ts:19 = 14", see note below):

FileLineBeforeAfter
list.ts9list projects visible to...list environments visible to...
bind.ts13multi-environment server project.multi-environment server environment.
bind.ts17next per-project kernelnext per-environment kernel
create.ts10provision a new project.provision a new environment.
create.ts13activates the new project foractivates the new environment for
create.ts67leave a half-bound project.leave a half-bound environment.
show.ts9single project.single environment.
show.ts11Renders the project rowRenders the environment row
switch.ts9set the active project forset the active environment for
switch.ts15target this\n * project.target this\n * environment.
api-client.ts19Explicit project id.Explicit environment id.
api-client.ts55// Resolve active project id// Resolve active environment id

api-client.ts:19 is the site the card called out as sharpest (docblock said "project id" for a field literally named environmentId) — confirmed present exactly as described, now fixed.

Not changed (deliberately, per the card's own fences):

Reverse-check (proving the grep instrument can say no and isn't fooled by project being a substring of projects): post-edit, grep -inE 'project' <files> still returns exactly the API-surface/identifier lines above and nothing from the changed list — confirmed by hand, see report.

Verification

  • pnpm --filter '@objectstack/cli^...' build — dependency closure, clean.
  • pnpm --filter @objectstack/cli build — clean.
  • pnpm --filter @objectstack/cli typecheck — clean.
  • pnpm --filter @objectstack/cli exec vitest run --maxWorkers=2 src/commands/environments/environments.test.ts — 73/73 passed.
  • git diff --stat — 6 files changed, 12 insertions(+), 12 deletions(-); confirmed the diff contains only the 12 comment edits above (no string literal, no identifier touched).
  • Gate families re-derived from node scripts/pm/dispatch-gates.mjs against the actual changed paths (not trusted from the dispatch prompt) — all matched families run and green at final HEAD ea04b744c, details in the report comment.

Zero behaviour change, zero string-literal change.

Generated by Claude Code


Generated by Claude Code

Comment-axis-only follow-up to the v5.0 project->environment rename
(ADR-0006). PR #12429 (#12153) already renamed every user-visible
string in these five command files; this sweep updates the docblock
and inline-comment prose that still called the entity a "project",
so the comments agree with what the code now prints.
Scope, held exactly:
- packages/cli/src/commands/environments/{list,bind,create,show,switch}.ts
- packages/cli/src/utils/api-client.ts
Not touched (ruling #2/#3, tracked separately at #12473):
- client.projects.* SDK method names
- res.project / res.projects response fields and locals bound from
them (e.g. `const p = res?.project`, `const project = lookup?.project`)
- the ProjectProvisioningService.provisionProject and
client.projects.get(id) identifier references quoted in comments
Zero behaviour change, zero string-literal change.
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/cli, touching 8 documentable anchor(s).

1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/deployment/cli.mdx(via os environments bind (command), os environments create (command), os environments list (command), os environments show (command), os environments switch (command))

1 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v17.mdx(via os environments create (command))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • the SDK route bridge reached 47 of 219 client-bound route-ledger rows — the other 172 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 172: 14 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 56 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 102 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 23 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 27b69027279f6e8cb65a6602e67bdb47178b3dc5packageMentionDocs.

Which tree this was computed on

This run read content/docs from 669b74f968839816d0cae57edf41743e5795f62b — the merge of head ea04b744c0a7b190101134ba2a47841a87f3d0c2 into base 27b69027279f6e8cb65a6602e67bdb47178b3dc5, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 669b74f968839816d0cae57edf41743e5795f62b && git checkout 669b74f968839816d0cae57edf41743e5795f62b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 27b69027279f6e8cb65a6602e67bdb47178b3dc5 ea04b744c0a7b190101134ba2a47841a87f3d0c2 && git checkout -B drift-repro 27b69027279f6e8cb65a6602e67bdb47178b3dc5 && git merge --no-ff ea04b744c0a7b190101134ba2a47841a87f3d0c2
node scripts/docs-audit/affected-docs.mjs --json 27b69027279f6e8cb65a6602e67bdb47178b3dc5

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 27b69027279f6e8cb65a6602e67bdb47178b3dc5 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@os-litantos-litant added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Aug 26, 2026 — with Claude
@os-litant
os-litant marked this pull request as ready for review August 26, 2026 05:55
@os-litant
os-litant added this pull request to the merge queueAug 26, 2026
Merged via the queue into main with commit 76c18beAug 26, 2026
37 checks passed
@os-litant
os-litant deleted the claude/issue-12432-environments-docblock-noun branch August 26, 2026 06:16
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants

@os-litant@claude