test(server): record the Codex thread rollback fixture live on 0.156.1 - #13505
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This PR refreshes a Codex rollback replay fixture and its development-only recording harness, adding assertions and workspace normalization without changing production request-path behavior. The large diff is primarily regenerated test transcript data. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
The Codex thread_rollback transcript was captured on 0.120 and its rollback exchange was hand-edited to the 0.156 thread/turns/list + thread/revert shape. Re-record it against a real 0.156.1 app-server so the revert path is proven by Codex itself. The recorder now sends the adapter's initialize opt-out and turn/start defaults, reads the thread's history mode before reverting (as the adapter does), accepts --model, and writes the recording cwd as <workspace>, so the transcript replays without edits. The fixture's Codex variant uses gpt-5.6-luna because the hub no longer serves gpt-5.4. The live recording shows a paginated thread from thread/start, a revert response with empty turns plus backwards cursors, and a post-revert recall that only contains the first turn. The output assertion now checks that recall, and the extra reasoning items the current model emits. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0cc5e27 to
e37e762
Compare
2a169ae
into
t3code/codex-turn-mapping
#13505) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
#13505) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The Codex
thread_rollbacktranscript was captured on Codex 0.120 and its rollback exchange was hand-edited into the 0.156thread/read+thread/turns/list+thread/revertshape, so nothing proved the revert path against a real app-server. This re-records it live on Codex 0.156.1.What changed
Fixture:
thread_rollback/codex_transcript.ndjsonis now a straight recording from Codex 0.156.1. Every frame is live and nothing was hand-edited.Recorder (
record-codex-app-server-replay-fixture.ts):initializenotification opt-out andturn/startdefaults (never-approve, full-access sandbox,cwd,model, detailed summary, user reviewer);--model/T3_CODEX_REPLAY_MODEL;<workspace>in outbound frames (codexReplayRecordingRecords.ts).Together these make the transcript replay against the adapter without edits.
Model: the fixture's Codex variant gets its own
modelSelection(gpt-5.6-luna), because the hub no longer servesgpt-5.4. The sharedCODEX_MODEL_SELECTIONis unchanged.Assertions (
codex_output.ts):What the live recording showed
The recording agrees with the adapter's assumptions; nothing contradicts them:
thread/startreturnshistoryMode: "paginated"with nohistoryModeparam, so threads T3 starts are revertable.thread/turns/list(descending, limit 1) returns the second turn, andthread/revert {beforeTurnId}succeeds. Its response carriesthread(withturns: []),turnsBackwardsCursoranditemsBackwardsCursor.thread/status/changednotLoaded → idle, then sendsthread/revertedafter the response.warningduring the reload. The recorder causes it, not Codex: it sendsthread/startwith{}, so the thread starts on the hub's default model, and the revert reloads it with a mismatch warning. The adapter sendsmodelonthread/start, so users likely don't see it. A follow-up will make the recorder sendmodel/cwdonthread/start.Verification
vp test run src/orchestration-v2/testkit/OrchestratorReplayFixtures.integration.test.ts -t thread_rollback: 2 passed (Codex and Claude).vp test runonCodexReplayFixtures,ThreadFork,ThreadMergeBack,OrchestratorReplayFixtures.contract,CodexAdapterV2.test.tsandscripts/codexReplayRecordingRecords.test.ts: 139 passed.vp exec tsc --noEmit -p .inapps/server: no errors or warnings.vp lintandvp fmton the touched files are clean.vp run knip:checkpasses.T3_CODEX_BIN=<codex 0.156.1> node scripts/record-codex-app-server-replay-fixture.ts --scenario thread_rollback --model gpt-5.6-luna.gpt-5.4and pre-0.156 recordings.Model: Claude Opus 5.5 (Claude Code)
🤖 Generated with Claude Code