Repository navigation
Description
Parent
Ticket WM1R of spec #979 (Infra). Follow-up R11 from #1056 and PR #1079, scoped by the approved graph revision after review.
What to build
Make the offline split checker handle JavaScript regular-expression literals without hiding a subsequent real dependency load. A maintainer must never receive a successful move recommendation for a file that a working public consumer still loads merely because an earlier regex contains a backtick. Keep the existing split and refusal contract: retain resolved dependencies; refuse unresolved or ambiguous loads conservatively with their location and no stay or move sets.
This is the small prerequisite fix before WM2 acts on the checker's answer. It changes no migration workflow or live service.
Owned paths
ci/wizroom/split.py(only JavaScript literal/regex handling and reference extraction needed for R11)ci/wizroom/test_split.py(only the regression and relevant literal/comment/template controls)ci/wizroom/fixtures/js-regex/(new synthetic consumers and their collector)docs/evidence/1093/(red-first and green regression proof)
Relies on: contracts/wizroom.v1.md
Links
- Infra WM1: the WizRoom contract and the split checker, first #1056 real: the offline split checker and its dependency-retention and refusal contract, which this fixes
Acceptance criteria
- First reproduce the reviewer's R11 on the reviewed head in an isolated synthetic tree:
tools/client/read.cjshas a regex containing a backtick followed byrequire("../war-room/collector.cjs"); its collector prints a marker. Node succeeds before the simulated move, the old checker wrongly reports move, and moving only that temporary collector makes Node fail withMODULE_NOT_FOUND. - Keep a failing regression test from that reproduction before the fix, with its red output and exact commit. Include the same load split across multiple lines.
- After the fix, direct and multiline real loads after the regex retain their collector; a regex backtick must not suppress a real load. If other ambiguous JavaScript cannot be resolved, the checker refuses with source location and no sets rather than returning a successful unsafe move recommendation.
- Controls keep the existing behavior for an ordinary regex, comments and actual template-string text. The existing split suite passes and its proofs are not weakened or deleted.
- The checker remains offline and read-only: synthetic tree contents are unchanged by its run. No live migration or live/delete API experiment is part of this ticket.
- The PR says per added test
catches: <the user-visible failure>; every deleted test names its keeper or the removed behavior. Run affected checks and obtain exact-head green CI.
Proof
WM-P1: red-first synthetic consumer and checker regression, then green direct/multiline outcomes and controls. Source finding: #1079 (comment) (R11). The reproduction is:
const regex = /`/;
require("../war-room/collector.cjs");The original symptom at 3786297 is exit 0 with move tools/war-room/collector.cjs and total: 0 stay, 1 move; the synthetic Node consumer succeeds before the move and fails after it. Record only synthetic evidence. No security, privacy or data-loss effect has been established by this finding.
Activity
[-]Retain JavaScript loads after regex literals (follow-up for #1056, R11)[/-][+]Infra WM1R: retain JavaScript dependencies after regex literals[/+]jparker2006 commentedon Nov 17, 2026
launch-fleet: start checked, branch room/1093-js-regex
jparker2006 commentedon Nov 18, 2026
launch-fleet: archived