Skip to content

fix(transcript): record the codex session model from turn_context - #499

Open
Yurii214 wants to merge 1 commit into
vouchdev:testfrom
Yurii214:fix/codex-transcript-model
Open

fix(transcript): record the codex session model from turn_context#499
Yurii214 wants to merge 1 commit into
vouchdev:testfrom
Yurii214:fix/codex-transcript-model

Conversation

@Yurii214

@Yurii214 Yurii214 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

parse_codex_transcript populated session.model from nowhere — it only handled session_meta, which carries cwd, branch and timestamps but not the model. codex records the turn's model on a separate turn_context record, so the normalized transcript's session.model was always None for codex, while parse_claude_transcript fills it from the assistant message.

this reads the model off turn_context (first non-empty wins, since the model can change across turns), so both agents expose the session model symmetrically. no other field is touched.

verified: pytest tests/, mypy src, ruff check src tests all green. the codex transcript test now asserts the model is extracted.

Summary by CodeRabbit

  • Bug Fixes
    • Improved Codex transcript parsing to accurately identify and record the model used during a session.
    • Model information is now captured from turn-level context when available, improving session attribution.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c7397406-a40b-4bde-9a7a-36c537e3811c

📥 Commits

Reviewing files that changed from the base of the PR and between bfb6b0a and d8e954f.

📒 Files selected for processing (2)
  • src/vouch/transcript.py
  • tests/test_session_transcript.py

Walkthrough

Codex transcript normalization now reads the session model from the first non-empty turn_context payload when unset. The Codex fixture and parser test verify attribution as gpt-5-codex.

Changes

Codex model attribution

Layer / File(s) Summary
Parse and validate turn-context models
src/vouch/transcript.py, tests/test_session_transcript.py
parse_codex_transcript extracts an unset session model from non-empty turn_context data, and the test fixture and assertion validate gpt-5-codex.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: plind-junior

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: recording the Codex session model from turn_context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added tests tests and fixtures size: XS less than 50 changed non-doc lines dual-solve dual-solve orchestration labels Jul 16, 2026
@Yurii214
Yurii214 force-pushed the fix/codex-transcript-model branch from 3a7f7ae to 1d88d8b Compare July 16, 2026 03:04
@github-actions github-actions Bot removed the dual-solve dual-solve orchestration label Jul 16, 2026
@Yurii214
Yurii214 force-pushed the fix/codex-transcript-model branch from 1d88d8b to 92cb630 Compare July 16, 2026 03:12
parse_codex_transcript only read session_meta, which carries cwd, branch and
timestamps but not the model — codex puts the turn model on the turn_context
record. so the normalized transcript's session model was always none for
codex, while the claude parser fills it from the assistant message. read the
model off turn_context (first non-empty wins) so both agents expose it.
@Yurii214
Yurii214 force-pushed the fix/codex-transcript-model branch from 92cb630 to d8e954f Compare July 16, 2026 17:28
@Yurii214

Copy link
Copy Markdown
Contributor Author

Hi @plind-junior — friendly heads-up on this one: it's fully green (tests pass on py3.11/3.12/3.13 and CodeRabbit approved the change), but it can't auto-merge because the coderabbit-gate job 403s when it tries to post the coderabbit-approved status from a fork PR — the exact problem tracked in #511 — so the required check stays red even though the review passed.

Since posting that status / merging past it needs owner permissions, would you be able to merge this manually when you get a chance? It's a small, self-contained fix (codex transcripts drop session.model because the model is recorded on turn_context, not session_meta, so the claude parser fills it and the codex one didn't). Happy to rebase onto the latest test first if that's easier. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XS less than 50 changed non-doc lines tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants