fix(scripts): replace stale line-number citations in js-comment-mask.mjs with content anchors - #7930
Merged
baozhoutao merged 1 commit intoSep 6, 2026
Conversation
…mjs with content anchors The docblock's evidence for an undetected mutation pointed at two other files by line number (`check-changeset-presence.mjs:555` and `check-doc-links.mjs:616`). Both had drifted onto unrelated code — one had drifted twice, once further while the finding sat in the queue — because a cross-file line number has no mechanism keeping it true. Swap both coordinates for content anchors that fail loudly instead of silently pointing elsewhere: the enclosing `isDocumentation` function name for the first site, and a quoted, verified-unique code fragment for the second (its site has no clean enclosing identifier). Comment-only change; the two cited files are unedited. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013uAaxiwgYDybsTNV9xwa1M
baozhoutao
marked this pull request as ready for review
September 6, 2026 03:34
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
This was referenced Sep 6, 2026
baozhoutao
deleted the
claude/issue-6998-js-comment-mask-citation-anchors
branch
September 6, 2026 04:04
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 #6998
What changed
scripts/js-comment-mask.mjs's header docblock cited two other files byline number as evidence that an undetected mutation (dropping
returnfrom
REGEX_AFTER_KEYWORD) is live in this tree —check-changeset-presence.mjs:555and
check-doc-links.mjs:616. Both had drifted onto unrelated code byfiling time, and one drifted further (177 lines off) while the finding
sat in the triage queue, from an unrelated docblock edit.
Per triage (
5534083054) this repo's ruling: swap both coordinates forcontent anchors that fail loudly instead of silently pointing elsewhere.
check-changeset-presence.mjs→ the enclosingisDocumentationfunction name (clean identifier).
check-doc-links.mjs→ a quoted, verified-unique code fragment(
return /\.(md|mdx)$/.test(root)); the real site sits in awildcard/expansion helper with no clean enclosing identifier.
Comment-only change. Neither cited file (
check-changeset-presence.mjs,check-doc-links.mjs) is touched — they are the cited targets, not theedit surface.
Verification
Re-derived both sites on the merged tree (post
#7880/#6891,origin/main797b39f68) with the card's own control:Anchor uniqueness (each must read 1):
Fabricated-anchor control (expect 0 — proves the search itself still works):
Gates run from a dedicated worktree (
objectui-issue-6998), each behindos-verify-lock.sh:node scripts/js-comment-mask.mjs --self-test→ 45/45 cases pass.pnpm exec vitest run --maxWorkers=2on every test file thatgit grepsjs-comment-maskunderscripts/__tests__/(6 files) →6 passed, 202 tests passed.
pnpm type-check:scripts(tsc -p tsconfig.scripts.json) → exit 0.pnpm lint:root→ exit 0, 0 errors (32 pre-existingany/unused-varwarnings in unrelated files, none in the touched file).
node scripts/check-control-bytes.mjs→ OK, 6401 files scanned.node scripts/check-changeset-presence.mjs→ "No source or publishedcontract of a released package changed in this range, so no changeset
is owed" (comment-only change to an unpublished root script).
git diff --stat origin/main:scripts/js-comment-mask.mjs | 5 +++--—exactly one file changed.
Generated by Claude Code