Skip to content

test(cli): read what SHIPS for the retired os create example, and read roster rows - #16965

Merged
os-project-manager merged 1 commit into
mainfrom
claude/issue-16690-create-example-pin-population
Sep 8, 2026
Merged

test(cli): read what SHIPS for the retired os create example, and read roster rows#16965
os-project-manager merged 1 commit into
mainfrom
claude/issue-16690-create-example-pin-population

Conversation

@claude

@claude claude Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Fixes #16690

What this changes

packages/cli/test/create-example-retired-docs-parity.test.ts pinned the os create example retirement across four content/docs pages. packages/cli/README.md was 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_SITES map and changing nothing else, then running the suite twice.

Run Tree Result
1 naive addition, README clean 1 failed / 15 passed — the failing test is README.md still documents os create (control)
2 naive addition plus os create example written into the README roster TABLE ROW 1 failed / 15 passed — the failing test is README.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 plugin FENCE 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 plugin to 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 HEAD empty and blob equal to the HEAD blob).

Leg Where os create example was written Before this PR After this PR
A a fence on content/docs/deployment/cli.mdx RED (1 failed / 12 passed) RED (1 failed / 18 passed)
B the roster TABLE ROW in packages/cli/README.md GREEN (13 passed) RED (1 failed / 18 passed)

The 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 its os create plugin prose 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. RETIRED is still derived from RETIRED_TEMPLATES rather than written twice, so only the retired spelling reddens and the README stays editable.

Point 4 — the population is DERIVED from files, never restated

SHIPPED_MARKDOWN is read out of packages/cli/package.json's files array at test time. packages/cli/package.json was read and never edited (it is held by #15334). The only hand-written line is a tripwire on the entries that are not markdown — dist today, measured to ship 0 .md files 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/cli is changed here. Swept across the repo: 70 packages declare markdown in files; exactly 1 shipped markdown file carries os create example, and it is packages/cli/CHANGELOG.md's historical record (see below). Positive control for the same sweep: only 2 shipped markdown files carry os create at all, both in packages/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 4 os create table 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 example written into README running prose is invisible here. Closing that needs a rule separating an offer from a mention inside prose, and packages/cli/CHANGELOG.md is the proof that the rule is not simply "it is in backticks": the changelog ships too, and it records os create example in 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 unit189 files / 2624 tests passed. packages/cli owes only the unit tier locally; the diff touches no spawn entry point and no integration-tier file, so integration is declared to CI.
  • pnpm --filter @objectstack/cli typecheck — exit 0 (tsc --noEmit plus check:test-typecheck, debt ledger held).
  • pnpm --filter '@objectstack/cli^...' build — exit 0 (dependency closure).
  • Gate families derived with scripts/pm/dispatch-gates.mjs from the merge base and reconciled with --ran: 45 derived, 45 run, 0 UNRUN. All green except check:dual-build-cjs-loads, which exits 3 with Run 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-config over the repo — 6384 files, 0 errors, 0 warnings, exit 0. Run whole rather than narrowed, so no narrowing claim is needed.
  • Docs drift: scripts/docs-audit/affected-docs.mjs --json returns 0, but that zero is definitional — its own summary says 1 test file(s) excluded — tests cannot make an implementation doc stale. Hand-swept content/ instead: 0 pages name this pin or its population, with a live positive control on the same sweep (os create plugin matches 5 pages, os init matches 6).

Changeset

