Skip to content

test(doctor): forward the caller's clock into doctor --live - #465

Merged
edgehero merged 1 commit into
mainfrom
fix/doctor-live-clock-seams
Sep 28, 2026
Merged

edgehero merged 1 commit into
mainfrom
fix/doctor-live-clock-seams

Conversation

@edgehero

Copy link
Copy Markdown
Owner

The pinned docker canary output in worker/test/doctor.test.mjs ("docker's egress canary prints and spawns exactly what it did...", #431) failed about one run in six under load, on CI and locally: it pins "in 0 ms and 0 ms", and the measurement read "1 ms".

Root cause: runDoctor destructured its seams without now and delay, so the test's injected clock never reached runLiveProbes, and --live timed its probe removals on the real clock. runDoctor now forwards both to the --live seams. No production behaviour changes: production passes neither, and the real clock is the default.

Twelve parallel runs of doctor.test.mjs: 12 green with the forward, 1 red of 12 without it.

This unblocks the open round PRs, whose required check hit this flake.

runDoctor destructured its seams without `now` and `delay`, so a test's
injected clock never reached runLiveProbes and --live timed its probe
removals on the real clock. The pinned docker canary output carries
"in 0 ms and 0 ms", which read "1 ms" whenever a fake removal took a
millisecond under load: the pin failed about one run in six on CI and
locally with parallel suites. runDoctor now forwards both to the
--live seams. Twelve parallel runs of doctor.test.mjs: 12 green with
the forward, 1 red of 12 without it.

Signed-off-by: Rob Boerman <robboerman@live.nl>
@edgehero
edgehero merged commit 2df38ff into main Sep 28, 2026
7 checks passed
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