test(runtime-host): attribute Windows startup stalls - #3454
Open
liugddx wants to merge 1 commit into
Open
Conversation
Generated-by: Codex
liugddx
marked this pull request as ready for review
August 21, 2026 23:54
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
Adds bounded structured evidence to Runtime Host election timeout failures and a repeatable Windows fresh-root startup stress entry point.
The diagnostic distinguishes the observed startup cut with the exact Candidate PID/attempt identity and exit state, the final election elapsed time, endpoint-connected observation, fixed observation counters, and the last safe registration summary. Desktop and CLI startup errors include the same structured JSON.
This is diagnostic-only. It does not change the 45-second election deadline, retry/respawn policy, candidate backoff, endpoint behavior, public wire protocol, or existing failure classification.
Refs #3279.
Diagnostic boundary
stdio: 'ignore'. This PR does not claim to capture child stderr.sawEndpointConnectedand the observation counters are election observations plus final elapsed time, not exact endpoint publication/phase timestamps.Capturing child stderr, adding detailed phase timestamps, or changing startup policy remains deferred until this evidence classifies another real failure.
Stress harness
npm run stress:windows-runtime-host-startup -- <iterations> <parallel> <electionDeadlineMs> <settleTimeoutMs> [keep-failures]The runner creates an isolated root per iteration, emits NDJSON for every iteration plus a summary, coalesces ownership of the exact Candidate attempt, and settles that attempt before removing the root. A rejected spawn is reported as election failure evidence rather than overriding the iteration in cleanup; resolved-attempt settlement errors still propagate.
Verification
L1/L2 on exact head
b2315f21eec3076592d86643d492c6e7f5e70183:npm run lint: 2,472 files, 0 errorsnpm run format:check: 1,554 files, 0 changesgit diff --checkpassedWindows dynamic evidence on this exact head:
Local limitation: an unrelated full Runtime Host suite process was already stalled on this machine, so the authoritative merged-base full-suite evidence is core CI rather than another local full-suite run.
L3 on the merged result:
Remaining work
Fresh merged-base and packaged Windows CI are green; the PR is ready for review.
AI use
Select exactly one:
Tool(s) and scope: Codex implemented the bounded diagnostic and stress harness, added focused regression coverage, ran local verification, and used an independent review agent for the author gate. The commit includes a
Generated-by: Codextrailer.Checklist
Does this PR entail a change in behavior?