Uh oh!
There was an error while loading. Please reload this page.
cli: fix two stale os … invocations, and declare the two deliberate ones in place - #12177
Conversation
…ate ones `os projects switch` (utils/api-client.ts) and `os packages install` (commands/environments/create.ts) name ids the CLI does not register: `projects` became `environments` in v5.0 with no aliases (ADR-0006), and the package topic is singular. Both corrected against the ids read from the built oclif `Config`. The other two documented invocations in this package that do not resolve are correct prose, not defects, so they are annotated rather than changed: `os publish` / `os rollback` in commands/package/publish.ts name commands that were deliberately removed, and `os datasource` in utils/response-envelope.ts names a real topic whose three subcommands are the runnable ids. Each now says so in place, so a future reader — or a future sweep author — does not "fix" accurate prose. Comment text only; no command id, flag, or behaviour changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HbG3rGVLjZStHQxHDtzJdJ
📓 Docs Drift CheckThis PR changes 1 package(s): 9 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 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 7b7c2214d3dc33e138e6220e66be35b9501cb793 && git checkout 7b7c2214d3dc33e138e6220e66be35b9501cb793
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 2c4c59ed20caf4f6cde3c979ae9205ee69e04256 479f5c4e1b64778d48c7b0f1fd0d687c06ae9918 && git checkout -B drift-repro 2c4c59ed20caf4f6cde3c979ae9205ee69e04256 && git merge --no-ff 479f5c4e1b64778d48c7b0f1fd0d687c06ae9918
node scripts/docs-audit/affected-docs.mjs --json 2c4c59ed20caf4f6cde3c979ae9205ee69e04256
|
Re-running the sweep this card measures showed the notes had added three sweep hits of their own: each contained a literal backticked `os …` span, which the sweep reads as an invocation that resolves to nothing. A note whose purpose is to keep a future sweep honest should not inflate that sweep's own numbers, so both now describe the sweep without spelling a placeholder invocation. The retired ids they deliberately name are unchanged. Measured after: 583 invocations across 109 non-test sources, 5 unresolved — the two genuinely stale ones are gone, and every remaining hit is one of the retired/topic names these two notes exist to declare. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HbG3rGVLjZStHQxHDtzJdJ
Uh oh!
There was an error while loading. Please reload this page.
Fixes#11465
Triage ruled option A on that card (fix the two stale invocations, docblock the two true negatives, no gate over the class), and this implements exactly that. Comment text only: 4 files, +19/-2, and every changed line is inside a comment —
git diff -U0against the recorded base, filtered to lines that are not*///comment lines, returns nothing.The id set was re-measured, not transcribed
The card's spellings were treated as leads.
packages/cliand its 58-package dependency closure were built, then the ids were read from the built oclifConfig(topicSeparator=" ", so canonical:ids convert to the user-typed form):environments switchis the live idproject— noprojectstopic, no aliaspackage installis the live idpackagesos publish/os rollbackare retiredpublishids arepackage publishandplugin publish, and there is norollbackid at alldatasourceis a topic, not a runnable iddatasource introspect/list-tables/validateAll four line offsets on the card also still hold at the base this branch was cut from (
a11c1a57): api-client.ts:20, create.ts:39, publish.ts:16, response-envelope.ts:14.The four sites
Fixed — genuinely stale:
src/utils/api-client.ts:20—os projects switch→os environments switch. Confirmed accurate beyond the spelling:src/commands/environments/switch.ts:58is what persistsactiveEnvironmentIdinto~/.objectstack/credentials.json.src/commands/environments/create.ts:39—os packages install→os package install(a plural typo, never a rename).Declared in place — the prose is correct and had to survive:
src/commands/package/publish.ts— the sentence is aboutos publish/os rollbackbeing removed. The sentence is untouched; a note underneath states that these are retired ids named on purpose, gives the measurement that says so, and tells the next reader (and any future sweep author) that re-spelling them would make the sentence false while deleting it would drop accurate history.src/utils/response-envelope.ts— a note states thatdatasourceis a topic rather than a runnable id, names the three subcommands, and marks a sweep hit onos datasourceas a false positive so nobody narrows the sentence to one subcommand.The card's own sweep, re-run on this branch
Re-running the sweep the card describes (ids from the built
Config; backticked and quotedos …spans in the non-test sources undersrc/**):Both genuinely stale invocations are gone. Every remaining unresolved hit is a retired-or-topic name inside the two files annotated above — the ones the notes exist to declare.
That measurement also caught something in the first draft of those notes: each had spelled a literal
`os …`placeholder, which the sweep reads as one more invocation resolving to nothing. A note written to keep a future sweep honest should not inflate that sweep's numbers, so the second commit rewords both to describe the sweep without spelling a placeholder invocation (7 unresolved → 5). The retired ids they deliberately name are unchanged.Verification, at
6fe142cepnpm --filter @objectstack/cli exec vitest run --maxWorkers=2over the 6 test files that read the touched modules —src/utils/response-envelope.test.ts,src/commands/environments/environments.test.ts,test/remote-api-utils.test.ts,test/package-publish-error-envelope.test.ts,test/package-publish-namespace.test.ts,test/commands.test.ts→Test Files 6 passed (6),Tests 127 passed (127);pnpm --filter @objectstack/cli typecheck(tsc --noEmit) green.packages/clisuite (178 test files, several booting real kernels) does not fit this container's ~10-minute foreground cap while the shared verify lock is contended — one attempt acquired the lock and was SIGTERMed mid-run at the cap. The narrowing is declared rather than silent; CI runs the full farm regardless.os projects switch1→0 andos environments switch0→1 in api-client.ts;os packages install1→0 andos package install0→1 in create.ts; both original sentences still present at sites 3 and 4, each now with its note.node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack(12 families) pluscheck:nul-bytes— all 13 green at this head, each exit code captured before any pipe.pnpm lintfull-repo, not narrowed:eslint . --no-inline-config→ exit 0, no findings.check:i18n-coveragereported its ownCOULD NOT MEASUREbecause three connectors the showcase config imports had no build output in this worktree. After building them it readsOK (12 config(s), 657 baselined untranslated string(s), none new). Same cause for aserve-capability-identity.test.tsfailure seen mid-run, green onceconnector-mcpwas built.#10967pin is not cited as evidence here: it readsstatic override examplesvia the TypeScript AST undersrc/commands/**only, so it cannot see any of these four sites.Fence honoured
src/utils/response-envelope.tsalso carries the blocked card #10938 (retiring the flatfail()accommodation inreadErrorMessage). That function is untouched — it appears in no diff hunk — and #10938 remains open and blocked on its own dependency. Retiring that branch early would restore the defect that #10763 closed on the most common failure path, and the CLI suite would stay green through it.skip-changesetDocumentation text inside source comments: no command id, flag, description string, or behaviour changes, and nothing here reaches a released artifact's behaviour or
--helpoutput. There is nothing for release notes to say, so this PR declares no release of its own.Out of scope, filed
#12153 — the
os environmentscommand family's own--helptext and console output still call the entity a "project" (21 user-visible string literals across the same five files). Deduped against #10967, which corrected the command name in examples/JSDoc/class names but not the entity noun indescriptionstrings. Unlabelled, no assignee. Not addressed in this PR.Generated by Claude Code