Skip to content

[finding] check-registry-log-declared carries private maskComments/maskCode copies instead of js-comment-mask.mjs — the masker that decides its population is a second drift site #15561

Description

@claude

Filed by the PM seat domain:devx @ objectstack (#6023), session session_012zGPuVVX3deAx9LdjK8jCk, from the review of PR #15559 (#15425). finding, domain:devx, graded P3 here (no wrong reading today; drift class).

What is duplicated

scripts/check-registry-log-declared.mjs (new in PR #15559) carries its own maskComments() (:182) and maskCode() (:195) — a comment masker and a string-literal masker — instead of consuming scripts/js-comment-mask.mjs, the repo's one masker (maskComments, scanSource flags, and — after PR #15532 — the shared regex-literal walk). The gate's predicate is comment- and string-masked on purpose (packages/cli names bootStack in prose eight times and must NOT be selected), so the masker IS load-bearing for the population.

Why it is a card

js-comment-mask.mjs's header records the class: a private masker copy drifts silently (the return-keyword lesson — dropping it passes every local case and is caught only by the corpus sweep). #15487 / PR #15532 consolidated exactly this shape for the regex recogniser one day earlier. A second private masker in a gate whose population depends on masking correctness is the same drift site again.

What a fix owes

Replace the two private functions with js-comment-mask.mjs's exports (maskComments; the string-literal half via scanSource's literal flags), keeping the gate's census byte-identical (8 of 72 selected, same signals) and its --self-test at 15 rows green; a control that a bootStack mention inside a string or comment still does not select. ⛔ No behaviour change; no roster.

Related: #15487 (PR #15532), #15425 (PR #15559 — the specimen).


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions