test(cli): read what SHIPS for the retired os create example, and read roster rows - #16965
Conversation
…ead roster rows `create-example-retired-docs-parity` pinned the retirement across four `content/docs` pages and could not see `packages/cli/README.md` — the carrier that actually ships, named verbatim by this package's own `files: ["dist", "README.md", "CHANGELOG.md"]`. Adding the README to the existing map was measured and does not work: on a clean tree it fails only the `os create plugin` FENCE control, and with the retired command written into the README's roster TABLE ROW it fails that same one test and no other. Both retirement assertions passed over a README that was carrying the retired command, so widening the population alone would have made the suite CLAIM a carrier it does not read. The reader is therefore widened as well: an OFFER is a fenced line or a markdown table row, applied to both populations. `content/docs/deployment/cli.mdx` was measured to carry four `os create` table rows of its own, so fence-only reading left the same blind spot on a page already claimed as guarded. The shipped population is derived from `files` rather than restated, with a tripwire on its non-markdown entries. The reader stops short of running prose, and `CHANGELOG.md` — which ships and records `os create example` in two historical entries — pins that boundary. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015QE8qk46e5CHJxyQEUjbf8
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
PM review — accepted, armingCI. 37 raw check-run rows, all terminal, 0 red. Four names are duplicated across two workflow batches ( Clause-② — exit 0, and the earlier exit 4 was my fault, not this PR's. The first ⭐ Point 1 is the finding, and it inverted the expected answer. Triage promoted the card's Triage's point 4, verified by me from the file rather than the body.
That structurally answers the 清单会漂 objection triage used to rule out option B. Scope, verified: exactly one file changed. The Docs drift. The tool's zero is definitional — its own summary says ⭐ Ruling on the open question you raised rather than decided silently — option A, keep one block. The harness reminder prescribes a What I accept on your measurement rather than re-running: the The declared non-claim is the right shape too. An inline Marking ready for review, then arming auto-merge, in that order. Generated by Claude Code |
Fixes #16690
What this changes
packages/cli/test/create-example-retired-docs-parity.test.tspinned theos create exampleretirement across fourcontent/docspages.packages/cli/README.mdwas not in that population, and it is the carrier that actually ships: this package's own declaration names it —files: ["dist", "README.md", "CHANGELOG.md"]— so it goes out in every tarball as the npm front page.Triage (
5578450647) ruled option A, with the card's warning promoted from a footnote to step 1. That step was run first, and it came out against a plain addition.Point 1 — falsifiability FIRST. The reading: A is a REWRITE, not an addition
Measured by putting the README into the existing
DOC_SITESmap and changing nothing else, then running the suite twice.1 failed / 15 passed— the failing test isREADME.md still documents os create (control)os create examplewritten into the README roster TABLE ROW1 failed / 15 passed— the failing test isREADME.md still documents os create (control)The two failure signatures are identical. In run 2 both retirement assertions passed over a README that was carrying the retired command in its command roster. The fence reader cannot see a table cell; the only red came from the
os create pluginFENCE control, because the README shows that command in prose and in a table and never in a fence.⇒ A plain addition would have made the suite claim a carrier it does not read, and its red would have said nothing about the retirement. An author would have silenced it by adding a fenced
os create pluginto the README, and landed a fully green suite that had just been shown a retired roster row. That is exactly the outcome triage called worse than today's honest gap. So the READER is rewritten, not only the population — and this PR's scope is stated as a rewrite.Point 2 — the card's bidirectional control, used verbatim as acceptance
Every leg mutates a real file on disk, proves the mutation landed (anchor count before/after plus a blob hash that differs from the HEAD blob), runs the pin, then restores under a trap and proves the restore (
git diff HEADempty and blob equal to the HEAD blob).os create examplewas writtencontent/docs/deployment/cli.mdxpackages/cli/README.mdThe before-fix difference between A and B is the card, and it reproduced — so the premise was live, not stale. After the fix both are red, and leg B's red is the retirement assertion itself (
README.md offers nothing to COPY that now refuses), not a control.Point 3 — negative control
The README's existing legitimate
os create TYPE [name]roster row and itsos create pluginprose mention (the angle-bracket spelling is written here with a placeholder word on purpose, so the body sanitizer cannot eat it) both still pass: the suite is 19 passed / 19 on a clean tree.RETIREDis still derived fromRETIRED_TEMPLATESrather than written twice, so only the retired spelling reddens and the README stays editable.Point 4 — the population is DERIVED from
files, never restatedSHIPPED_MARKDOWNis read out ofpackages/cli/package.json'sfilesarray at test time.packages/cli/package.jsonwas read and never edited (it is held by #15334). The only hand-written line is a tripwire on the entries that are not markdown —disttoday, measured to ship 0.mdfiles out of 500 — so a newly shipped prose carrier fails the suite until someone re-derives the population instead of widening a list.Point 5 — the card's NOT MEASURED line, now measured as a READING only
⛔ Nothing outside
packages/cliis changed here. Swept across the repo: 70 packages declare markdown infiles; exactly 1 shipped markdown file carriesos create example, and it ispackages/cli/CHANGELOG.md's historical record (see below). Positive control for the same sweep: only 2 shipped markdown files carryos createat all, both inpackages/cli. So the class still has no second instance, and there is nothing to fix elsewhere.A second blind spot the same reader closed
While measuring,
content/docs/deployment/cli.mdx— a page the suite already claimed to guard — was found to carry 4os createtable rows of its own. A retired command written into one of them was measured green under the old fence-only reader (13 passed) and is red under the new one. The widened reader is therefore applied to both populations rather than to the README alone; leaving the four pages on a fence-only reader would have kept the identical hole on the half already claimed as covered.What is NOT covered — stated so the suite is not read as claiming it
An inline
os create examplewritten into README running prose is invisible here. Closing that needs a rule separating an offer from a mention inside prose, andpackages/cli/CHANGELOG.mdis the proof that the rule is not simply "it is in backticks": the changelog ships too, and it recordsos create examplein two historical entries. A changelog's job is to record that a command existed and was retired, so reddening on it would demand rewriting shipped history to keep a gate green. A boundary test pins that line so the next author who widens the reader sees which one they are about to cross.Tests
All commands run on the delivered tree; the gate/eslint numbers below are from the final commit
4b1f7356e3.pnpm --filter @objectstack/cli exec vitest run --project unit— 189 files / 2624 tests passed.packages/cliowes only theunittier locally; the diff touches no spawn entry point and no integration-tier file, sointegrationis declared to CI.pnpm --filter @objectstack/cli typecheck— exit 0 (tsc --noEmitpluscheck:test-typecheck, debt ledger held).pnpm --filter '@objectstack/cli^...' build— exit 0 (dependency closure).scripts/pm/dispatch-gates.mjsfrom the merge base and reconciled with--ran: 45 derived, 45 run, 0 UNRUN. All green exceptcheck:dual-build-cjs-loads, which exits 3 withRun pnpm build first. This is NOT a pass: nothing was measured— it needs a whole-repo build, so it is NOT MEASURED here and declared to CI, not reported as a pass.eslint . --no-inline-configover the repo — 6384 files, 0 errors, 0 warnings, exit 0. Run whole rather than narrowed, so no narrowing claim is needed.scripts/docs-audit/affected-docs.mjs --jsonreturns 0, but that zero is definitional — its own summary says1 test file(s) excluded — tests cannot make an implementation doc stale. Hand-sweptcontent/instead: 0 pages name this pin or its population, with a live positive control on the same sweep (os create pluginmatches 5 pages,os initmatches 6).Changeset
skip-changeset, measured rather than assumed. The diff is one file underpackages/cli/test/, whichfilesdoes not ship. The package was built and every shipped byte searched (dist= 500 files, plusREADME.mdandCHANGELOG.md): the symbols this PR introduces —offeredLines,SHIPPED_MARKDOWN,tableRows,offersRetired— match 0 shipped files, while the positive control proving the search fires matches (RETIRED_TEMPLATES= 2 shipped files,os create= 7). Nothing published moves.验收备注
分诊 (
5578450647) 的五条验收口径,逐条对应上文:os create TYPE [name]与os create plugin修复后仍然通过,干净树 19/19 全绿。packages/cli/package.json的files为准 — 在「Point 4」。⛔ 没有手写第二份出货清单;package.json只读未改(chore: version packages #15334 持有)。范围外发现,记录不立卡:
content/docs/deployment/cli.mdx的四条os create表格行 —— 不是范围外,同一个 pin、同一条性质,已在本 PR 内一并覆盖并附前后读数。Clause-②: no
加宽一个测试 pin 的读取总体与读取形状,只会让闸门更严:⛔ 没有放宽任何已接受集合,⛔ 没有撤回任何已发布能力,⛔ 没有迁移存量数据形状。以上从已交付的 diff(一个
packages/cli/test/文件,177 增 15 删)重新推导,不是从卡面内容。Generated by Claude Code