fix(tribunal): recover Codex reviewer token usage#358
Closed
SUaDtL wants to merge 1 commit into
Closed
Conversation
Codex dispatch results omit usage, leaving tribunal actuals blank. Recover the latest cumulative receipt from the exact local agent session and keep unsupported, missing, malformed, or bounded inputs explicit and fail-soft. CHANGELOG: Tribunal reports now record Codex reviewer usage or an explicit unavailable reason. Closes #311
This was referenced Jul 20, 2026
Collaborator
Author
|
Superseded by #313, the single hackathon review surface. This PR's recorded head and changes are represented in #313's exact 16-PR / 29-commit / 126-path source manifest. PR #313 passed final exact-head CI at commit 6173b1d and remains open and unmerged. Closing this source PR to avoid parallel review; please continue review and discussion on #313. |
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
Why
Codex dispatch results do not include usage, which left tribunal actuals blank. The best exact-thread source is local session telemetry, but its JSONL format is not stable. This isolates parsing behind a fail-soft helper and makes format drift explicit instead of silently reporting no actuals.
Verification
python -m unittest plugins.ca.hooks.tests.test_codex_tribunal_usage -v(22 passed).github/scripts/test_*.pysuitespython tools/build-surface.py --checkpython .github/scripts/check-plugin-refs.pyTradeoff
The local session format is an unstable host detail. The helper treats it as best-effort, reads only metadata and cumulative usage events, applies strict bounds and path confinement, and returns fixed unavailable states instead of blocking the tribunal.
Closes #311
Issue #312 remains the separate follow-up for broader transcript recovery on the other host.