Repository navigation
fix: turn CI on main green (unprotected record race, stale Strata fixture) - #269
Merged
Merged
Conversation
When berthd went away mid-run, the listener wrote an unprotected-run record and then waited to re-attach. If the engine exited in that wait, Run returned before the listener removed the record. A test that removed its temp dir right after Run returned failed with "directory not empty", which turned CI red on main after the v0.4.0 merge. Run now hangs up the first connection when the engine exits and waits for the listener to finish before it returns.
The test pinned its requests to 2026-10-28 21:35 MDT. The watcher keeps 24 hours of requests, so from 2026-10-30 03:35 UTC it dropped both rows and the test failed on every branch. The fixture now sits an hour before the test runs, with the same zone and microseconds.
T-Crypt
added a commit
that referenced
this pull request
Oct 30, 2026
Merge main into next: v0.4.0 and the CI fixes from #269
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI on
mainis red, and two tests cause it.1.
TestParkedEngineReattachesParked: a record left behindRun 40968557417 failed after the v0.4.0 merge. The test passed, then its temp dir cleanup failed with this error:
When berthd goes away mid-run, the
berth runlistener writes a record toberth-unprotected/and waits to re-attach. If the engine exits during that wait,Runclosesdoneand returns right away. The listener removes the record a moment later, on its own goroutine. In the test, the daemon stops before the engine is killed, soRemoveAllsometimes ran inside that window.Runnow hangs up its first connection when the engine exits, as it already does for a re-attached connection. It then waits for the listener goroutine to return before it returns itself. The listener can block only on calls that end when the engine exits or that time out (lendCallTimeout), so the wait cannot hang.TestRunReturnsWithItsLostRecordGonestops the daemon, waits for the record, kills the engine, and checks thatberth-unprotected/is empty onceRunreturns. Before the fix, it failed 12 of 20 runs withrecords left after Run returned: [<pid>.json]. After the fix, it andTestParkedEngineReattachesParkedpassed 20 of 20 runs each.2.
TestStrataRequestsReachTheLeaderboard: a fixture past the 24h windowThe test pinned its requests to 2026-10-28 21:35 MDT. The engine watcher keeps 24 hours of requests (
keepRequests), so from 2026-10-30 03:35 UTC it drops both rows. The test fails onmain, onnext, and on every open PR, #221 included. The fixture now sits an hour before the test runs, with the same MDT zone and microseconds. It passes withTZset to UTC, America/Denver and Asia/Kolkata.Proof
go build,gofmt,go vet, the Windows build and vet, golangci-lint v2.14.0 (0 issues) andgo test -count=1 ./...all pass locally. The-count=1matters here. A cached run reported the Strata test as passing after it had started to fail.nextneeds the same two changes. I'll mergemainintonextafter this lands.