[#82]: Add compat guard test for v0.131.0 hyphenated API headers#89
Open
delexw wants to merge 1 commit into
Open
[#82]: Add compat guard test for v0.131.0 hyphenated API headers#89delexw wants to merge 1 commit into
delexw wants to merge 1 commit into
Conversation
Codex v0.131.0 (PRs #21757, #22193) changed HTTP header names from underscore form (x_codex_session_id, x_codex_thread_id) to hyphen form (x-codex-session-id, x-codex-thread-id). codex-trace reads session IDs from JSONL payload fields (id, session_id, thread.sessionId) — not from HTTP headers. The transport-layer header rename has no impact on session parsing. Adds a regression guard test in entry.rs that: - Documents the v0.131.0 header change with PR references - Confirms session ID extraction from JSONL is unaffected - Asserts that neither underscore nor hyphen header-name strings appear as JSONL payload keys Fixes #82
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
Codex v0.131.0 (PRs #21757, #22193) changed the HTTP header names it sends to the OpenAI API from underscore form (
x_codex_session_id,x_codex_thread_id) to hyphen form (x-codex-session-id,x-codex-thread-id). The old underscored headers are no longer sent.codex-trace is not affected: it reads session and thread IDs exclusively from JSONL payload fields (
id,session_id,thread.sessionId) in the session files at~/.codex/sessions/. It does not intercept HTTP traffic or inspect HTTP request/response headers sent by the Codex CLI to OpenAI.Changes
src-tauri/src/parser/entry.rs— new testv0131_hyphenated_api_headers_do_not_affect_session_id_extraction:extract_session_idcorrectly readssession_idfrom a v0.131.0 session_meta payloadx_codex_session_idnorx-codex-session-id(nor thread variants) appear as JSONL payload keys — they are HTTP transport details onlyVerification
cargo test --lib— 132 tests pass (includes the new guard test)cargo clippy -- -D warnings— clean, no warningsnpx vitest run— 128 frontend tests pass/api/sessionsreturns valid JSONFixes #82