Skip to content

fix(scripts): drop both transcribed counts from check-regen-pending's battery-roster comment - #16731

Merged
baozhoutao merged 1 commit into
mainfrom
claude/issue-16007-regen-pending-roster-counts
Sep 8, 2026
Merged

fix(scripts): drop both transcribed counts from check-regen-pending's battery-roster comment#16731
baozhoutao merged 1 commit into
mainfrom
claude/issue-16007-regen-pending-roster-counts

Conversation

@claude

@claude claude Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Fixes #16007

What changed

One comment paragraph in scripts/check-regen-pending.mjs, inside the SELF_TEST_BATTERIES governance block. Both transcribed counts leave the same sentence:

before after
`fixtureSelfTest`'s `check()` helper (14 calls) `fixtureSelfTest`'s `check()` helper
`decisionTableSelfTest`'s literal 8-row table `decisionTableSelfTest`'s literal table

Route: option 1 — delete BOTH counts, not only the wrong one, per the ratified triage on the card. Deliberately not the derived shape that landed on sibling #15231 (PR #16669): the two cards are the same defect class with opposite ratified remedies — derive there, delete here.

9 comment lines replaced by 9 comment lines (the paragraph is re-wrapped at the file's existing 80-column comment width). File length unchanged: 1408 lines before and after.

Why the sentence still says what it meant

The paragraph's own stated job is the contrast between three different shapes — "they are worth naming because all three are different shapes". A helper, a literal table with its driving loop, a bare boolean: those are the three shapes, and each is named by kind. Neither count was carrying that argument, and nothing downstream in the paragraph reads either number — the later clauses say "the table", "those rows", "one callee's internals", all of which resolve without a size.

Removing them also makes the three list items parallel for the first time. Before this change one item was sized in calls, one in rows, and one not at all, in the one block whose subject is which numbers in this file are load-bearing and which are not.

The floor is untouched and is not what drifted: SELF_TEST_BATTERIES floors each callee at 1 registration, deliberately not at an assertion count, and SELF_TEST_BATTERY_FLOOR is 3. Nothing here pins a total.

Measurements re-taken on origin/main at be92d468

The card cites :720; a later reading cited :840. Both were re-measured rather than trusted, and the block was found by its text, not by a line number.

reading card re-measured here at be92d468
line of the sentence carrying both counts :720 :840 (the STOP -- line that opens the paragraph is :838)
check( call sites in fixtureSelfTest 27 28 — the card's own recipe, unmodified
rows in decisionTableSelfTest's literal table 8 8 — the 8 has NOT drifted

The row count was the unsettled one, and it is settled here with a validated instrument. A crude grep -c "^\s*\[" over an awk range returns 11 on this file, and 11 is an artifact, not a reading: the awk range runs past the callee and swallows the three rows of the callees literal in the dispatch block below it, 8 + 3 = 11. All eleven counted lines were listed and classified.

The instrument used instead parses the file and counts the elements of the cases array literal inside the decisionTableSelfTest function declaration. It was validated before it was trusted: on a purpose-built input whose correct answer is 6 by construction (containing a comment line inside the literal, one row spanning three lines, and two rows sharing a line), it returns 6 while the crude grep returns 5. Negative control: asked for a function name that does not exist, it exits 2 with FAIL, rather than returning a number.

Verification

  • Gates: derived from the actual changed set with node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, run individually with exit codes recorded to disk, then reconciled: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN. Every one exits 0. The list was re-derived after the final commit and is byte-identical to the pre-commit derivation.
    • Three of them (check:browser-reachable-entries, check:docs, check:generated, all @objectstack/spec) first exited 1 with their own PREREQUISITE-NOT-MET text — packages/spec/dist holds no .mjs/.js bundles and packages/spec/json-schema is missing. That is an unbuilt checkout, not a verdict on this diff. After pnpm --filter @objectstack/spec build all three exit 0.
  • Repo-wide lint, not a narrowing: eslint . --no-inline-config --format json completed over a population of 6338 files that eslint itself resolved under its config — 0 errors, 0 warnings, and the changed file is present in that population.
  • No executable line moved, measured two ways. Stripping every full-line // comment from the file before and after this change yields byte-identical text (diff exit 0). And node scripts/check-regen-pending.mjs --self-test exits 0 with a transcript byte-identical to the same self-test run from the pre-change bytes (diff exit 0).
  • Control bytes: grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]' over the changed file exits 1 — none. Exit code captured before any pipe.
  • No pin depends on the deleted text: a repo-wide search for 8-row, 14 calls and the sentence's own phrases finds no other reference to either count and nothing that pins this comment's wording.

No changeset — measured, not assumed

Nothing published moves. The only changed path lives under the repo-root package, which is private: true and declares no files[]; of the 70 non-private packages that declare a files[], zero are rooted at the repo root, so no published artifact can contain scripts/check-regen-pending.mjs. skip-changeset applies.

验收备注

No out-of-scope findings. The card's stale :720 and the earlier :840 are recorded above as re-measurements rather than filed: they are drift in the card's own citations, not defects in the tree.


Generated by Claude Code

…mment

The roster block's STOP paragraph named the three callees' inner sinks by
shape and hung two transcribed numbers off two of them: `fixtureSelfTest`'s
"`check()` helper (14 calls)" and `decisionTableSelfTest`'s "literal 8-row
table". Neither is derived or compared by anything, and the first had drifted
to 28 while the second was still exactly 8 — so the one block whose subject is
which numbers in this file are load-bearing gave a reader no way to tell which
of its own two numbers to trust.

Both counts come out. The sentence's job is the contrast between three
different SHAPES — a helper, a literal table with its driving loop, a bare
boolean — and the counts were never carrying that; removing them also makes
the three list items parallel, which they were not while two of them were
sized and one was not.

Comment-only. Stripping every full-line `//` from the file before and after
this change yields byte-identical text, and `--self-test` prints a
byte-identical transcript, so no gate's accept/reject behaviour moves. The
floor is untouched and is deliberately not an assertion count:
`SELF_TEST_BATTERIES` floors each callee at 1 registration.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU
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

Projects

None yet

2 participants