feat(codex): add Codex session transcript adapter support#816
feat(codex): add Codex session transcript adapter support#816rehan6025 wants to merge 5 commits into
Conversation
|
✅ Health: 7.6 (unchanged) 📋 At a glance
📊 Full report · ⭐ Star Repowise · 📥 Install bot · Last updated 2026-07-15 10:54 UTC |
|
Thanks for this @rehan6025, the adapter is wired in cleanly and the seam is right. One blocking issue and a few smaller things. Blocking: discover() returns nothing in real usage, and the discover test fails. The last commit switched to a non-recursive glob: return sorted(path for path in root.glob("*.jsonl") if path.is_file()) But Codex writes rollouts into a date-nested tree (~/.codex/sessions/YYYY/MM/DD/*.jsonl), which the module docstring and #785 both call out. A non-recursive *.jsonl only matches files sitting directly under sessions/, so it finds nothing in the real layout and no transcripts ever reach the miners. I ran the branch to confirm. test_discover_lists_jsonl_sorted creates nested files and currently fails: tests/unit/sessions/test_codex_adapter.py::test_discover_lists_jsonl_sorted FAILED So the "pytest passes" box isn't accurate on the current head. Switching to root.rglob("*.jsonl") fixes both the real-world discovery and the test. Worth double checking whatever motivated the non-recursive change, since it goes against the documented Codex layout. Fixture isn't real-shaped. tests/unit/sessions/data/codex_session.jsonl uses an invented flat shape (top-level type: "assistant", top-level text and tool_calls[]). Real Codex rollouts, which _fill_response_item and _event_kind are actually built for, use session_meta / response_item / event_msg with a nested payload. The inline test does exercise the real shapes, so the code path is covered, but #785 specifically asks for a real-shaped fixture and to confirm the format first. Suggest replacing the fixture with an actual multi-line rollout. No miner-level test. #785's "done when" includes the decisions and demand miners producing non-empty output on a fixture with the relevant tool calls. Right now the tests only check normalize() field mapping. Since tool-name normalization is the load-bearing part, one end-to-end test through a miner would guard against regressions the field checks miss. Smaller stuff:
The tool-name aliases line up with what the demand miner keys on, so that part looks good. The recursive-glob fix is the one that has to land; the rest is follow-up. |
|
Thanks for the detailed review! I'll address the recursive discovery issue and work through the remaining feedback, then push an update. |
Summary
Related Issues
Test Plan
pytest)ruff check .)npm run build) (if frontend changes)Checklist