beads/release-gates
Jim Wordelman a690b0a8c4
fix(metrics): stop failing the reap test on a transient zombie (#6262)
* 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>
2026-09-08 18:16:35 -07:00
..
be-1gd16-wisp-delete-cascade-gate.md Fix: wisp delete never cascades to auxiliary tables (orphan row leak) (#5343) 2026-08-07 05:42:09 -07:00
be-1he-slow-path-fix-gate.md perf(dolt): eliminate 12s slow path on bd commands when .local_version is stale (#3710) 2026-07-24 00:53:06 -07:00
be-3b4e-gate.md fix(cmd/bd): label created_by as 'Created by:' instead of 'Owner:' (#5800) 2026-08-20 05:31:58 -07:00
be-3vzut-gate.md fix(metrics): stop failing the reap test on a transient zombie (#6262) 2026-09-08 18:16:35 -07:00
be-23f3-gate.md ci: PR-CI lane runs the full internal/storage/dolt suite against a live Dolt server (#5836) 2026-08-19 20:39:38 -07:00
be-39ss-cloud-auth-routing-test-speedup-gate.md Speed up TestCloudAuthCLIRouting by sharing one Dolt store across cases (#5841) 2026-08-19 08:50:39 -07:00
be-42tlj-gate.md ci: PR-CI lane runs the full internal/storage/dolt suite against a live Dolt server (#5836) 2026-08-19 20:39:38 -07:00
be-053u-check-testing-short-round2-gate.md Fix: check-testing-short.sh flags comments and misnames the offending function (round 2) (#5809) 2026-08-19 21:01:15 -07:00
be-79jh-dolt-testcontainer-ambient-port-gate.md fix(testutil): stop dolt test suites from silently opening the ambient shared server (#5837) 2026-08-19 08:54:06 -07:00
be-358n-hermetic-init-env-metrics-guard-gate.md fix: hermeticInitEnv strips metrics guards, racing detached send-metrics child against t.TempDir cleanup (#5797) 2026-08-19 20:41:15 -07:00
be-a8g61-recompute-branch-pin-gate.md fix(dolt): pin recompute connections to the store's actual branch (#5848) 2026-08-19 12:44:06 -07:00
be-al8j-dolt-sql-argv-e2big-gate.md Fix E2BIG when runDoltSQL passes large schema SQL as a single argv (#5846) 2026-08-19 08:51:07 -07:00
be-c5p-firewall-gate.md feat(storage): refuse test DBs on production dolt servers (AD-01) (#3632) 2026-07-24 01:28:51 -07:00
be-cfm3z-dolt-bench-leak-gate.md fix(bench): stop dolt benchmarks from leaking test databases onto shared servers (#5029) 2026-07-25 15:40:54 -07:00
be-dy66n-gate.md Phase 1: additive schema + migration slot claim for versioned beads (#6134) (#6304) 2026-09-08 12:47:10 -07:00
be-gd3v-serverport-precedence-gate.md fix(dolt): explicit ServerPort must outrank ambient BEADS_DOLT_SERVER_PORT env var (#5835) 2026-08-20 05:43:57 -07:00
be-km2kg-blocked-recompute-guard-gate.md fix(dolt): hermetic peer-branch naming in TestMergeRecomputesIsBlocked (#5879) 2026-08-20 06:13:40 -07:00
be-krza3-schema-parity-pool-heal-gate.md Fix: CLI/runtime schema parity oracle ignored-column handling + pool-heal cherry-pick (be-krza3) (#5878) 2026-08-20 06:35:53 -07:00
be-nnqp-be-4b63-gate.md feat(stats): --no-blocked flag skips blocked-count computation; fix Blocked:0 red render (be-nnqp, be-4b63) (#4022) 2026-07-23 23:52:39 -07:00
be-pp7e-gate.md ci: PR-CI lane runs the full internal/storage/dolt suite against a live Dolt server (#5836) 2026-08-19 20:39:38 -07:00
be-r3ysh-testmain-dead-teardown-gate.md fix: TestMain teardown was dead code after os.Exit — 101 dolt containers leaked over 6 days (#5876) 2026-08-20 06:06:32 -07:00
be-sr7a-gate.md fix(cmd/bd): restore os.Stdout via deferred idempotent restore so capture helpers survive t.Fatal (#5803) 2026-08-19 21:01:06 -07:00
be-tqwx-schema-migrations-pool-poison-gate.md docs(release-gates): annotate be-tqwx gate record with be-mv0ww correction note (be-mv0ww.2) (#5890) 2026-09-02 18:04:11 -07:00
be-u8ldr-multiprocess-schema-init-gate.md fix(dolt): remove dead decoy-listener test code, use retry-safe schema init under 10-way contention (#5880) 2026-08-20 06:31:01 -07:00
be-u8o4-semaphore-flake-fix-gate.md fix(httpapi): remove flaky race in TestSemaphoreShedsLoadInsteadOfQueueingForever (#5808) 2026-08-19 21:01:10 -07:00
be-vc1m-purge-dropped-database-gate.md fix(dolt): purge dropped databases in bench-store cleanup, with a regression gate (#5792) 2026-08-24 14:05:03 -07:00
be-x42v-max-rows-gate.md test(cli,storage): BEADS_MAX_ROWS behavioral + opt-out gate tests (be-x42v) (#4160) 2026-07-24 01:40:36 -07:00
be-y1jo-dolt-diff-export-gate.md perf(export): incremental auto-export via dolt_diff (#5806) 2026-08-22 06:49:19 -07:00
be-yjp4z-viper-singleton-test-isolation-gate.md fix(test): viper singleton state leak across cmd/bd test runs (#5194) 2026-07-31 12:48:55 -07:00
ga-7psli2-3-1-baseline-cmd-bd-fix-gate.md test(cmd/bd): clear baseline gate blockers (#4345) 2026-07-24 01:52:38 -07:00
v1.2.2-recovery-release-gate.md chore(release): forward-port v1.2.2 to main (version record, retracts, recovery guide, gate record) (#5782) 2026-08-14 21:45:02 -07:00