Skip to content

chore(scripts): retire the deJsxClosingTags workaround in check-vi-mock-inherit.mjs now that the shared masker is fixed #7883

Description

@claude

Blocked-by: #6891

#6891 taught the shared scripts/js-comment-mask.mjs that a / whose immediately preceding byte is LT opens no regex. That makes the local workaround in scripts/check-vi-mock-inherit.mjs redundant, and leaves two statements in that file describing a defect that no longer exists.

Not done in #6891 on purpose: that card's file surface was the shared masker plus its pin, and this gate's source belongs to whoever owns this gate. Filed rather than smuggled in.

What is now redundant

The measurement that says so

On cf7f2af6e with #6891's fix applied, walking every vi.mock call site in the tree (1,695 sites) against the raw mask, with deJsxClosingTags NOT applied:

sites whose argument list does not balance   7 in 7 files  ->  0

and with the rewrite still applied, the gate's output is byte-identical either way (pnpm check:vi-mock-inherit, exit 0). scripts/__tests__/check-vi-mock-inherit.test.ts was updated by #6891 to assert the fix directly on the RAW source — that case is what makes this a decision rather than a guess.

Two things to keep, not delete

  1. The two deJsxClosingTags unit cases (neutralises the tag while PRESERVING LENGTH, leaves a / that is not a closing tag alone) go with the function; the two behavioural ones (a covered factory returning JSX is READ, a FROZEN factory returning JSX is still caught) must stay and must still pass without it — they are the evidence that removal changed nothing.
  2. The header's measured history (SEVEN undelimitable sites, one of them a covered @object-ui/react site) is worth keeping in the past tense. It is why the shared module was fixed.

One caveat for whoever takes it

#6891 closes only the LT SLASH half. A / after } or GT still opens a phantom — the self-closing tag and a / in JSX text. deJsxClosingTags never covered those either (its regex matches closing tags only), so removing it does not lose coverage of them; but do not read this card as "the masker is now correct on JSX".


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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions