Skip to content

fix: record sessions to bare relative filenames - #8347

Open
Aditya Pratap Singh (akkupratap323) wants to merge 1 commit into
microsoft:mainfrom
akkupratap323:fix/recorder-current-directory
Open

Aditya Pratap Singh (akkupratap323) wants to merge 1 commit into
microsoft:mainfrom
akkupratap323:fix/recorder-current-directory

Conversation

@akkupratap323

Copy link
Copy Markdown

Why are these changes needed?

Recording a session to session.json raises ValueError because finalize() tries to create an empty parent directory. Create a directory only when the session path has a parent, so a bare filename saves into the working directory.

The regression records and replays a real interaction with the offline replay client, covering bare filenames, ./ paths, missing nested directories and absolute paths. The bare-filename case fails on the original source while the other three pass; all four pass with this change.

Related issue number

Fixes #8346

Checks

  • No documentation change is needed: this restores normal filename behavior without changing the public API.
  • Added regression coverage. Complete recorder test file: 6 passed, run through UV on Python 3.11.14 / Windows. Ruff 0.4.8 check and format pass for both changed files.
  • All remote checks have passed (pending CI).

The full extension suite and live-provider integration tests were not run. #7797's encoding change is separate; this patch leaves file encoding unchanged. Investigated and implemented with Codex assistance; tests ran locally against the real classes.

This branch has not been deployed

No deployments
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.

Recorder cannot save a session to a bare relative filename

1 participant