skip-changeset, measured rather than assumed. The diff is one file under packages/cli/test/, which files does not ship. The package was built and every shipped byte searched (dist = 500 files, plus README.md and CHANGELOG.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) 的五条验收口径,逐条对应上文:

  1. 先做可失败性验证,再做加入 — 读数在「Point 1」,方向是不能发火:现有检测逻辑对表格单元不发火,⇒ A 是一次重写,不是一次加入,本 PR 范围已照此声明。
  2. 卡面的双向对照原样作为验收 — 在「Point 2」。修复前四页之一 RED / README GREEN(卡还活着),修复后两边都 RED,且 README 那一红是退役断言本身而非对照。
  3. 阴性对照 — 在「Point 3」。README 现有的合法 os create TYPE [name]os create plugin 修复后仍然通过,干净树 19/19 全绿。
  4. 总体口径以 packages/cli/package.jsonfiles 为准 — 在「Point 4」。⛔ 没有手写第二份出货清单;package.json 只读未改(chore: version packages #15334 持有)。
  5. ⛔ 不顺手扩张到别的包 — 在「Point 5」,只作为读数写下,⛔ 没有在本 PR 里修别的包。

范围外发现,记录不立卡:

  • content/docs/deployment/cli.mdx 的四条 os create 表格行 —— 不是范围外,同一个 pin、同一条性质,已在本 PR 内一并覆盖并附前后读数。
  • README 散文里的行内代码不被覆盖 —— 这是本次声明的非主张(见上),不是缺陷:CHANGELOG 的历史记录证明「在反引号里」不足以作为判据。承接者:无(需要先有一条能区分 offer 与 mention 的规则才谈得上)。

Clause-②: no

加宽一个测试 pin 的读取总体与读取形状,只会让闸门更严:⛔ 没有放宽任何已接受集合,⛔ 没有撤回任何已发布能力,⛔ 没有迁移存量数据形状。以上从已交付的 diff(一个 packages/cli/test/ 文件,177 增 15 删)重新推导,不是从卡面内容。


Generated by Claude Code

…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
@github-actions github-actions Bot added the size/m label Sep 8, 2026
@claude claude Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing 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
  • 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 — 0 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 22c0279fc83224831581c0c83e0dd9e5fa82d5ddpackageMentionDocs.

Copy link
Copy Markdown
Collaborator

PM review — accepted, arming

CI. 37 raw check-run rows, all terminal, 0 red. Four names are duplicated across two workflow batches (Check PR Size, Auto Label, Check Changeset, Packed-tarball smoke (opt-in)), so the latest-per-name collapse is 37 → 33; raw would have double-counted.

Clause-② — exit 0, and the earlier exit 4 was my fault, not this PR's. The first --pair 16965 run returned exit 4, NOT clause-② legible, because the Claim: comment I posted on #16690 carried no Clause-②: line. The PR's own declaration was correct throughout. I repaired my claim (5591401396) and re-ran: exit 0, both carriers agree, no widening tell. ⭐ The omission was systematic — both claims I wrote today dropped the line while growing longer about holder maps — so #16677's claim was corrected the same way before its PR opened.

⭐ Point 1 is the finding, and it inverted the expected answer. Triage promoted the card's ⚠️ from a footnote to step 1, and running it came out against a plain addition: with the README merely added to DOC_SITES, the failure signature is identical whether the README is clean or carries os create example in a roster table row — 1 failed / 15 passed both times, and the single red is the os create plugin fence control. Both retirement assertions passed over a README that was carrying the retired command. A plain addition would have shipped a suite that claims a carrier it cannot read, and an author would have silenced its unrelated red by adding a fence — landing fully green over a retired roster row. That is precisely the outcome triage called worse than today's honest gap. Delivering A as a rewrite, and saying so in the scope, is the correct reading of the ruling rather than a deviation from it.

Triage's point 4, verified by me from the file rather than the body. SHIPPED is literally JSON.parse(readFileSync(CLI_PACKAGE_JSON, 'utf8')).filesderived, not a second hand-written shipping list — and SHIPPED_MARKDOWN filters it. packages/cli/package.json appears nowhere in the diff, so #15334's hold is intact. Two guards make this durable rather than merely correct today:

  • an anti-vacuity control: SHIPPED_MARKDOWN.length must exceed 0, with the message re-derive the population, do not delete these tests — so an empty harvest cannot pass silently;
  • a tripwire: the non-markdown entries must equal exactly ['dist'], commented ⛔ NOT a second shipping list, so a newly shipped prose carrier reddens until someone re-derives.

That structurally answers the 清单会漂 objection triage used to rule out option B.

Scope, verified: exactly one file changed. The content/docs/deployment/cli.mdx widening is not scope creep — it is the same pin, the same property and the same file, and the reader is shared; a retired command in one of that page's four os create table rows measured GREEN under the old fence-only reader and RED under the new one. Leaving those four pages on a fence-only reader would have preserved the identical hole on the half the suite already claimed to cover.

Docs drift. The tool's zero is definitional — its own summary says 1 test file(s) excluded — tests cannot make an implementation doc stale — so it is correctly not read as a clean bill. The hand sweep of content/ carries live positive controls (os create plugin → 5 pages, os init → 6). The bot's diffBase equals the PR base, so there is no base-mismatch delta to measure on this one.

⭐ Ruling on the open question you raised rather than decided silently — option A, keep one block. The harness reminder prescribes a Generated with [Claude Code] block plus a bare session URL; AGENTS.md prescribes exactly one single-line session-URL footer. Ship A, as delivered. Reasons, in order: AGENTS.md is the repo's binding source of truth for artifacts committed to it; the two forms together were measured to store three stacked blocks, so "do both" is not a safe compromise but an actively wrong outcome; and the delivered footer already carries the session URL, which is the attribution the harness rule exists to secure. ⭐ Flagging it instead of choosing quietly was the right call — a convention conflict resolved silently is invisible the next time it recurs. If the maintainer prefers the other form, that is a one-line AGENTS.md change, not a per-PR judgement.

What I accept on your measurement rather than re-running: the skip-changeset, whose controls are the right ones (RETIRED_TEMPLATES → 2 shipped files, os create → 7, against 0 for every symbol this PR introduces), and triage's point 5 read as a reading only — 70 packages declare markdown in files, exactly 1 shipped markdown file carries os create example (this package's own CHANGELOG, a historical record), positive control 2 shipped files carrying os create at all. ⛔ Nothing outside packages/cli was touched, correctly.

The declared non-claim is the right shape too. An inline os create example in README running prose stays uncovered, and the boundary test pins that line. packages/cli/CHANGELOG.md is the proof the rule cannot simply be "it is in backticks" — a changelog's job is to record that a command existed and was retired, and reddening on it would demand rewriting shipped history to keep a gate green.

Marking ready for review, then arming auto-merge, in that order.


Generated by Claude Code

@os-project-manager
os-project-manager marked this pull request as ready for review September 8, 2026 20:49
@os-project-manager
os-project-manager added this pull request to the merge queue Sep 8, 2026
Merged via the queue into main with commit 53d55de Sep 8, 2026
39 checks passed
@os-project-manager
os-project-manager deleted the claude/issue-16690-create-example-pin-population branch September 8, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

2 participants