Uh oh!
There was an error while loading. Please reload this page.
fix(cli): rename project -> environment in comment prose (environments/**, api-client.ts) - #12479
Conversation
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.
📓 Docs Drift CheckThis PR changes 1 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 23 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # 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
|
Uh oh!
There was an error while loading. Please reload this page.
Fixes#12432
What
Comment-axis-only follow-up to the v5.0
project->environmentrename (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.tspackages/cli/src/commands/environments/bind.tspackages/cli/src/commands/environments/create.tspackages/cli/src/commands/environments/show.tspackages/cli/src/commands/environments/switch.tspackages/cli/src/utils/api-client.tsRe-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):
list projects visible to...list environments visible to...multi-environment server project.multi-environment server environment.next per-project kernelnext per-environment kernelprovision a new project.provision a new environment.activates the new project foractivates the new environment forleave a half-bound project.leave a half-bound environment.single project.single environment.Renders the project rowRenders the environment rowset the active project forset the active environment fortarget this\n * project.target this\n * environment.Explicit project id.Explicit environment id.// Resolve active project id// Resolve active environment idapi-client.ts:19is the site the card called out as sharpest (docblock said "project id" for a field literally namedenvironmentId) — confirmed present exactly as described, now fixed.Not changed (deliberately, per the card's own fences):
create.ts:12andshow.ts:12quote real identifiers —ProjectProvisioningService.provisionProject(confirmed live elsewhere:packages/runtime/src/system-environment-plugin.ts,packages/client/src/index.ts:1815) andclient.projects.get(id). These are identifier references, not prose — renaming a fragment of a real quoted name would misdescribe actual code. The card's naive "13 docblock sites" count included both as rawprojectgrep hits without this classification; excluding them plus adding the newly-foundapi-client.ts:55(a bare//comment the card's JSDoc-shaped census missed) nets to the same 12 inenvironments/**+api-client.ts.client.projects.*SDK calls,res.project/res.projectsresponse fields, and every local bound directly from them (const p = res?.project,const project = lookup?.project,current.project.metadata, etc.) — untouched, identifiers unrenamed, per ruling ✨ Set up Copilot instructions #2/Implement ObjectStack protocol specification with Zod schemas and TypeScript interfaces #3. That axis now has its own card, [decision] Does the v5.0project→environmentrename extend to the API surface —client.projects.*and theres.project/res.projectsresponse fields? #12473.Reverse-check (proving the grep instrument can say no and isn't fooled by
projectbeing a substring ofprojects): 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).node scripts/pm/dispatch-gates.mjsagainst the actual changed paths (not trusted from the dispatch prompt) — all matched families run and green at final HEADea04b744c, details in the report comment.Zero behaviour change, zero string-literal change.
Generated by Claude Code
Generated by Claude Code