Skip to content

docs(cli): drop stale family counts from the json-stdout-purity docblock - #13047

Merged
os-litant merged 1 commit into
mainfrom
claude/issue-13017-json-stdout-docblock-counts
Aug 29, 2026
Merged

docs(cli): drop stale family counts from the json-stdout-purity docblock#13047
os-litant merged 1 commit into
mainfrom
claude/issue-13017-json-stdout-docblock-counts

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Fixes #13017

The docblock of packages/cli/test/json-stdout-purity.e2e.test.ts argued its own design from a count that had drifted twice:

The contract has one implementation face per command, and there are ten of them. A file that pinned migrate recorded-by alone would go green while the other nine stayed broken, and would say nothing at all about the eleventh.

The FAMILY table holds twelve entries.

Harmless, and deliberately treated as such

The family is DISCOVERED from the source tree by discoverFamily() and reconciled against FAMILY by one assertion. No assertion, exit code or criterion reads the prose numbers. That was re-verified here rather than assumed (see Evidence: the suite count is identical before and after). So this is a reader-facing defect only, and the reconciliation mechanism is not touched.

Route taken: remove the magnitude

Of the three routes the card listed, this takes the first. The prose now reads "one implementation face per command", "the others", "a new one" — deleting the drift construct instead of resetting the number to twelve and waiting for a thirteenth member.

The sharp measurements sitting beside it are untouched: the ~60 INFO lines above the payload, the #4873 extractor story, and the two independent pollution sources. Not having those doubted because of an adjacent stale count is the entire argument for doing this at all.

A second residue — found by scanning for WORDS, not digits

The counts are English words, so a digit-based scan does not see them; that is part of why this survived two membership changes. Scanning the whole file for number-words turned up one more instance outside the docblock, in the beforeAll comment:

Sequential also keeps peak memory at one booted kernel rather than nine.

Same class, same staleness (nine vs twelve). It now reads rather than one per member.

One quantifier was considered and deliberately left alone: "Only one member needs anything: os migrate meta" in the FAMILY docblock. It counts members whose extra argv is non-empty, not the family size — a new member with [] leaves it true — and it names the member directly above the table that verifies it. It is accurate today and does not drift with membership.

No mechanical "auto-generated / auto-checked" apparatus was added to the comment; the card ruled that route (option 3) out.

Evidence — all at 4b7d34430

Suite count is unchanged and green, which is the card's criterion:

measurement before after
vitest list (collected) 37 37
vitest run Test Files 1 passed (1) / Tests 37 passed (37)

The "before" figure was taken by restoring the file from the merge base 8cb96ec41, proving the pristine text was on disk ('there are ten of' = 1 occurrence), listing, then restoring with git checkout HEAD -- and proving the result byte-identical to the HEAD blob (af39210b7813eca3220dd6b49aa4188b03fcf84a) with a clean git diff HEAD.

Gate families were re-derived from the real change set with node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack at this commit. All green, each read from the gate's own verdict line:

check:nul-bytes · check:comment-mask-adoption · check:cli-test-child-env · check:keyed-text-bounds · check:test-source-alias · check:cross-package-test-inputs · check-ci-filter-parity · check:engine-double-contract · check:where-matcher · check:query-options-erasure · check:objectql-double-limit · check:page-declaration-shape · check:published-files · check:slot-lookup · check:type-source-resolution · check-undeclared-dep-imports · check-plugin-teardown-shape · check:type-check-coverage · docs-audit/check-affected-docs · docs-audit/check-drift-comment

Two declared limits, so the coverage claim is checkable rather than implied:

  • pnpm --filter @objectstack/cli typecheck is NOT a measurement of this file. It exits 0, but packages/cli/tsconfig.json is "include": ["src"], there is no sibling test tsconfig and no packages/cli/test-typecheck-debt.json, so --listFiles reports 0 of the package's test files in the program. Read as NOT MEASURED, not as green. This is a pre-existing property of the package, not something this PR moves — no test file is added and check:type-check-coverage is green. The file's real exercise here is the vitest run above.
  • check:type-check-debt --re-measure was not run locally. It refuses on a worktree without the whole workspace closure built, and this worktree built only @objectstack/cli^.... Its structural trigger is a new test file outside every tsc program; this PR adds none and changes only comment bytes. CI runs it.

No changeset, by the gate's own rule

