Skip to content

Commit ce14581

Browse files
os-trumpclaude
andauthored
cli: fix two stale os … invocations, and declare the two deliberate ones in place (#12177)
* docs(cli): fix two stale `os …` invocations, docblock the two deliberate 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(cli): word the two notes so they do not plant new unresolved spans 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 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent c68c670 commit ce14581

4 files changed

Lines changed: 19 additions & 2 deletions

File tree

packages/cli/src/commands/environments/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default class EnvironmentsCreate extends Command {
3636
// the `blank`/`crm`/`todo` registry it named died with the `apps/server`
3737
// templates route. Removed in #3731: an accepted-and-dropped flag reports
3838
// success for work that never happened. Starter content is installed from
39-
// the App Marketplace instead (`os packages install`, `sys_package` with
39+
// the App Marketplace instead (`os package install`, `sys_package` with
4040
// `is_starter = true`).
4141
artifact: Flags.string({
4242
description: 'Path to a locally-compiled objectstack.json artifact to bind into this project',

packages/cli/src/commands/package/publish.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
* way to publish. (The legacy direct-to-environment `os publish` / `os
1717
* rollback` commands, which wrote sys_environment_revision, have been
1818
* removed.)
19+
*
20+
* NOTE — `os publish` and `os rollback` above are RETIRED ids, named here on
21+
* purpose: the sentence is *about* their removal, and neither resolves today.
22+
* Measured against the built oclif `Config`: the registered `publish` ids are
23+
* `package publish` and `plugin publish`, and no `rollback` id exists at all.
24+
* A sweep over the documented CLI invocations in this package will flag both
25+
* of them as unresolved — leave them. Re-spelling either to a live id would make the
26+
* sentence false, and deleting the sentence would drop accurate history.
1927
*/
2028

2129
import { readFile } from 'node:fs/promises';

packages/cli/src/utils/api-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface ApiClientOptions {
1717
token?: string;
1818
/**
1919
* Explicit project id. Overrides the stored `activeEnvironmentId` from
20-
* `~/.objectstack/credentials.json` (written by `os projects switch`).
20+
* `~/.objectstack/credentials.json` (written by `os environments switch`).
2121
*/
2222
environmentId?: string;
2323
/**

packages/cli/src/utils/response-envelope.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@
2323
* drifts three times, and the three commands are how a human learns the server
2424
* disagrees with them.
2525
*
26+
* (`datasource` is a TOPIC, not a runnable command id: the three subcommands
27+
* are `datasource introspect`, `datasource list-tables` and `datasource
28+
* validate` — verified against the built oclif `Config`, where `datasource`
29+
* appears among the topics and not among the commands. The prose above names
30+
* the topic, and naming it is correct; a sweep over the documented CLI
31+
* invocations in this package flags `os datasource` as unresolved, and that
32+
* flag is a false positive — do not rewrite the sentence around one
33+
* subcommand, which would say something narrower and untrue.)
34+
*
2635
* ## Why an unreadable body is an ERROR here, never an empty payload
2736
*
2837
* That is the same defect generalised. The severe half was never the crash on

0 commit comments

Comments
 (0)