Repository navigation
fix: preserve interrupted Codex MCP traces and submitted input - #339
Open
seyoung4503 wants to merge 1 commit into
Open
seyoung4503 wants to merge 1 commit into
seyoung4503 wants to merge 1 commit into
Conversation
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.
A Codex timeout previously preserved raw events but skipped extraction of MCP calls, partial answers, CLI status and event hashes into the per-case record. This made interrupted failures difficult to compare with completed attempts. Preserve those fields after stopping the process, including complete events preceding a truncated JSON line. Log malformed lines and retain their line numbers without rewriting raw evidence; malformed streams and timeouts remain failed predictions.
Save the exact UTF-8 request bytes submitted on stdin and their SHA256 before spawning Codex. This captures the submitted question/schema/documentation, not the CLI's hidden system context. No prompt text, production tool behavior, model, official evaluator or historical grade changes. The current integrated 78-case experiment had no timeouts: this is a reproducible trace completeness fix, not its semantic-error explanation or an accuracy improvement claim. Historical missing inputs are not fabricated.
Validation: two new end-to-end runner tests failed before the change (missing normal input artifact; missing timeout MCP calls). With the fix, normal completion and timeout preserve exact submitted bytes, hashes, calls and exit status. Additional tests cover a truncated event tail and a process that never started. Root tests: 295 passed, 1 skipped. Ruff and diff check passed. No CODE MAP generator exists in this repository. No merge.
Reuses
digest,write_json, the existing runner/process lifecycle and provenance validator. One trace-capture helper consolidates success/failure extraction; +132 net lines including tests/docs.