Skip to content

test(app): run-cancel worktree test waits for the launch claim to be released - #438

Merged
danielhanold merged 2 commits into
mainfrom
chore/flaky-and-failing-tests-standing-bucket
Oct 20, 2026
Merged

danielhanold merged 2 commits into
mainfrom
chore/flaky-and-failing-tests-standing-bucket

Conversation

@danielhanold

@danielhanold danielhanold commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

↩ Change 0569 — Fix the flaky run-cancel worktree test

Docket change 0569. Test-only.

TestIntegrationRunCancelFreesWorktreeForNextStart cancelled as soon as the suite's manifest said running. The launcher (launchScopeless) still holds the drive's launch claim at that point, through attachLaunch, until claim.close(). A cancel in that gap correctly reports cancellation-pending / claim-busy (ADR-0132). Under the parallel suite the gap widens and the test flakes.

The test now waits, with a bounded deadline and short poll, until the production read-only launch census reports run-live:<drive> and no claim-busy:<drive>, and only then cancels. Every assert is unchanged, and no production code changed.

Proof: with a temporary 400 ms delay before claim.close() (never committed), the old test went red (cancellation-pending, claim-busy) and the fixed test stayed green. Without the delay, the fixed test passed 50 of 50 runs (-tags integration -count=50). A repo-wide sweep found no other test with the same shape. The full suite is green at the build gate.

Review

Finding Severity Disposition
(none, standard-tier review was clean)

@danielhanold
danielhanold merged commit da1f573 into main Oct 20, 2026
7 checks passed
@danielhanold
danielhanold deleted the chore/flaky-and-failing-tests-standing-bucket branch October 20, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant