mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-19 13:23:50 +03:00
* fix(cli): escalate the readiness probe timeout so a slow health response is not a phantom boot failure `omniroute serve` reported "Server did not respond within 60s" over servers that were up and serving traffic. Every probe of /api/monitoring/health was aborted at a fixed 2s, and a timed-out probe is classified "hanging", which never counts toward readiness (#6800). So whenever the first health response takes longer than 2s the poll can never succeed: each abort discards the in-flight request before the route finishes (its own 1s payload cache is never populated either), and 500ms later the next probe restarts the same work into the same ceiling, for the whole 60s budget. Reproduced by the new test: against a health route that answers 200 in 3.2s, the old poller ran 12 probes over 30s and reported ready=false every time. The per-probe timeout now escalates after each hang (2s, 4s, 8s, 15s), clamped to the time left in the budget so the caller's total timeout still holds. Only a hang escalates, so #6800's guarantee is unchanged: a socket that accepts TCP and never answers still resolves false. waitForServer also reports each probe outcome to an optional onOutcome callback, and the readiness-timeout diagnostic uses it to say whether the port was accepting connections, which separates "up and still warming" from "never bound the port". Same failure family as #10508, which fixed it by taking a DNS lookup out of the 2s budget rather than by widening it. The heavy /api/monitoring/health route is what makes that budget tight in the first place (its own docstring points high-frequency pollers at /api/health/ping, which is what the Electron readiness poller uses); switching the CLI probe route is a larger change, left as a follow-up. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CJf2dxEpiwZqyZujWk57T2 * chore(changelog): link the readiness-probe fix to PR 12484 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CJf2dxEpiwZqyZujWk57T2 --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>