From 1f96da2488be0e9f94b97ca8ea2a8225ccca3370 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Fri, 22 May 2026 13:16:47 -0400 Subject: [PATCH] fix(tests): escape '/' in forensics test regex literals (#123) * fix(tests): escape '/' in forensics test regex literals Closes #3855 * fix: add required type and pr fields to changeset frontmatter --- .changeset/forensics-regex-escape.md | 5 +++++ tests/forensics.test.cjs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/forensics-regex-escape.md diff --git a/.changeset/forensics-regex-escape.md b/.changeset/forensics-regex-escape.md new file mode 100644 index 000000000..a502f934b --- /dev/null +++ b/.changeset/forensics-regex-escape.md @@ -0,0 +1,5 @@ +--- +type: Fixed +pr: 123 +--- +**Escape `/` in `forensics.test.cjs` regex literals** — two regexes at lines 153 and 163 contained unescaped `/` characters in `open-gsd/get-shit-done-redux`, causing a `SyntaxError: Invalid regular expression flags` at parse time on all platforms and blocking CI for every PR on the affected main state. Closes #3855. diff --git a/tests/forensics.test.cjs b/tests/forensics.test.cjs index 368ad167d..13db8fe96 100644 --- a/tests/forensics.test.cjs +++ b/tests/forensics.test.cjs @@ -150,7 +150,7 @@ describe('forensics workflow', () => { // contains the repo string. assert.match( content, - /gh issue create[\s\S]{0,250}--repo\s+open-gsd/get-shit-done-redux/, + /gh issue create[\s\S]{0,250}--repo\s+open-gsd\/get-shit-done-redux/, 'gh issue create must use --repo open-gsd/get-shit-done-redux to avoid submitting to the user\'s current project repo' ); }); @@ -160,7 +160,7 @@ describe('forensics workflow', () => { // Regex is more robust than a fixed-length slice to formatting changes assert.match( content, - /gh label list[\s\S]{0,250}--repo\s+open-gsd/get-shit-done-redux/, + /gh label list[\s\S]{0,250}--repo\s+open-gsd\/get-shit-done-redux/, 'gh label list must target open-gsd/get-shit-done-redux' ); });