chore(devx): the three sequential-double-blank comment-mask callers take maskCommentsAndLiterals (#15776, residual) - #16336
Merged
Conversation
…s take maskCommentsAndLiterals PR #16300 converted the eight callers the card named that spelled the comments+literals projection as `comment[i] | literal[i]` -> `blank`. Three more files spell the identical projection as a SEQUENTIAL double `blank` -- `blank(source, comment)` then `blank(masked, literal)` -- a shape the card's grep could not match, measured in the Release (0 disagreements over 6,206 files vs the export, live control 6,176). - `check-keyed-text-bounds.mjs`'s `project` keeps its pair-return shape `{ masked, struct }` as a wrapper over `maskComments` / `maskCommentsAndLiterals` called separately, following PR #16300's own precedent. - `check-runner-env-posture.mjs`'s `findRunnerEnvReads` composes the two masks inline; both are now the module's own exports. - `check-widget-option-census.mjs`'s exported `structureMask` is a straight substitution (no external importers). `js-comment-mask.mjs` untouched: no new export, no semantics change. Behaviour byte-identical, proven per gate by diffing plain and `--self-test` output on origin/main before and after: 6 runs, 6 empty diffs, exit 0 on every side. Ablation control (literal half dropped; identity mask) moves at least one reading for every gate except `check-widget-option-census`'s plain run, which is unmoved by both legs -- a pre-existing property of today's real spec/parser corpus content, not introduced by this conversion (behaviour is provably identical to the deleted code). Closed by a differential proof: the deleted sequential-double-blank spelling vs the replacement over 6,192 files (106,979,676 chars), 0 disagreements, live control (comments-only vs comments+literals) disagreeing on 6,167 files. Part of #15776. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8
baozhoutao
marked this pull request as ready for review
September 6, 2026 15:01
baozhoutao
enabled auto-merge
September 6, 2026 15:01
This was referenced Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #15776
js-comment-mask.mjspublishesmaskCommentsAndLiterals(#15594, PR #15774). PR#16300 converted the eight callers the card originally named that spelled the
comments+literals projection as
comment[i] | literal[i]->blank. Its Releasecomment (
5559693595) recorded a third spelling three more files carry — asequential double
blank:blank(source, comment)thenblank(masked, literal)— a shape the card's original grep could not match, measured at 0disagreements over 6,206 files vs the export (live control 6,176). This PR
converts those three, closing the card's class.
Per-file table
scripts/check-keyed-text-bounds.mjs:402project{ masked, struct }scripts/check-runner-env-posture.mjs:258(inline infindRunnerEnvReads)commentMasked/bothMaskedscripts/check-widget-option-census.mjs:183structureMask(exported, no external importers)All three now call
maskComments/maskCommentsAndLiteralsfromjs-comment-mask.mjsinstead of re-deriving the composition by hand.js-comment-mask.mjsitself is untouched: no new export, no semantics change.check-keyed-text-bounds.mjskeeps one unrelatedscanSource/blankcall site(
:1443,blank(ownSource, scanSource(ownSource).comment)— a singlecomments-only mask, not the comments+literals class this card is about) — out
of this card's scope, left alone.
Residual check
A recursive scan of
scripts/**for the sequential double-blankspelling(
blank(blank() and for thecomment[i] | literal[i]spelling, after thisPR's edits, finds nothing outside
js-comment-mask.mjsitself and theRelease's adopted out-of-class list (
check-entry-guard.mjs,pm/dispatch-gates.mjs'smaskSelfTests, and the two per-index guards incheck-undeclared-dep-imports.mjs/eslint-fatal-guard.mjs, all of whichmaterialise no comments+literals mask). The card's class is empty after this PR.
Acceptance — byte-identical before/after
Method: plain +
--self-testoutput captured onorigin/main(3e270d4e2)before the edits and again on the edited tree after; exit code captured by
redirect-then-
$?, never across a pipe.--self-test(stdout+stderr)check-keyed-text-boundscheck-runner-env-posturecheck-widget-option-census6 runs, 6 empty diffs, exit 0 on every side.
Ablation control (proves the diff could have failed)
Two legs against
js-comment-mask.mjs'smaskCommentsAndLiterals, eachtrap-restored (proven by
git diff HEADempty and the blob hash returning to7956343dd85bdef8924372cb2cdec45fcd54501d):check-keyed-text-boundscheck-runner-env-posturecheck-widget-option-censusEvery gate has at least one reading that moves under at least one leg, so the
byte-identical acceptance above is not vacuous for any of the three. Honest
exception:
check-widget-option-census's plain run is unmoved by BOTHlegs — the real spec/parser corpus this gate reads today does not happen to
contain comment or string-literal content that a degraded mask would
mis-parse (its self-test's own literal-masking fixture sits at a nested
bracket depth the depth-walker already excludes regardless of masking, so it
does not discriminate this ablation either — a pre-existing property of that
fixture, not introduced here). Not filed separately: unlike #16299 (fully
vacuous under both legs, both plain and self-test), this file's self-test
channel does move under leg 2, so the gate's overall acceptance is not
fully unpinned — only its plain-run channel is silent on this particular
degradation today.
Differential proof (closes the gap regardless)
Because behaviour cannot be told apart from output alone, the deleted
sequential-double-blank spelling was run against its replacement
(
maskCommentsAndLiterals) directly, over the whole tree, with a livecontrol:
Zero disagreements over the full corpus is what actually retires the risk —
identical to the equivalence PR #16300's own report measured for the other
spelling variant.
Gates
node scripts/pm/dispatch-gates.mjs --changed --commands --repo objectstack-ai/objectstackon the final tree (10691a60e) derives 34commands over the 3 changed paths.
--ranreconciliation: 34 derived, 34 run,0 NOT-MEASURED, 0 UNRUN. All 34 of 34 exit 0 —
pnpm check:pm-dispatch-gates(initially still running at draft-open time) finished green (1,534 self-test
cases pass) shortly after.
check-comment-mask-corpus,check-scripts-symbol-anchors,check-self-test-wired,check-declaration-mirrors(the families that wouldredden on a dropped export, an unwired self-test, or a stale mirror) all exit
0.
check:nul-bytesexit 0, plus an independentgrep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]'over the three files, no hits.TURBO_SCM_BASE=3e270d4e2 pnpm exec turbo ls --affected→ 0 packages: thediff is
scripts/**only, so no package test/typecheck is owed.Scope note
skip-changesetapplied: internal gate scripts, nothing published from anypackage. No
content/docs/releases/change.Generated by Claude Code