P2 redesign Phase 5 — prune/check/unlock + maintenance ticker + repo stats + pending-runs queue #3

Merged
steve merged 37 commits from p2r-phase5-maintenance into main 2026-05-04 10:25:02 +01:00
Showing only changes of commit bc02fcb498 - Show all commits
+6 -1
View File
@@ -145,7 +145,12 @@ func TestDrainPendingDispatchesOnReconnect(t *testing.T) {
t.Errorf("backup tag: %q", got.Tag)
}
// Pending row should be gone.
// Pending row should be gone. Poll briefly: the drain goroutine
// sends command.run via conn.Send and only then calls
// DeletePendingRun. Reading the envelope off the wire above proves
// the send happened, but the delete runs after that on the drain
// goroutine — small window where the count is still 1.
waitForPendingCount(t, st, hostID, 0, 2*time.Second)
if n := countPendingForHost(t, st, hostID); n != 0 {
t.Errorf("pending rows after drain: got %d, want 0", n)
}