Skip to content

fix(drift): preserve escaped slash regex literals - #415

Merged
stackbilt-admin merged 2 commits into
mainfrom
fix/issue-410-drift-regex
Nov 3, 2026
Merged

stackbilt-admin merged 2 commits into
mainfrom
fix/issue-410-drift-regex

Conversation

@stackbilt-admin

@stackbilt-admin stackbilt-admin commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Reviewed anti-pattern regexes containing escaped slashes were silently truncated. Find literal boundaries with escape and character-class state, preserving the regex body/flags, keyword fallback and existing drift policy. Malformed or empty literal boundaries no longer recycle an internal slash into a new prose pattern; the reviewer reproduction Avoid /[/ and /(/ produces no invented rule. Later lines and earlier valid rules remain available.

Closes #410.

Validation of the final review fix, Windows Node24.19.0 / pnpm9.15.9, isolated issue-410 worktree:

  • Frozen install, build and typecheck: pass.
  • Drift suites: 43/43 pass, including the original nine regressions and six review-fix regressions for malformed-span recovery, line endings, empty delimiters and the exact reported false positive.
  • Built CLI matching/nonmatching smoke: pass. The exact malformed-input reproduction yields no executable regex or false violation; next-line escaped regex and keyword fallback remain executable.
  • Final full suite: 1,938 passed, six failed (1,944 total). Four failures match the known Windows path/TTY baseline. Two existing bootstrap-reset CLI tests exceeded their five-second timeouts during concurrent test load; no assertion failed in those two cases.
  • Follow-up isolated rerun of the unchanged bootstrap-reset integration file: 26/26 pass with the original timeouts and assertions. Log: .cache/issue-410-timeout-confirmation.log. No bootstrap tests or timeout settings were changed by this PR.
  • Final full log: .cache/issue-410-review-fix-full-tests.log. The initial pre-review implementation run had 1,934 passes and the four known failures; it is superseded by the final evidence above.
  • Source retains its original CRLF; new tests use LF. Whitespace validation uses core.whitespace=cr-at-eol for the existing CRLF file. Smart-commit preview and normal append commit preserve history.

Main's dependency audit remains a separate prerequisite; PR413 passes Linux CI with patched Zod4 and the compatible dependency repairs. This PR does not alter score thresholds, exit meanings, or suppress checks. Independent exact-head re-review is required after this correction. No merges, tags, publication, deployment, production writes or remote deletion performed.

@stackbilt-admin
stackbilt-admin merged commit 1102c1b into main Nov 3, 2026
6 of 7 checks passed
@stackbilt-admin
stackbilt-admin deleted the fix/issue-410-drift-regex branch November 27, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

drift pattern extractor breaks on regexes containing an escaped slash

2 participants