Files
Bo c338e0086e fix(subprocess): align the test wait budget with production and make the binding PASS chain durable
Closes W1 and W2 against the frozen intent in
go-g0-g2-landing-readiness-repair-intent.md. W3 stays an integration-only
obligation and is deliberately not resolved here. Production behaviour change:
none.

W1 - the test budget was one fifth of production.

The three WaitDelay sites in run_unix_test.go pinned 100ms while production uses
defaultWaitDelay = 500ms, so the tests asserted SIGKILL propagation plus pipe
drain inside a fifth of the real budget. They now reference defaultWaitDelay
directly rather than a second literal, so the two cannot drift apart again. No
production file changes and defaultWaitDelay keeps its value. The two elapsed
assertions in those tests bound at 2s, which leaves 4x headroom over 500ms.

Mutation lethality re-proven after the change, against the focused suite in
disposable copies with a green unmutated control first:

  never escalate to SIGKILL          killed (3 behavioural failures)
  defaultWaitDelay -> 0              killed (9 behavioural failures)
  never report a lingering group     killed (3 behavioural failures)
  SURVIVORS                          0

The third was confirmed to be a real test failure rather than a compile error.

Stability: six 50x shuffled runs of the focused suite under deliberate
contention - CPU spinners plus process-table churn plus I/O. The three repaired
tests appear in ZERO failures. One run did fail, and it is disclosed rather than
buried: TestRunDarwinFastExitUnderLoad, a DIFFERENT test that already used the
production 500ms budget, at a load average near 438 on 10 cores - roughly twenty
times the contention that produced the original report. Aligning the test bound
fixed the three tight tests; it does not make the suite immune at pathological
load, and that is recorded as a new residual rather than claimed as closed.

W2 - the PASS chain was erasable.

.gitignore excludes /.agents/ao/* except config.yaml, leaving both binding
verdicts and everything they reference untracked - the FAIL lineage durable and
the PASS that would authorize landing not. A tracked bundle now holds 32
byte-identical artifacts: both verdicts, two intent snapshots, the four
manifest/scope/effect refs, and all 24 check receipts.

manifest.json carries the content-addressed mapping. The original bytes are NOT
edited - rewriting the internal .agents/ao refs would break aef3a8a3 and
fadb23c2 - so the mapping supplies resolution instead, and the originals are
left in place untouched.

Two layout facts are recorded rather than papered over. First, the bundle uses
report-artifacts/ instead of reports/: .gitignore:44 carries a bare `reports/`
rule that matches at ANY depth, and the first attempt silently left 28 of 33
copies untracked with a manifest pointing at paths that were not in the tree -
exactly the broken-reference failure GLR-4 forbids. Second, the manifest
distinguishes what is NOT a reference: the exclusions[] field of the before/end
manifests lists .agents/ao/{intents,reports,verdicts} as subject-manifest
exclusion PATTERNS, not evidence refs, so they are neither bundled nor resolved.

One further exemption: .agents/ao/config.yaml
appears inside the before/end subject manifests. It is the single un-ignored
file under .agents/ao and appears there as an ordinary tracked repository entry,
not as an evidence reference, so it resolves at its original path and is
deliberately not bundled. Verified: 32/32 byte-identical, both verdicts
recompute canonically FROM THE BUNDLED COPIES, and zero broken references.

Verified on this tree: build, vet, pinned lint v2.11.4 (0 issues), go mod
tidy -diff, go mod verify, full race+shuffle 3381 tests in 71 packages with 0
races, and darwin/linux/windows amd64 vet plus cross-compile - all rc=0.

Claude-Session: https://claude.ai/code/session_018rWfFeZb4bKCJzxwKDYaFc
2026-07-25 12:20:58 -04:00
..