Commit 2d3d1c9
test(cli): hold
Fixes #17723
Clause-②: no
No `packages/spec` contract, no published schema and no declared API
shape moves here; the diff is one new test file under
`packages/cli/test/`, and both declarations it reads are imported rather
than changed.
## What the card asked for, and what this is not
The page is **correct today** — PR #17722 documented all eleven `os
lint` flags, all three scripts and the `--manifest-id` condition
accurately. This card is not "fix the page"; it is that **the next drift
has nothing to stop it**. So this PR changes no prose and adds an
instrument.
`content/docs/deployment/cli.mdx` states two enumerations whose sources
live in code, and nothing read either one. Three measured drifts, all
under-inclusive, all repaired by hand: #8965, #16892 item ① (the
scaffolded-scripts sentence said "these" of three commands and named two
npm scripts), and #16892 item ② (`os lint` declares eleven flags; the
page documented four — including `--include-platform`, which the command
names in its own hint).
## The two sources the page is now bound to, and that both are
machine-enumerable
| Page enumeration | Source it is held to | Machine-enumerable? |
|---|---|---|
| The `**Options.**` table under `#### os lint` (eleven flags + one
positional) | `Lint.flags` / `Lint.args` in
`packages/cli/src/commands/lint.ts`, **imported** | Yes — oclif object
literals, read as `Object.keys` of the imported class |
| The scaffolded-wiring callout (three `os init` templates, four
scaffolders, three npm scripts) | `TEMPLATES` in
`packages/cli/src/commands/init.ts` plus
`packages/create-objectstack/src/templates/blank/package.json`,
**imported / read** | Yes — a map whose keys are the template names, and
four script maps |
Neither source is transcribed and neither is parsed out of source text.
The script list is **derived**, not listed: it is the set of scripts
that every scaffolder declares **and** whose command line runs the
ObjectStack CLI. Today that is exactly `build`, `validate`, `lint` —
`typecheck` (`tsc --noEmit`) is declared by all four and is not
CLI-invoking; `dev`, `start` and `test` are CLI-invoking in some
scaffolders and not all. A fourth such script reddens the sentence that
omits it.
## Why a pin and not a generator
The standing repair order puts a check last, so generation (the card's
route A) was measured against what the table carries before being set
aside. The page's rows are **not** the declarations' `description`
strings: `--json` is declared "Output as JSON" and documented "Output as
JSON, for CI. The verdict fields are described below"; the
`--include-platform` row names the hint that sends a reader there;
`config` links to the auto-detection section of the same page.
Generation reaches the table's **membership** and none of that text, and
pushing the text into the declarations would put doc-site
cross-references into `--help`.
Membership is also exactly what drifted all three times — not one of the
three was a wrong description. So the residue generation cannot reach is
empty, and the membership it can reach is held here instead.
## Why a vitest pin and not a root `scripts/check-*.mjs`
Every sibling `check:` gate is invoked by its own step in
`.github/workflows/lint.yml`, and `.github/workflows/**` is out of scope
for this seat. The in-surface route is the one this repo already built
for exactly this coupling: `packages/cli` declares
`content/docs/deployment/cli.mdx` and
`packages/create-objectstack/src/templates/blank/package.json` as
cross-package test inputs (`scripts/cross-package-test-inputs.mjs`,
mirrored into `turbo.json`), `ci.yml`'s `crosspkg` filter carries
`content/**`, and the `test` job's `--union-into` step pulls the
declaring package back into the affected set. So a **docs-only** PR runs
this pin, which is the failure mode it exists for — and no workflow diff
is needed. Both paths were already declared; this PR adds none.
## What it does not cover, stated so the gate's own reason stays true
- The `--manifest-id` **condition** (#16892 item ③) and every statement
of the form "X applies when Y". A condition is not an enumeration; there
is no set to compare it with.
- The eight-line `os lint` example fence above the table — a sample, not
a claim of totality.
- Row **text**. Membership only, for the reason above.
- Any other page.
It also does not duplicate
`packages/cli/test/scaffold-ci-script-parity.test.ts`, which holds the
scaffolders to each other and to the workflow the on-ramp ships — the
source side, green through all three drifts, and unable to see a
sentence. Nor does it extend `scripts/check-cli-examples-parity.mjs`:
`os lint` declares no `examples`, and a flag need not appear in any
example, so that gate is structurally blind to a missing flag.
## Firing controls and the red/green ablation
Every comparison here can pass by reading nothing, so each parser is
asserted non-empty before it is asserted equal, the governed-command
roster carries a floor (`lint`), and an `**Options.**` table for a
command the file does not bind is itself a failure — a new table cannot
arrive unheld.
Four mutations of `content/docs/deployment/cli.mdx`, each reproducing a
shape the card measured. Every mutation was proven on disk by a `grep -o
| wc -l` delta **and** a blob-hash change before its reading was taken;
every restore was proven by `git hash-object` equal to the `HEAD` blob
plus an empty `git diff HEAD`, never by an exit code.
`HEAD` blob for the page: `9a34d83634a7a401b96c1260812ba3cd91febf66`
| Ablation | On-disk proof | Pin exit | Case that fired |
|---|---|---|---|
| (green, unmutated) | — | **0** — 13 passed | — |
| A · delete the `--include-platform` row (#16892 ② shape) |
`--include-platform` 3 to 1; blob to `8e857878` | **1** — 1 failed, 12
passed | `os lint` documents exactly the flags and positionals it
declares |
| B · drop `npm run lint` from the callout (#16892 ① shape) | `npm run
lint` 1 to 0; blob to `597e12c9` | **1** — 1 failed, 12 passed | names
exactly the CLI scripts every scaffolder declares |
| C · drop the `empty` template from the list (#16350 shape) |
backticked `empty` 3 to 2; blob to `ef8ffca2` | **1** — 1 failed, 12
passed | names exactly the `os init` templates that exist |
| D · add an `**Options.**` table under `os info`, unbound |
`**Options.**` 1 to 2; blob to `977644ae` | **1** — 1 failed, 12 passed
| no command documents an options table this pin does not bind |
| (green again, restored) | blob back to
`9a34d83634a7a401b96c1260812ba3cd91febf66` | **0** — 13 passed | — |
The mutations are a one-time proof; no mutated bytes and no ablation
harness are in this diff.
## Acceptance notes
- `--generator`'s documented row and its declared `description` both say
"Requires `--eval`", and the runtime enforces it (#15550). Noted while
reading, unchanged, and out of scope here.
- The `**Options.**` shape exists on exactly one section of this
2109-line page today. The pin's roster refusal is what makes the second
one arrive held rather than unheld.
## Second commit: the declaration the pin's own header forced
`check:cross-package-test-inputs` reads a test's source for quoted paths
without parsing, so the pin's header naming
`scripts/check-cli-examples-parity.mjs` made that path an undeclared
cross-package input for `@objectstack/cli` — the gate went red on it.
Settled the way the four `check-nul-bytes.mjs`-shaped entries above it
in the roster are settled, and for the reason that roster records:
declaring one rarely touched file is cheaper than rewording prose to
dodge a scanner, and over-collection can only widen a re-run radius,
never narrow one. Mirrored into `turbo.json`'s `@objectstack/cli#test`
inputs, as every declared glob must be.
The alternative — rewording the header so the scanner cannot see the
path — would have made the gate's own stated reason vaguer to satisfy a
scanner, which is the direction this repo refuses.
## Verification
All readings at `3492199df`, working tree clean. Exit codes captured to
disk before any pipe.
**Gate sweep.** `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived **68** commands (up from 50 before
the `turbo.json` / roster edits — a new declaration widens the derived
set, which is correct). All 68 exit **0**. Reconciled: `dispatch-gates
--ran` reports *"68 derived famil(ies) accounted for — 68 run, 0
NOT-MEASURED (a DERIVED zero — all 68 recorded an exit code and none of
them is 3)"*.
Two were red on the first sweep and both were fixed, not excused:
- `check:cross-package-test-inputs` exit **1** — the undeclared path
above. Green after the second commit.
- `check:dual-build-cjs-loads` exit **3** — `PREREQUISITE NOT MET`, no
`dist/` on 12 packages. Not a failure and not a pass: `pnpm build` (73
tasks, 0 failed), then the **whole** sweep re-run.
**Build.** `pnpm --filter '@objectstack/cli^...' build` exit 0
(dependency closure), then `pnpm build --concurrency=2` exit 0 — 73
successful, 73 total.
**Tests.** `pnpm --filter @objectstack/cli exec vitest run --project
unit --maxWorkers=2` — **207 files / 2971 tests passed**. The
`integration` tier is declared to CI: nothing in this diff touches a
spawn entry, `test/helpers/serve-process.ts` or a driver/kernel boot
path, and the new file carries none of the tier predicate's signals, so
it lands in `unit` (`test/vitest-tiers-partition.test.ts` is inside that
green run and would red if it landed in both tiers or neither).
**Typecheck.** `pnpm --filter @objectstack/cli typecheck` exit 0 — `tsc
--noEmit` plus `check:test-typecheck` (*"@objectstack/cli's test layer
compiles under packages/cli/tsconfig.test.json"*, debt ledger unmoved at
3 files / 28 errors / 6 pinned signatures).
**Lint.** `eslint . --no-inline-config --format json` was run over the
**whole repo**, not narrowed: **6754 files linted, 0 errors, 0
warnings**, exit 0. The file count is read from eslint's own JSON
output, and the population is eslint's own config resolution rather than
a path list of mine.
**changeset: `skip-changeset`**, measured rather than asserted.
`packages/cli`'s publish surface is `files: ["dist", "README.md",
"CHANGELOG.md"]`. After `pnpm --filter @objectstack/cli build`, grepping
those three paths: `SCAFFOLDED_EVERYWHERE` 0 hits,
`docs-cli-enumeration-parity` 0 hits, `GOVERNED_FLOOR` 0 hits — against
a positive control from the same paths, `include-platform` 33 hits and
`eval-min` 6 hits. `scripts/` and `turbo.json` are root files in no
package's `files[]`. Nothing published moves. Label applied and read
back: `size/m`, `tests`, `skip-changeset`.
---
_Generated by [Claude
Code](https://claude.ai/code/session_017ef78bLdybu3AffehKkhfk)_
---
_Generated by [Claude Code](https://claude.ai/code)_
---------
Co-authored-by: Claude <noreply@anthropic.com>content/docs/deployment/cli.mdx's two enumerations to their declarations (#18206)1 parent ea0b24a commit 2d3d1c9
3 files changed
Lines changed: 347 additions & 0 deletions
File tree
- packages/cli/test
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
507 | 517 | | |
508 | 518 | | |
509 | 519 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
0 commit comments