Skip to content

fix(agent-replay): preserve guest path compatibility on Windows - #2406

Open
hugozhou-ai wants to merge 1 commit into
mainfrom
codex/windows-session-replay-compatibility
Open

fix(agent-replay): preserve guest path compatibility on Windows#2406
hugozhou-ai wants to merge 1 commit into
mainfrom
codex/windows-session-replay-compatibility

Conversation

@hugozhou-ai

Copy link
Copy Markdown
Contributor

Summary

  • keep replay CWD and portable state paths in the provider guest POSIX namespace on Windows hosts
  • allow older Codex cassettes to match the newer turn/start.cwd field only when it equals the declared default replay CWD
  • validate POSIX and Windows absolute paths independently of the host OS while preserving user-authored text

Why

Native Windows TSH replay runs execute the provider inside a Linux HCS guest. Host filepath semantics rejected or rewrote guest paths, while older Cassettes omitted the default Codex turn/start.cwd field now emitted by newer providers.

Risk

The compatibility rule is descriptor-owned and narrow: it applies only to declared methods, only when the recorded field is absent, and only when the live value exactly equals the replay CWD. Non-default CWD mismatches continue to fail closed.

Verification

  • go test ./... in packages/agent/session-replay
  • go test ./packages/agent/daemon/runtime -run 'TestReplayProcessTransport(AcceptsDefaultCWDAddedByNewerProvider|MapsRecordedCWDInStrictJSONMatch|FailsClosedOnOutboundMismatch)$' -count=1
  • real TSH C01 replay completed 8/8 checkpoints twice with C01_TURN_3_COMPLETED
  • git diff --check origin/main...HEAD

Windows impact

Covered by cross-platform absolute-path tests, logical POSIX replay-root tests, and the real native HCS/VMP replay runs above.

Documentation impact

No durable documentation change is required. The existing Session Replay README already defines ${REPLAY_CWD} as the portable guest-path boundary; this change makes Windows implementation match that contract.

Signed-off-by: HugoZhou <hugozhou0638@gmail.com>
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.

1 participant