The ADR-0019 lint family shares one per-character code mask (codeMask in buildScripts/util/check-aiconfig-test-mutation.mjs) consumed by four rules: B4 (DB-path mutation, safety-critical), B3, A5, and A1. The predecessor PR's six-cycle review arc (closed Drop+Supersede at the terminal circuit-breaker, cycle 6) proved a structural fact: heuristic completeness against JavaScript slash/continuation grammar is a parser problem, not a lookup-table problem. Each repaired class exposed the next. The terminal verdict's decomposition: A1 salvage landed separately (PR #15275, on the dev mask); THIS ticket owns the mask upgrade as a deliberate design decision instead of a cycle-7.
The Problem
The dev mask classifies strings and comments only. The review arc's verified falsifier corpus — the strongest lexer test material this repo has — spans eight classes of valid JavaScript where the mask misclassifies executable code, producing false negatives across all four rules (the dangerous direction for an enforcement mask):
Comment text inside template interpolations (false-positive direction).
} inside comment/regex text closing the interpolation span early.
Line-continuation semantics (a line-final backslash escapes the terminator, not the next line's first char).
Slash after a control-header ) (if (ok) /re/.test(s) — regex, not division).
Slash after an expression-ending literal ("x" / 2 — division, not a fake regex swallowing the suffix).
throw / for await regex-preceding contexts.
Object-literal division and postfix-increment division (the terminal cycle's finds — still open even after 5+6+7 were repaired).
The closed predecessor branch (grace/15213-a1-env-rederivation-rule, final head 20950c614e) holds a working stacked-frame lexer covering classes 1–7 plus the transition-pair spec matrix — reference material, not a merge candidate.
The Architectural Reality
buildScripts/util/check-aiconfig-test-mutation.mjs — codeMask(line, state) per-line contract with carried cross-line state; owner of the shared seam; B4's own suite + 810-file live scan are the sibling-safety oracle.
buildScripts/util/check-aiconfig-antipatterns.mjs — B3/A5/A1 consumer; A1 additionally consumes a code-only PROJECTION of the mask.
CI: dependency-free standalone workflows (aiconfig-antipattern-lint.yml pattern) — a tokenizer dependency has CI-installation implications.
PR #15275 pins the A1 interpolation boundary as a documented negative spec — the flip-target proving this ticket's delivery.
Resolved Shape — graduated from D#15268
✅ RESOLVED / GRADUATED: Discussion #15268 converged on Acorn as an ordinary devDependency and graduated this one standalone ticket. The author fold is terminal as of 2026-07-17T00:59Z; implementation is PR #15329.
The ticket's original Option A ("real tokenizer") and the Discussion's Option B ("lexer adoption") name the same selected mechanism. The difference is vocabulary, not architecture. The binding shape is:
tokenize each whole file once with the existing direct acorn devDependency;
memoize whole-file non-code spans on the existing mask state and return per-line slices through an explicit lineIndex, preserving the consumers' line-oriented contract without line-local parse state;
blank comments, string/regex literals, and template quasi text while leaving executable template interpolations code-visible;
on tokenizer failure, bias toward visible false positives rather than safety-critical false negatives;
install dependencies in both standalone AiConfig lint workflows with npm ci --ignore-scripts; this is already an established merge-gate primitive and remains off the unit-leg critical path;
keep the authority scoped to B4/B3/A5/A1. extractComment() and the block-alignment classifier have different contracts and no reproduced defect, so they do not migrate here;
treat the A1 salvage as already delivered by #15213/#15275.
Decision Record: NOT_NEEDED. ADR-0019 remains the enforcement authority; D#15268 is the option-decision SSOT; this ticket and PR #15329 are implementation artifacts.
Acceptance Criteria
The shared mask tokenizes each whole file once with Acorn and preserves the existing per-line consumer contract through explicit line slices; an escape-marker early return cannot desynchronize later lines.
Comments, strings, regex literals, and template quasi text are non-code, while executable template interpolations remain code-visible.
The full classes 1–8 corpus passes, including object-literal/postfix division, control-header regex, line continuations, nested interpolations, and the A1 interpolation positive; matching string/comment/quasi-text negative controls remain inert.
A deliberately invalid token reaches the tokenizer-failure branch and proves conservative code visibility; an invalid-grammar specimen that Acorn can still tokenize is not accepted as a red control.
Both consumers move together: B4 remains safety-critical and B3/A5/A1 consume the same shared mask/projection.
Both standalone AiConfig lint workflows install with npm ci --ignore-scripts; their scan sets and generated-config boundary remain explicit.
Focused buildScripts coverage passes and both live checkers report zero violations across the tracked test/ and ai/ corpora; the zero-delta comparison carries a positive discriminator proving the instrument can report disagreement.
Comments this change itself falsifies are corrected in the touched AiConfig checkers; repo-wide cleanup of the stale "dependency-free lint workflows" belief remains outside this lane.
The PR body maps D#15268's OQ dispositions, Step-Back, [GRADUATED_TO_TICKET: #15276], and Decision Record: NOT_NEEDED.
Out of Scope
A1 rule semantics (landed via PR #15275; #15213 owns them).
Any new lint rules — this is mask fidelity only.
Migrating extractComment(), the block-alignment classifier, or other semantically different scanners without a reproduced defect.
Repo-wide cleanup of stale dependency-free-workflow comments outside the two touched AiConfig checkers.
Decision Record impact: aligned-with ADR 0019. NOT_NEEDED — the selected Acorn implementation strengthens the existing enforcement backstop without changing the ADR.
Origin Session ID: 75ed6708-c66b-4989-862d-2286e87abbf1
Retrieval Hint: "shared codeMask lexer falsifier corpus slash grammar continuation parser-grade terminal drop supersede"
Live latest-open sweep: latest 20 open checked 2026-07-16 ~15:50Z — no equivalent. A2A claim window scanned same cycle — no competing claim. Unassigned by design: the shape decision (A/B/C) deserves fresh eyes; the falsifier corpus authors (Emmy, Euclid) are the natural reviewers.
Context
The ADR-0019 lint family shares one per-character code mask (
codeMaskinbuildScripts/util/check-aiconfig-test-mutation.mjs) consumed by four rules: B4 (DB-path mutation, safety-critical), B3, A5, and A1. The predecessor PR's six-cycle review arc (closed Drop+Supersede at the terminal circuit-breaker, cycle 6) proved a structural fact: heuristic completeness against JavaScript slash/continuation grammar is a parser problem, not a lookup-table problem. Each repaired class exposed the next. The terminal verdict's decomposition: A1 salvage landed separately (PR #15275, on the dev mask); THIS ticket owns the mask upgrade as a deliberate design decision instead of a cycle-7.The Problem
The dev mask classifies strings and comments only. The review arc's verified falsifier corpus — the strongest lexer test material this repo has — spans eight classes of valid JavaScript where the mask misclassifies executable code, producing false negatives across all four rules (the dangerous direction for an enforcement mask):
}inside comment/regex text closing the interpolation span early.)(if (ok) /re/.test(s)— regex, not division)."x" / 2— division, not a fake regex swallowing the suffix).throw/for awaitregex-preceding contexts.The closed predecessor branch (
grace/15213-a1-env-rederivation-rule, final head20950c614e) holds a working stacked-frame lexer covering classes 1–7 plus the transition-pair spec matrix — reference material, not a merge candidate.The Architectural Reality
buildScripts/util/check-aiconfig-test-mutation.mjs—codeMask(line, state)per-line contract with carried cross-line state; owner of the shared seam; B4's own suite + 810-file live scan are the sibling-safety oracle.buildScripts/util/check-aiconfig-antipatterns.mjs— B3/A5/A1 consumer; A1 additionally consumes a code-only PROJECTION of the mask.aiconfig-antipattern-lint.ymlpattern) — a tokenizer dependency has CI-installation implications.Resolved Shape — graduated from D#15268
The ticket's original Option A ("real tokenizer") and the Discussion's Option B ("lexer adoption") name the same selected mechanism. The difference is vocabulary, not architecture. The binding shape is:
acorndevDependency;lineIndex, preserving the consumers' line-oriented contract without line-local parse state;npm ci --ignore-scripts; this is already an established merge-gate primitive and remains off the unit-leg critical path;extractComment()and the block-alignment classifier have different contracts and no reproduced defect, so they do not migrate here;Decision Record:
NOT_NEEDED. ADR-0019 remains the enforcement authority; D#15268 is the option-decision SSOT; this ticket and PR #15329 are implementation artifacts.Acceptance Criteria
npm ci --ignore-scripts; their scan sets and generated-config boundary remain explicit.test/andai/corpora; the zero-delta comparison carries a positive discriminator proving the instrument can report disagreement.[GRADUATED_TO_TICKET: #15276], andDecision Record: NOT_NEEDED.Out of Scope
extractComment(), the block-alignment classifier, or other semantically different scanners without a reproduced defect.Related
Decision Record impact: aligned-with ADR 0019.
NOT_NEEDED— the selected Acorn implementation strengthens the existing enforcement backstop without changing the ADR.Origin Session ID: 75ed6708-c66b-4989-862d-2286e87abbf1 Retrieval Hint: "shared codeMask lexer falsifier corpus slash grammar continuation parser-grade terminal drop supersede" Live latest-open sweep: latest 20 open checked 2026-07-16 ~15:50Z — no equivalent. A2A claim window scanned same cycle — no competing claim. Unassigned by design: the shape decision (A/B/C) deserves fresh eyes; the falsifier corpus authors (Emmy, Euclid) are the natural reviewers.