Skip to content

fix(cli): name the entity an environment in every string the os environments family prints - #12429

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

fix(cli): name the entity an environment in every string the os environments family prints#12429
os-litant merged 1 commit into
mainfrom
claude/issue-12153-environments-entity-noun

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Fixes#12153

Per ADR-0006 the v5.0 rename projectenvironment 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 answered ✓ Active project: ….

Re-census on current origin/main — the card's 21 is a clue, and it is off in three ways

Everything below was measured at b000ab59b, not reconciled with the card's list.

sectioncardmeasuredagreement
Astatic override description55exact, same line numbers
B flag / arg description77exact, same line numbers
C success-path console output99same count, membership differs by one in each direction
D same class, in no card section4absent from the card entirely
total2125

C is not the same nine. The card lists switch.ts:62/63 as two sites. Line 63 is console.log(` id: ${project.id}`) — it prints id: <uuid>, which carries no entity noun; the word project there 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 — the static override examples arg placeholder <project-id><environment-id> (3). This is --help output carrying the entity noun; it is not the command-name rename ruling ① fences off, which is the os projects …os environments … half and was already done. The canonical spelling is not a judgment call here: content/docs/deployment/cli.mdx:1528 already writes os environments bind <environment-id>, and the argument is named environmentId.
  • switch.ts:50throw 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.ts may 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:

  1. The test is not where the card and the claim say it is. There is no packages/cli/test/environments.test.ts. The file is packages/cli/src/commands/environments/environments.test.ts — co-located, i.e. inside the claimed directory, but not the claimed path.
  2. It pins command ids, not vocabulary. It is the packages/cli: environments/*.ts command source still names os projects in examples, class names, and docstrings — leaks into live --help output #10967 pin: every examples entry must name a command id this CLI actually registers, derived from file paths with oclif's own algorithm. grep -i project over it returns 7 lines: 5 in the header prose about the mechanism, and preFix at 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 returns packages/cli/src/commands/datasource/envelope-unwrap.test.ts:166 for toContain('✓ …') — so it does reach console-output assertions in CLI tests. packages/cli/test/commands.test.ts, remote-api-commands.test.ts, collect-docs.test.ts and invocation.test.ts return zero for both environments and project (each verified non-empty by a positive control on describe().

preFix at environments.test.ts:334 keeps 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.ts is 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 bind returns 5 hits.

What is deliberately NOT renamed

client.projects.* (the @objectstack/client SDK method names), the res.project / res.projects response 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 full grep -i project over the five files after this change returns only members of those four groups — no user-visible string remains.

The five static override description strings now read as content/docs/deployment/cli.mdx:1505-1509 has described them since the rename, so shipped --help and 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 14d22a44b

Gate 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 at 14d22a44b. 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:

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-coverage first returned COULD NOT MEASURE — 1 of 12 config(s) failed to lint because examples/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/cli was built with its full dependency closure before any of this was read, so no verdict here is a judgment about a stale dist/.


Generated by Claude Code

…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
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/cli, touching 10 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
  • 3 name(s) were too generic to anchor anything (single lowercase words)
  • 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 7b2f94133af3c142f62df5637f8d0a1cdf6cdab5packageMentionDocs.

Which tree this was computed on

This run read content/docs from 81ab036f6040a68afd58834e3e526f689206e65d — the merge of head 14d22a44ba1c9b5f5f21408b234d7f7b229e039c into base 7b2f94133af3c142f62df5637f8d0a1cdf6cdab5, 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 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

⚠️ 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 7b2f94133af3c142f62df5637f8d0a1cdf6cdab5 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation tooling labels Aug 26, 2026
@os-litant
os-litant marked this pull request as ready for review August 26, 2026 02:46
@os-litant
os-litant added this pull request to the merge queueAug 26, 2026
Merged via the queue into main with commit 7fa3851Aug 26, 2026
34 checks passed
@os-litant
os-litant deleted the claude/issue-12153-environments-entity-noun branch August 26, 2026 03:10
os-litant pushed a commit that referenced this pull request Aug 26, 2026
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.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/stooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

packages/cli: the os environments family's own --help text and console output still call the entity a "project" (21 sites, v5.0 rename has no aliases)

2 participants

@os-litant@claude