Skip to content

fix(scripts): cite the re-taken cost reading instead of restating a void tally in the platform checklist's pathlessLineCitations rationale - #18969

Merged
os-steve merged 2 commits into
mainfrom
claude/issue-18913-platform-checklist-stale-245
Sep 18, 2026
Merged

os-steve merged 2 commits into
mainfrom
claude/issue-18913-platform-checklist-stale-245

Conversation

@os-steve

Copy link
Copy Markdown
Collaborator

Fixes #18913

Clause-②: no

What was wrong

scripts/check-platform-checklist.mjs justified its own corpus declaring
pathlessLineCitations: true with a corpus-wide count of what the two path-less
spellings admit across docs/adr/**, scripts/** and packages/spec/src/**.
That figure was a RAW-REGEX tally. PR #18884 re-took the reading beside the
grammar itself and named the raw-regex pair void: it subtracts neither the fenced
blocks the extractor skips nor the citations the path-anchored passes had already
recorded, so it overstates what the option actually admits by about a half.

The aggravating half is where the number sat: inside the file's own stated
rationale for a live configuration decision, a dozen lines above the
defineCorpus call it argues for. An author reading it to decide whether their
corpus should opt in was reading a cost the same repository had already
withdrawn.

Premise verification, done first

The card's load-bearing claim — that #18884 named that figure void — was the one
thing the dispatching seat had deliberately NOT checked. Confirmed before any
edit:

  • The re-take text and the registration-time refusal both arrive in the same
    commit, and that commit names the PR: 0a5851d2 "fix(scripts): refuse
    pathlessLineCitations on a corpus that declares a doc projection (fix(scripts): refuse pathlessLineCitations on a corpus that declares a doc projection #18884)"
    (git log -S over scripts/symbol-anchors.mjs; a positive reading, so the
    shallow checkout does not weaken it).
  • The card's census reproduces on this tree. git grep -nE '245 times|222 and 23|222 \+ 23|222\+23' over *.mjs *.ts *.mts *.md *.mdx *.json returns
    exactly one hit, the rationale line itself; the control the card names, 112 and 25, returns exactly one hit in scripts/symbol-anchors.mjs, so the one is
    a reading and not a dumb instrument.
  • This is the only corpus in the repository declaring the option. The five
    registered corpora were enumerated; four declare nothing, and the default in
    scripts/symbol-anchors.mjs#extractAnchors is false. Nothing here
    generalises, and nothing here was applied to another corpus.

Does the corrected figure change the decision it justified?

No, and this was checked before the prose was touched, because flipping a corpus
declaration under cover of a prose fix is exactly what this card must not become.

The old sentence carried two jobs. The qualitative one — in prose a colon before
digits is punctuation, so the option admits ports, scenario labels and docblock
back-references — survives the re-take unchanged; the re-take's own text
enumerates the same three shapes. The quantitative one halves but keeps its sign,
so "default OFF is a measurement" still holds.

What actually changed is that the reason this corpus may opt in is no longer a
cost reading at all. scripts/symbol-anchors.mjs#defineCorpus now REFUSES the
option, at registration, to any corpus declaring a docProjection (#18845), and
the sharper half of the same re-take is that the projected corpora resolve the
option into unjudged residual and no actionable finding. This corpus declares no
projection and sweeps its documents raw, so the refusal does not reach it. That
is a mechanical test the registration passes, which is strictly better than the
prose cost argument it replaces.

The repair

Triage asked for a bounded transfer rather than a second absolute number
("绝对读数会腐烂,有界转移不会"), and the card asked that a successor not swap one
transcribed reading for another. Both are satisfied by citing rather than
restating:

  • The qualitative claim stays in this file.
  • The reading stays with the grammar that admits the spellings, cited as
    scripts/symbol-anchors.mjs#PATHLESS_COLON_CITATION — the docblock that
    carries the re-take, and that names the tree it was taken against, which this
    entry never did.
  • The live legality test — the registration-time refusal, and this corpus
    declaring no projection — is stated where the cost reading used to be.

No new corpus-wide figure is written here. The point of the card is that a digit
retyped into a second file is gated by nothing; a symbol anchor in a
scripts/** comment is resolved on every PR by check:scripts-symbol-anchors,
so the pointer reds if its target is renamed or deleted.

Reverse verification of the pointer

The claim "this transfer is gated, the digit was not" is itself measured, from
the committed state, predicting a red:

Mutant leg — the anchor's symbol replaced with one that does not exist, via
scripts/ablation-replace.mjs --expect 1 so the anchor must hit; proven on disk
before reading any verdict (real anchor occurrences 1 to 0, mutant 0 to 1, blob
91d4962f to 0c98d3cd):

check-scripts-symbol-anchors EXIT=1
❌ check-scripts-symbol-anchors: 1 finding(s) across 264 scripts.
  [unresolved-symbol] scripts/check-platform-checklist.mjs:1565
      `PATHLESS_COLON_CITATION_NO_SUCH_SYMBOL` has no declaration site or
      string-literal token in `scripts/symbol-anchors.mjs`

Restore leg — git checkout HEAD -- scripts/check-platform-checklist.mjs under
an EXIT INT TERM trap on an absolute path; git diff HEAD prints zero bytes
and git hash-object returns 91d4962f, byte-identical to the HEAD blob.

Declared: the FIRST ablation attempt was a NO-OP. It passed flag names the tool
does not take (--find/--replace instead of --anchor/--replacement), the
tool printed its usage, and the on-disk blob was unchanged — the reading from
that run is void and is not counted. It is reported rather than quietly re-run.
No build or dist/ is in this path: these are plain .mjs gates resolved from
source, so on-disk blob change is the whole preflight.

A second stale count in the same block, fixed in place

The list this entry belongs to was introduced as "Two declarations this corpus
needed and the core did not have:" and has carried THREE items since the
pathlessLineCitations fold was appended to it — the entry is tagged (#18592)
while the other two came from #18107, so the count was simply never updated. That
is the same defect class as the card (a number in this rationale block that the
file itself contradicts) and the fix is one word, in the block already named on
the claim, adding no verification surface. Changed to "Three". Evidence is the
list itself: unspannedAnchors, excludeDirs, pathlessLineCitations.

Tests

Comment-only change to one file. Every reading below was taken on this branch at
5f63efc5, after the merge of origin/main, with pnpm install --frozen-lockfile
re-run for the lockfile the merge moved.

node scripts/pm/dispatch-gates.mjs --commands derived 29 gate commands from the
change set; all 29 were run and recorded as command :: exit code, and
--ran reconciles them: "29 derived famil(ies) accounted for — 29 run, 0
NOT-MEASURED (a DERIVED zero — all 29 recorded an exit code and none of them is
3)". Every exit code is 0. The derivation is byte-identical before and after the
merge, so the pre-merge sweep and this one cover the same families.
check:nul-bytes is green and a direct control-byte scan of the edited file
finds none.

pnpm lint is the repo-wide scan CI owns. Targeted run on the edited file:
0 errors, 0 warnings, 1 file from --format json. The narrowing is sound because
this repository never enables type-aware linting — eslint.config.mjs says so in
its own words, "this repo runs one eslint.config.mjs, which never enables
type-aware linting (no parserOptions.project, no typed @typescript-eslint
rules) for ANY file, test or not" — so a comment-only edit inside one file cannot
move the verdict on any file it does not contain.

Acceptance notes

Nothing to file. The only out-of-scope thing this work turned up is the "Two"
versus three miscount above, and it was repaired in place rather than noted,
under the bounded in-place rule: same defect class as the card, one word,
mechanically determined, inside the block the claim already names, and adding no
verification surface. It is called out in its own section rather than buried in
the diff.

The two fenced files were not touched: scripts/pm/check-widening-tells.mjs
(PR #18948) and scripts/check-sdui-manifest.mjs (#18879) are absent from this
diff, which carries exactly one path.


Generated by Claude Code

… checklist's `pathlessLineCitations` rationale

The entry justifying `pathlessLineCitations: true` on this corpus carried a
corpus-wide count of what the two path-less spellings admit. That figure was a
raw-regex tally, and the re-take living beside the grammar named it void: it
subtracted neither the fenced blocks the extractor skips nor the citations the
path-anchored passes had already recorded.

Replace the restated digit with a bounded transfer: the qualitative claim stays
here, the reading stays with the grammar that admits the spellings, cited as a
resolvable symbol anchor that `check:scripts-symbol-anchors` resolves on every
PR. Also state the reason this corpus may opt in that is live today -- the
registration-time refusal of the option to any corpus declaring a
`docProjection`, which this one does not.

Claude-Session: https://claude.ai/code/session_01AmH9bKvGoLjiY86Q4Z3og2
Co-authored-by: Claude <noreply@anthropic.com>
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