mac gate test: wait for the marker before verifying
TestGateVerifyByMarkerAlone failed twice on cold hosted runs with "marked process survived". Start returns once the child begins its exec; the kernel shows the new environment a moment later. On a loaded machine Verify looked in between, found no marked process and settled.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2 files changed,
+18
−3
docs/superpowers/plans/HOSTED-CI-PROGRESS.md+7 −3internal/runner/mac/gate_test.go+11 −0
CI passed — run details
diff --git a/docs/superpowers/plans/HOSTED-CI-PROGRESS.md b/docs/superpowers/plans/HOSTED-CI-PROGRESS.md| index c9497bd9..cd193534 100644 |
| --- a/docs/superpowers/plans/HOSTED-CI-PROGRESS.md |
| +++ b/docs/superpowers/plans/HOSTED-CI-PROGRESS.md |
| @@ -150,9 +150,13 @@ the cache. |
| variable once a week of hosted times says the budgets hold. |
| - `provider_account_containment` in directlive when two of its lanes run |
| side by side: cause unknown, worked around by keeping it one lane. |
| -- Two tests failed once each under the load of the uncompiled 23 shard |
| - run and not since: TestGateVerifyByMarkerAlone (runner/mac) and |
| - TestCoordinatorRecoveryCallRefusalKeepsServing (runner). |
| +- TestGateVerifyByMarkerAlone (runner/mac) failed twice on cold, loaded |
| + runs: the test started a marked process and Verify looked before the |
| + kernel showed the new environment, so it settled with the process |
| + alive. The test now waits for the marker. The same window exists for a |
| + real marked process caught in the middle of its exec; not changed here. |
| +- TestCoordinatorRecoveryCallRefusalKeepsServing (runner) failed once |
| + under the load of the uncompiled 23 shard run and not since. |
| - The image is pinned by digest and pulled from the public ECR mirror of |
| Docker Hub each job (8 s). The pinned programs come from GitHub, |
| downloads.claude.ai and snapshot.debian.org each job (4 s). |
diff --git a/internal/runner/mac/gate_test.go b/internal/runner/mac/gate_test.go| index e5fac5c9..e37a68fe 100644 |
| --- a/internal/runner/mac/gate_test.go |
| +++ b/internal/runner/mac/gate_test.go |
| @@ -313,6 +313,17 @@ func TestGateVerifyByMarkerAlone(t *testing.T) { |
| } |
| waited := make(chan error, 1) |
| go func() { waited <- c.Wait() }() |
| + // Start returns once the child has begun its exec, and the kernel shows |
| + // the new environment a moment later. On a loaded machine Verify could |
| + // look in between, see no marked process and settle: wait for the marker. |
| + for deadline := time.Now().Add(5 * time.Second); ; time.Sleep(5 * time.Millisecond) { |
| + if marked, _ := Marked("checks-i-1"); len(marked) != 0 { |
| + break |
| + } |
| + if time.Now().After(deadline) { |
| + t.Fatal("the marked process never showed its marker") |
| + } |
| + } |
| if !g.Verify(RecordID(0, "checks-i-1")) { |
| t.Fatal("marker-only record not settled") |
| } |