Skip to content

Fix Windows-path escaping in spaced Codex transcript fixture - #1

Merged
shivamm-shukla merged 2 commits into
mainfrom
copilot/fix-github-actions-test-job
Aug 11, 2026
Merged

shivamm-shukla merged 2 commits into
mainfrom
copilot/fix-github-actions-test-job

Conversation

Copilot AI commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

The Test (Node 20.x / windows-latest) job failed in codex-transcript.test.ts due to invalid JSON in a test fixture on Windows paths. The spaced session_meta fixture embedded raw cwd text, which broke JSON parsing when cwd contained backslashes.

  • Failure scope

    • codex adapter transcript scoping > matches cwd even when the session_meta line uses spaced JSON formatting
    • Windows-only repro from unescaped cwd in manually formatted JSON
  • Change

    • Updated the spaced JSON fixture builder to serialize cwd with JSON.stringify(cwd) instead of direct interpolation.
    • This preserves the spaced formatting intent while making the fixture valid across platforms.
  • Resulting behavior

    • The test now exercises the intended parser/matcher behavior rather than path-escaping artifacts from the host OS.
const line1 = spaced
  ? `{"type": "session_meta", "payload": {"cwd": ${JSON.stringify(cwd)}}}`
  : JSON.stringify({ type: 'session_meta', payload: { cwd } });

Co-authored-by: shivamm-shukla <181811903+shivamm-shukla@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Test (Node 20.x / windows-latest) Fix Windows-path escaping in spaced Codex transcript fixture Aug 11, 2026
Copilot AI requested a review from shivamm-shukla August 11, 2026 01:01
@shivamm-shukla
shivamm-shukla marked this pull request as ready for review August 11, 2026 01:04
@shivamm-shukla
shivamm-shukla merged commit 638a8ee into main Aug 11, 2026
6 checks passed
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.

2 participants