Uh oh!
There was an error while loading. Please reload this page.
fix(cli): name the entity an environment in every string the os environments family prints - #12429
Conversation
…ronments` family prints ADR-0006's v5.0 rename `project` -> `environment` has no aliases, and AGENTS.md states "Project now only means the npm/monorepo sense". #10967 (PR #11227) renamed the COMMAND across these same five files; the ENTITY NOUN inside the strings oclif prints was left behind, so `os environments switch <id>` answered `Active project: ...`. 25 user-visible string literals swap to the post-rename noun: 5 `static override description`, 7 flag/arg descriptions, 9 success-path console lines, 3 `examples` arg placeholders (`<project-id>` -> `<environment-id>`) and the `switch` id-not-found error. No behaviour, flag/argument names, exit codes or `--format json`/`yaml` payloads change. `client.projects.*`, the `res.project`/`res.projects` response fields, the locals bound from them and the docblock comments are deliberately untouched: they are API surface in other packages, not CLI wording. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UjujZN219uFzBhSYfMykCd
📓 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 81ab036f6040a68afd58834e3e526f689206e65d && git checkout 81ab036f6040a68afd58834e3e526f689206e65d
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 7b2f94133af3c142f62df5637f8d0a1cdf6cdab5 14d22a44ba1c9b5f5f21408b234d7f7b229e039c && git checkout -B drift-repro 7b2f94133af3c142f62df5637f8d0a1cdf6cdab5 && git merge --no-ff 14d22a44ba1c9b5f5f21408b234d7f7b229e039c
node scripts/docs-audit/affected-docs.mjs --json 7b2f94133af3c142f62df5637f8d0a1cdf6cdab5
|
Uh oh!
There was an error while loading. Please reload this page.
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.
Fixes#12153
Per ADR-0006 the v5.0 rename
project→environmenthas no aliases, and AGENTS.md states "Project now only means the npm/monorepo sense". #10967 (PR #11227) renamed the command across these same five files; the entity noun inside the strings oclif prints was left behind, soos environments switchanswered✓ Active project: ….Re-census on current
origin/main— the card's 21 is a clue, and it is off in three waysEverything below was measured at
b000ab59b, not reconciled with the card's list.static override descriptiondescriptionC is not the same nine. The card lists
switch.ts:62/63as two sites. Line 63 isconsole.log(` id: ${project.id}`)— it printsid: <uuid>, which carries no entity noun; the wordprojectthere is the local variable, and this PR leaves it alone. In its place the card missesbind.ts:114,printKV('Project', args.environmentId, '🎯')— a printed key label on the bind success path. Net count coincides at 9; one member in, one member out.D — four sites in the same defect class that no card section covers:
bind.ts:27/28/29— thestatic override examplesarg placeholder<project-id>→<environment-id>(3). This is--helpoutput carrying the entity noun; it is not the command-name rename ruling ① fences off, which is theos projects …→os environments …half and was already done. The canonical spelling is not a judgment call here:content/docs/deployment/cli.mdx:1528already writesos environments bind <environment-id>, and the argument is namedenvironmentId.switch.ts:50—throw new Error(`Project ${args.id} not found`), the id-not-found message. User-visible, same noun; outside C only because C is defined as the success path.All four are in the claimed file surface, mechanically determined, hold no competing claim, and add no verification surface. They are named here rather than swept in silently.
Section C was not contested — the triage caveat is falsified by measurement
Triage's caveat was that
environments.test.tsmay pin the console wording, so C might be a judgment call between the pin and the string. It does not, and it is not. Two findings:packages/cli/test/environments.test.ts. The file ispackages/cli/src/commands/environments/environments.test.ts— co-located, i.e. inside the claimed directory, but not the claimed path.os projectsin examples, class names, and docstrings — leaks into live--helpoutput #10967 pin: everyexamplesentry must name a command id this CLI actually registers, derived from file paths with oclif's own algorithm.grep -i projectover it returns 7 lines: 5 in the header prose about the mechanism, andpreFixat 334/336/337 — a pre-fix fixture asserted to be rejected. Not one line asserts the noun in any printed string.Repo-wide, no test pins any section-C literal. Instrument proof, since a zero-hit grep is not a reading on its own: the same
--include='*.test.ts'grep that returns zero for every C literal returnspackages/cli/src/commands/datasource/envelope-unwrap.test.ts:166fortoContain('✓ …')— so it does reach console-output assertions in CLI tests.packages/cli/test/commands.test.ts,remote-api-commands.test.ts,collect-docs.test.tsandinvocation.test.tsreturn zero for bothenvironmentsandproject(each verified non-empty by a positive control ondescribe().preFixatenvironments.test.ts:334keeps its<project-id>deliberately: it is the historical pre-fix line, and its whole job is to be the string that no longer resolves.environments.test.tsis untouched — the pinned wording that ruling ③ would have licensed editing it does not exist.The card's other assertion, verified
The card asserts #10967's command-name rename is complete. It is:
grep -rn 'os projects' packages/cli/src/matches exactly two test files (auth-config.test.ts,environments.test.ts), and in both it is a negative assertion or prose about one. Positive control on the same instrument, and deliberately not a substring of the term under test:os environments bindreturns 5 hits.What is deliberately NOT renamed
client.projects.*(the@objectstack/clientSDK method names), theres.project/res.projectsresponse fields, the locals bound directly from them (const projects = res?.projects ?? [],const project = lookup?.project), and the docblock comments in these five files. Ruling ② fences them as API surface in other packages; a fullgrep -i projectover the five files after this change returns only members of those four groups — no user-visible string remains.The five
static override descriptionstrings now read ascontent/docs/deployment/cli.mdx:1505-1509has described them since the rename, so shipped--helpand shipped docs agree for the first time. No doc quotes the console output these commands print, so section C stales nothing.Verification — all at the final commit
14d22a44bGate families re-derived in this worktree with
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack(not taken from the dispatch order), then run at14d22a44b. Quoted verdicts are each gate's own printed line, never a bare$?.Under the shared verify lock, parts joined with
&&so the verdict covers all of them —os-verify-lock: VERDICT command-exit 0 · held the lock 121s:pnpm lint— full-repoeslint . --no-inline-config, clean, no narrowing claimedpnpm check:i18n—check-i18n-bundles: OK (9 package(s) — all bundles in sync, no undeclared authoring keys).pnpm check:i18n-coverage—check-i18n-coverage: OK (12 config(s), 657 baselined untranslated string(s), none new).pnpm --filter @objectstack/cli typecheck— cleanos projectsin examples, class names, and docstrings — leaks into live--helpoutput #10967 pin —Test Files 1 passed (1) / Tests 73 passed (73)Green on their own exit codes, captured before any pipe:
check:nul-bytes·check:cross-package-test-inputs·check:page-declaration-shape·check:published-files·check:slot-lookup·check:test-source-alias·check:type-source-resolution·check-ci-filter-parity·check-comment-mask-adoption·check-cross-package-test-inputs·check-plugin-teardown-shape·check-affected-docs·check-drift-comment·check:changeset-gate-self-tests·check:objectui-changeset·check-adr-0087-registration(this PR adds no declared-breaking changeset) ·check-changeset-no-major·check-empty-changeset.One gate needed its prerequisite satisfied before it was a measurement rather than a NOT-MEASURED:
check:i18n-coveragefirst returnedCOULD NOT MEASURE — 1 of 12 config(s) failed to lintbecauseexamples/app-showcase's connector dependencies had no build output in a fresh worktree. Building that closure turned it into the real green above; the failure was environmental and unrelated to this diff.@objectstack/cliwas built with its full dependency closure before any of this was read, so no verdict here is a judgment about a staledist/.Generated by Claude Code