Repository navigation
Conversation
ianw-oai
added a commit
that referenced
this pull request
Oct 19, 2026
Adapt the closed-turn coverage checks and regression cases from #1759 to the rebased collector. Keep open-turn warnings and completion-turn handoff behavior.
3 tasks done
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
A later successful turn can hide an earlier interrupted turn or a completed turn with no usage record. Preserve those per-turn coverage gaps so the collector doesn't report the session as fully accounted for.
Changes
Track closed and measured turns and retain an interruption warning across subsequent turns. For example, a synthetic aborted turn followed by a measured successful turn retains
turn_interrupted; a completed turn without usage followed by a measured successful turn still reports missing usage. Token totals and scan execution behavior are unchanged.This complements #1640, which covers empty and open sessions, and #1657, which improves recovery of available usage records. Warnings cannot recover records absent from the local event stream or prove complete telemetry.
Testing
tests/test_finalize_scan_contract.pyis 150,043 bytes against a 150,000-byte limit (same size in the base commit).Risk and rollout
The change affects collector coverage warnings; it does not alter scan execution. Existing consumers may see warnings for sessions previously reported as complete.
Public disclosure review