Repository navigation
Recover Codex diffs from FileChange session records - #1117
Merged
Merged
Conversation
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Recover the diffs missing from current Codex Session traces and log conversion, preserving legacy support and edit matching.
The Codex 0.147.0 host inspection remains with the Day shift, as #1085's scope clarification specifies. Both native formats have fake-session coverage.
Closes #1085
Test seams
thirdshift harness codexcommand, its Session trace, and the Console Logs page, with a fake Codex native session file.thirdshift logs --convertcommand, its conversion report, and the resulting Session trace, with a fake Codex native session file.Evidence
cargo test --test console codex_patches::current_codex_file_changes_keep_update_add_and_delete_diffsfailed with 0 recovered diffs, expected 2.After: the same test passes, preserving each update/add/delete diff and Console escaping.
cargo test --test console codex_patches::: 6 passed, including old-format diffs, current-format diffs, Resume selection, and declining incomplete or missing evidence.cargo test --test convert_logs: 10 passed, 1 ignored fixture entry point; both native formats recover diffs, and historical conversion selects the original turn.cargo check --all-targets,cargo fmt --check, andgit diff --check: passed./usr/bin/time -p scripts/affected-tests main: passed; selectedcargo nextest run, with 2,361 passed and 56 skipped. Wall time 2,715.69s, including compilation and Cargo lock waiting; nextest test execution 2,292.447s.Merge Danger
Door: two-way
The reader change is reversible; conversion still preserves original Session logs.
Blast Radius: Codex
Optional patch evidence in live Session traces and historical conversion.
Unaddressed findings
Security review outcome
No unaddressed introduced findings.
Review coverage
Standards and Spec each read every changed file:
src/harness/codex/patches.rs,tests/console/codex_patches.rs, andtests/convert_logs.rs. Unread changed files: none. Generated-output exclusions: none.Built with codex · gpt-6.1-sol · xhigh