Skip to content

fix(etw): close pre-arm recovery and qualify failure boundaries - #968

Merged
antropos17 merged 2 commits into
masterfrom
codex/etw-failure-boundaries-20261018
Oct 18, 2026
Merged

antropos17 merged 2 commits into
masterfrom
codex/etw-failure-boundaries-20261018

Conversation

@antropos17

@antropos17 antropos17 commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

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-failures packaged 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.

Fault Actual packaged result
Collector before StartTrace Guard confirms absence (4201), counters unknown, broker exit 4
Collector after StartTrace/before arm Reserved GUID/handle cleanup verified, broker exit 4
Guard exit Session/helper closure observed independently; main remains FAILED, retry blocked, final counters/totals null
Broker exit 72 Same conservative FAILED/retry-blocked result and independently observed absence
Abrupt Electron exit 73 Owned app/helpers close, session absent
Existing post-ready collector crash Guard recovery and actual sync/pending-overlapped issuer proof pass
Fresh normal capture Actual issuer proof and normally acknowledged stop/broker exit 0 pass

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.

@antropos17
antropos17 marked this pull request as ready for review October 18, 2026 10:44
@antropos17
antropos17 merged commit 28cd4cc into master Oct 18, 2026
6 checks passed
@antropos17
antropos17 deleted the codex/etw-failure-boundaries-20261018 branch October 18, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant