Skip to content

Infra WM1R: retain JavaScript dependencies after regex literals #1093

Closed

Description

@jparker2006

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

Acceptance criteria

  • First reproduce the reviewer's R11 on the reviewed head in an isolated synthetic tree: tools/client/read.cjs has a regex containing a backtick followed by require("../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 with MODULE_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

  1. added
    needs-triage
    on Nov 17, 2026
  2. added this to the Infra milestone on Nov 17, 2026
  3. removed
    needs-triage
    on Nov 17, 2026
  4. changed the title [-]Retain JavaScript loads after regex literals (follow-up for #1056, R11)[/-] [+]Infra WM1R: retain JavaScript dependencies after regex literals[/+] on Nov 17, 2026
  5. added
    ready-for-agent
    on Nov 17, 2026
  6. jparker2006 commented on Nov 17, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: start checked, branch room/1093-js-regex

  7. jparker2006 commented on Nov 18, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: archived

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

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions