Skip to main content
← Back to list
01Issue
BugOpenSwamp CLIPublic
AssigneesNone

Relationships

#3953 datastore_v3_replica_verify_test stall case flakes under the full integration run: restore.pid is read before the stub writes it

Opened by stack72 · 10/26/2026

What happened

Running all of integration/ (deno run test integration/) on main at 7a81344 failed one test: the case named for a restore that stalls past the deadline ending the check without a verdict (swamp-club#3935), in integration/datastore_v3_replica_verify_test.ts.

Error: NotFound: No such file or directory (os error 2): readfile /private/tmp/swamp-verify-stall-/restore.pid

The same file passes three runs in a row on its own.

Why

The test writes a stub litestream shell script that records its own pid into restore.pid and then execs sleep. verifyReplica runs with deadlineMs: 300. Under a loaded parallel run the deadline can fire and kill the stub before the shell has written the pid file, so the readTextFile of restore.pid that follows assertRejects throws NotFound.

Suggested fix

Wait for restore.pid to exist (waitFor from swamp-testing) before reading it, or treat a missing pid file as the restore having been killed before it started. Raising the deadline only narrows the window.

Found while verifying swamp-club#3951; unrelated to that change.

02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

10/26/2026, 1:13:11 AM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.