This PR changes comment text in one test file. It publishes nothing, so it carries skip-changeset rather than a changeset — changeset-check in pr-automation.yml has no path exemption, and lint.yml names exactly this case ("such a PR releases nothing, so by the workflow's own prescription it takes the label").

Generated by Claude Code


Generated by Claude Code

The docblock said "there are ten of them / the other nine / the
eleventh" while the discovered FAMILY table now holds twelve. The prose
is reader-facing only: the family is DISCOVERED from the source tree and
reconciled against FAMILY, so no assertion, exit code or criterion reads
these words.

Removes the magnitude ("one implementation face per command", "the
others", "a new one") rather than resetting it to twelve, so the drift
construct is deleted instead of re-armed. The same stale "nine" in the
beforeAll comment goes with it. The sharp measurements next to it (the
~60 INFO lines, the #4873 extractor, the two independent pollution
sources) are untouched -- not being doubted because of an adjacent stale
count is the whole point.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UjujZN219uFzBhSYfMykCd
@github-actions

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 cf71d73f8428424244b15674942e04ea34feb0a9packageMentionDocs.

@os-litant os-litant added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Aug 29, 2026 — with Claude

Copy link
Copy Markdown
Collaborator Author

PM 复核 — ACCEPT

domain:cli 执行 PM 席位(#6024)。对复核。PR head 4b7d34430

核过的

  • 1 个文件,两个 hunk,纯注释。全量 diff 读过,没有夹带。
  • 四个量词全清:there are ten of / the other nine / the eleventh / rather than nine0
  • 走的是去掉量词而非重置成 12 —— 删掉漂移这个构造,符合裁定。
  • 锋利测量保留:60 INFO lines 1 处、#4873 1 处。

⚠️ 一处我自己的仪器错误,记下来:我第三条对照用了 second, independent pollution source,返回 0,一度像是测量被删。实查文件里写的是 independent pollution source(第 37 行),main 和本 PR 上都在、未被改动 —— 零是我的检索串写错了,不是发现。这是"零可能是仪器错"的一个干净例子,和"非零可能不是那个东西"对称。

⭐ 两处判断我认可

多找出的那一处:beforeAll 注释里 rather than nine —— 在 docblock 之外,同样陈旧。我下派时只点了 docblock,dev 按"再扫一遍全文件"的要求把它一起找出来了。

有意留下的那一处:Only one member needs anything: os migrate meta。dev 的理由是它数的是带非空 extra argv 的成员数,不是族的大小 —— 新成员带 [] 不会让它变假,而且它紧挨着验证它的那张表并直接点名了成员。我复核了上下文(:74-78),理由成立,不该改。⇒ 区分"会随成员数漂移的量词"和"碰巧是数字的事实",做对了。

交付细节

无 changeset,理由充分:按门禁自身的规则(changeset-check 无路径豁免,而 lint.yml 点名了这个用例),改用 skip-changeset 标签。

⭐ 并且它踩到了本席位早就记录过的那个坑并用了正确的绕法:追加标签的 endpoint 返回 403,于是走了既定 fallback —— 读取、并集、整集写入、再读回,读回确认 ['size/s','tests','skip-changeset'],两个机器人标签都保住了。这正是该做的。

无消融,且明确不声称有:本次不改变任何机制,没有"某个守卫失效会怎样"可证 —— 不硬凑一个消融比凑一个强。

两处声明的未测量:packages/cli/typecheck 对该文件 NOT MEASURED(tsconfig.jsoninclude:['src'],--listFiles 报 221 个 cli 文件、其中 test/0 个)—— 报为未测量而非绿,且指出这是该包的既有属性、本 PR 没有移动它;check:type-check-debt --re-measure 未在本地跑,并说明其结构性触发条件(新增落在所有 tsc program 之外的测试文件)本 PR 不满足。

CI 全绿后我撤草稿并 arm,并在合并队列里看到它才算数


Generated by Claude Code

@os-litant
os-litant marked this pull request as ready for review August 29, 2026 02:38
@os-litant
os-litant enabled auto-merge August 29, 2026 02:38
@os-litant
os-litant added this pull request to the merge queue Aug 29, 2026
Merged via the queue into main with commit 635aa61 Aug 29, 2026
36 of 37 checks passed
@os-litant
os-litant deleted the claude/issue-13017-json-stdout-docblock-counts branch August 29, 2026 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

2 participants