Repository navigation
fix(etw): close pre-arm recovery and qualify failure boundaries - #968
Merged
Merged
Conversation
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.
The collector could exit after StartTrace but before its guard received the original handle, leaving that diagnostic session outside the guard's recovery authority. The guard now acknowledges a random per-capture GUID reservation before StartTrace. Early recovery queries the fixed name without stopping it, requires that exact reserved GUID, obtains the native handle and rechecks its identity before handle-based stop/absence verification. Foreign identities and failed queries remain unverified.
Guard/broker loss keeps main FAILED with retry blocked. Previous heartbeat samples no longer masquerade as final counters or totals after an unverified exit: maxima remain measured history, final fields are null and the observation gap is explicit. No automatic UAC capture retry, arbitrary elevated kill, name-prefix cleanup or renderer observation IPC is added.
The optional
--etw-failurespackaged profile exercises collector exit before StartTrace/guard arm, guard loss, broker loss and abrupt owned Electron main exit, followed by the existing live read-attribution/collector-crash and fresh normal capture regression. A fixed-name query-only helper independently checks presence/absence and distinguishes access denial from absence. It cannot stop a session or write an elevated output file.The seven-capture packaged profile passed at
278f075438ee7c027f1435be4721a48db4ca0049; the final follow-up changes documentation/evidence only.Portable evidence binds the tested source/tree, raw receipt/package hashes, status/counter projections and retained first build failure. All 229 packaged main/shared JS/JSON files and the native DLL matched the source/publish. A separate explicit elevated query witness passed; the access-denied trigger itself was not induced. All audit rows in all seven retained profiles were additionally checked for ETW diagnostic type/fixture admission.
Local checks: 76 native self-tests, 145 focused JS tests, typecheck, synthetic native transport, both mutation gates and derived counts pass. All five required contexts (CI) and Windows native-fixtures passed on final head
0f9f8089ce13bfe40c721d55ef4380db5c6f35a4. Local Semgrep is unavailable (ENOENT); no scanner success is claimed. The first packaging attempt raced temporary mutation files and failed before ETW; the successful run started after both gates completed, with no mutation files in its archive. Final native losses were zero in the normal capture, but 78 diagnostic ring evictions remain explicit and do not imply complete capture. Crash/unverified stage totals remain unknown.Production/path admission, protected installation, simultaneous collector/guard loss, actual sleep/wake, alternate credentials and complete read coverage remain unqualified. All work uses a separate worktree; the user's dirty primary checkout is preserved.