Files
orca/src
Neil c2b4819ec0 fix(wsl): re-read a settled exit only from a probe started after the window (#34374)
* fix(wsl): start no running-distro read inside the stop settle window

settledStartedAfter slept with one setTimeout until the settle anchor. Node truncates timer
delays to whole ms against a ms loop clock, so the wake can land up to ~2ms before the anchor
by performance.now(), and the probe then started inside the window and could still see the
stopping distro as running. That is the hook relay stop-settle flake ("expected true to be
false"). Sleep until performance.now() has passed the anchor.

* test(wsl): spy on setTimeout without a type assertion

* test(wsl): fire the spied timer far early so a single sleep always fails

* fix(wsl): re-read a settled exit only from a probe started after the window

After a watch or holder exit, the liveness supervisor slept EXIT_SETTLE_MS and re-read the
running list with no bound, so it could join a list probe that started inside the settle
window and still listed the stopping distro. The re-read now passes the exit time, and the
wiring reads through the gate's settledStartedAfter with exit + EXIT_SETTLE_MS as the bound.
2026-10-27 03:55:25 -07:00
..