* fix(metrics): stop failing the reap test on a transient zombie
startDetached (spawn.go) reaps asynchronously via `go func() { cmd.Wait() }()`,
which is correct: GH#5900's fix already reaps every child, just not
synchronously. Between a child's exit and that goroutine's waitpid, `ps`
briefly reports it as STAT=Z -- the normal kernel process-table lag, not
a leak.
The test's in-loop check faulted the instant it saw "Z" in ps output, so it
was failing on the transient window itself rather than on a child that
actually stays a zombie. Measured on clean main under 32 busy loops (40
probe runs): zombie observed 12/40, never-reaped 0/40, window 5.0-23.4ms --
wider than the loop's own 20ms poll spacing, so the false positive was
guaranteed to land sometimes. Reproduced at ~14% (13/90 failures) building
`go test -c ./internal/metrics` and running under nproc busy loops, matching
the exact failure text seen in CI.
Remove the in-loop check and stop binding its now-unused `st`. The
post-loop 3s-deadline assertion already covers the real regression: a
child that STAYS a zombie keeps `alive` true, so the loop spins to the
deadline and fails there instead. Verified that path still works by
temporarily swapping startDetached's Wait goroutine for the old
`cmd.Process.Release()` (pre-GH#5900) reap -- the test fails 3/3 with
"still present after 3s" -- then reverting.
Before: 13/90 failures under load. After: 0/90.
Agent-Signature: claude-code-claude-sonnet-5-unknown-reasoning on behalf of Jim Wordelman
* docs(release-gates): PASS 7/7 — be-3vzut (transient zombie flake in TestStartDetachedReapsExitedChild)
Independently re-verified review bead be-5gizx's evidence for the fix
built in be-kh65q (root-caused by investigator bead be-heifp's PR #6147
triage): full-suite make test re-run at the deploy SHA (6348 PASS/0
FAIL/2104 SKIP, all SKIPs pre-existing Dolt/embedded/proxied opt-in
gates), diff-owned test independently isolated and confirmed PASS,
regression-catch re-verified (3/3 fail on reintroduced bug, 0/90 under
load after fix vs 13/90 before), gofmt/vet clean, 0 divergence from
origin/main. Criterion 7 (ancestry scope) carries a bounded mayor
waiver (gm-wisp-9mtr84) — see the gate file for full reasoning.
Agent-Signature: claude-code-claude-sonnet-5-unknown-reasoning on behalf of Jim Wordelman
* docs(release-gates): record opened PR #6262 for be-3vzut
Agent-Signature: claude-code-claude-sonnet-5-unknown-reasoning on behalf of Jim Wordelman
* docs(metrics): reword reap-test doc comment to persistence framing
The function doc comment still asserted the absolute invariant this PR
repudiates -- "startDetached must reap it so `ps` never reports STAT Z
under this process" -- which contradicted the new in-loop comment and
invited a future maintainer to re-add the removed in-loop Z fatal,
reintroducing the flake. Reword to the persistence framing already used
by startDetached's own doc comment (spawn.go:210-211, "never left as Z
under this process") and state explicitly that a transient Z is the
normal reaped-child path.
Comment-only; no behavior change. Review fix for the sole actionable
finding in the #6262 review synthesis (minor, claude+gemini).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Eddie the Engineer <julianknutsen@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>