Repository navigation
fix(etw): preserve first-read attribution across idle renewal - #986
Merged
Merged
Conversation
This was referenced Oct 19, 2026
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.
An idle agent's first read can wait in the ETW queue while issuer preparation runs first. Reopening its live thread/process handles at renewal moved the proof interval forward and could leave that queued read without a verified actor. Renewal now retains the original OS handles and interval after fresh owner, birth and liveness checks. New workers at capacity also no longer skip renewal of existing workers later in the bounded inventory. Missing refresh still expires the lease, replacement handles cannot verify older events, and reads never renew the lease.
The native regression fails against the old implementation and passes with the fix. A clean ordinary Windows x64 package passed genuine installed Claude Code first reads after 65, 70 and 85 seconds, without README warmup. The original handles covered 68.591, 74.308 and 89.627 seconds before the respective reads. Each case verified the exact OS agent identity, visible action/potential risk, content exclusion, normal exit, native stop and independent session absence. The runner now requires a native held interval exceeding thirty seconds, so a fresh replacement interval cannot qualify this scenario.
Qualification and check receipts bind the source, complete normal-package manifest, published native binary and three live journeys. The earlier ordinary-package attribution FAIL remains unchanged: four instrumented baseline attempts passed, so this repair proves the renewal race and corrected behavior without claiming the unique cause of that historical intermittent failure. Collector drops and mapping resets remain recorded; new or unprepared workers can still be unverified. These passes do not establish complete capture.
Validation: 126 published native self-tests; 87 focused oracle/ETW regression tests; full Windows coverage suite (10,000 passed, 20 skipped); renderer build, formatting, lint, types/Svelte, witness and sequence mutation gates, derived counts and production dependency audit. Documentation-only evidence changes follow the qualified package commit; packaged runtime inputs are unchanged.