.qwen/e2e-tests/2026-06-13-file-history-snapshot-persistence.md
Verify that /rewind file-history state survives session resume when tool edits
occur after the turn-boundary makeSnapshot() and before process exit.
/rewind to the prompt that scheduled the edit.file_history_snapshot record for
the edited turn./rewind can restore the edited file to its pre-edit state.file_history_snapshot and a systemPayload.snapshots array.schemaVersion or isSnapshotUpdate field is required.Build the local CLI first:
npm run build && npm run bundle
Run the scenario in a throwaway project and inspect the generated chat JSONL. Use a clean user config, or confirm local settings have not disabled checkpointing.
REPO_ROOT="/Users/jinye.djy/.codex/worktrees/6393/qwen-code"
TMP_PROJECT="$(mktemp -d)"
cd "$TMP_PROJECT"
printf 'before\n' > a.txt
node "$REPO_ROOT/dist/cli.js" --chat-recording
Inside the TUI, ask Qwen Code to replace before with after in a.txt, then
exit immediately after the edit tool completes. Resume the session with the same
CLI build and run /rewind.
Not executed as part of this implementation pass. The regression is covered by focused unit tests for snapshot recording, JSONL persistence, resume reconstruction, client prompt flow, and ACP prompt flow.