Repository navigation
Normalize Claude, Grok and Codex decoder events - #1046
Merged
Merged
Conversation
This was referenced Oct 22, 2026
Merged
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
Add model/tool lifecycles, messages, reported usage/cost, errors, denials, killed/interrupted work and sub-agent lifecycles. Keep existing Model evidence, diagnostics, Resume facts and final replies. Codex exposes measured turn totals separately: its exec stream has no per-request boundaries or Model records.
Closes #983
Evidence
After: the stopped-child and late-denial reproducers each passed after their fixes. Their assertions remain, with descendant isolation, partial-message usage, completed-only Codex items, late input snapshots, error envelopes, terminal metadata, and deduplicated same-call outcome amendments covered.
/usr/bin/time -p scripts/affected-tests issue-700selectedcargo nextest run: 2,235 passed, 3 skipped, across 52 binaries. Wall time 1,927.55 s (32m 07.55s) including compilation (2m 00s); nextest execution 1,802.105 s. Local timings reflect host load and build cache, not CI queue time.cargo check --bin thirdshift, finalcargo clippy --all-targets -- -D warnings, andcargo fmt --checkpassed. CI also passed on the exact pushed head4d58484.Test seams
Interpretation::decode: JSONL to ordered normalized events and existing progress/Model evidence.Interpretation::finishand existing integration scenarios: final replies, diagnostics and Resume facts remain compatible.Review coverage
Independent Standards and Spec reviews against
issue-700(cd7119f): both read all 14 changed paths and their single follow-up covered the six review-fix paths. Both Standards design findings are addressed. Spec findings S2 (stopped child calls) and S3 (late denial metadata) are fixed with their regressions retained.Remaining coverage gaps: final revisions after those follow-ups were not independently reread in
src/harness/interpretation/event.rs,src/harness/interpretation/stream/events.rs, andsrc/harness/interpretation/event_tests.rs. Those changes received the exact S3 regression and duplicate-metadata coverage plus clippy/format checks. Earlier versions of all three were reviewed. No generated-output exclusions.Unaddressed findings
Standards
None.
Spec
needs-triagewith no blocking edge. The exact supplied regression ran one test and failed because no model-call events exist. It is retained with an explicit ignore reason linked to Decide Codex per-request evidence for Session traces #1047.Event::TurnStarted/TurnEndedpreserve observed turns separately. The upstream exec schema supplies turn totals and no individual model-request boundaries or Models; a turn can contain multiple requests. This evidence explains the deferral; it does not refute the missing requirement. Choosing another evidence source/transport or amending Spec: Session traces, OTLP JSON Lines in place of Session logs #700/Normalized events from Claude, Grok and Codex #983 belongs to the Day shift. No exception to Normalized events from Claude, Grok and Codex #983 is claimed and no fabricated per-request measurements are emitted.Merge Danger
Door: two-way
Additive decoder interface; no storage migration or launch-argument change.
Blast Radius: Harnesses
Existing progress/Model evidence, diagnostics, Resume and final-message consumers continue through their current interface. Codex per-request telemetry remains incomplete as disclosed above.
Normalized-event consumers must treat
ToolCallEnded { amended: true, .. }as an authoritative outcome update for the same call, preserving its original end time and call count.Built with codex · gpt-6.1-sol · xhigh