Repository navigation
Make updater reservation and selection timing tests deterministic - #1199
Conversation
There was a problem hiding this comment.
ℹ️ No blocking issues. One test coverage gap below.
Approach
Process and filesystem signals establish fixture state, and controlled clocks make the retry assertions independent of runner speed.
Reviewed changes
- Reservation and readiness. The lock holder signals acquisition over a pipe, child tests wait for published markers, and selection tests check the saved state across supervisor restarts.
- Health and registry. The health bind deadline uses Tokio time, and the tests exercise busy-port expiry, cancellation, rebind, and truncated registry responses.
- Auth holds and writer receipts. Tests measure auth holds from the recorded rejection and keep the diagnostic clock fixed while the older writer defers
RecordandClearand the managed child reports readiness.
All 187 updater tests and cargo fmt --all -- --check passed on 3359d2d.
Non-blocking
- The older-writer test bypasses the scheduled
Clearretry. It advances the clock toatand checkswaiting(), then overwritesAfter(at)withReadybefore callingtick_control(). Tick once atatwith the existing managed child already ready andAfter(at)still in place, then assert one additional diagnostic request. That covers expiry through the supervisor and avoids counting the freshClearissued when a new child reports readiness. Older-writer retry test
gpt-6.2-sol | 𝕏
03ec695
|
Fixed in 03ec695. The already-ready child now runs |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed 03ec695, the follow-up to the prior Pullfrog review.
- Exercised the scheduled
Clearretry. The test keeps the same ready child and ticks the supervisor one nanosecond before the saved deadline and again at the deadline. The writer fixture observes zero additional diagnostic requests on the first tick and exactly one on the second.
The focused older-writer regression and cargo fmt --all -- --check passed on 03ec695.
gpt-6.2-sol | 𝕏

Part of #666. Fifteen updater tests now check file-lock ownership, health-bind retry, readiness and saved selections against observable fixture state. Health-bind retry uses Tokio's monotonic clock for both its deadline and its sleep, so the busy-port test can exercise expiry and cancellation with paused time.
The older-writer test keeps its receipt clock fixed while it verifies that an unsupported diagnostic stays deferred and the managed child still reports readiness. With the same child already ready, the supervisor ticks a nanosecond before the stored retry deadline and again at the deadline. The writer receives exactly one additional diagnostic request, on the second tick. Suppressing this retry passed the old test and failed the new one.
Verification
Tested together with #1198, the two PRs merge cleanly into tree
a5e71a3b61cefc388b0f472960868d7aa0035d32. On that exact tree, pinned Dylint passed across the full workspace with zero test-flake diagnostics, and all 187 updater package tests passed.Summary by Sourcery
Make updater reservation, retry, readiness, and selection tests deterministic by asserting against observable state and controlled timing.
Enhancements:
Tests: