fix: enforce CLI readiness deadlines - #265
Open
StevenWang-CY wants to merge 1 commit into
Open
Conversation
Signed-off-by: Chuyue Wang <stevenwang0805@outlook.com>
StevenWang-CY
requested review from
bbrowning,
franciscojavierarceo,
jiahuei,
leseb,
maralbahari,
noobHappylife,
qandrew and
tjtanaa
as code owners
September 7, 2026 04:21
Contributor
Author
|
@franciscojavierarceo, could you review this when you have a chance? It fixes a reproduced CLI readiness deadline bug. The full local suite and pinned harness replays pass; hosted CI is still queued. |
maralbahari
approved these changes
Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wait_for_gatewaychecked its deadline only between polling rounds. A stalled/healthor/readyrequest, or a retry sleep longer than the remaining budget, could overrun the readiness timeout. Successful probes observed after the deadline could also allow the harness to launch.Apply one deadline to the probes and retry sleeps, and reject late success. This covers the configurable
agentic runbudget and the fixed 30-secondagentic harnessbudget. Existing skip-probe behavior, redacted errors, and caller cleanup are preserved.Test Plan
474d154), the five regression cases fail for retry-sleep overrun, stalled health/readiness probes, a stalled health probe with upstream checking skipped, and late success. Three healthy/skip, redirect, and zero-timeout/redaction controls pass. All eight cases pass with this patch, including 50 fresh-process repetitions split between serial and concurrent execution.--llm-ready-timeout-s 0.25 --llm-ready-interval-s 60: the baseline exceeded a three-second watchdog; the patched command returned the readiness error in about 0.6 seconds, with no gateway child or temporary session remaining and no harness launched.cargo checkand Clippy with warnings denied; full all-feature Rust workspace suite (907 passed, 9 ignored); rustfmt and all applicable pre-commit hooks. The ignored tests require PostgreSQL or are an existing doctest.No new inference cassette is needed for the readiness failure: it occurs before model requests. The regression tests exercise real local health endpoints, and existing recorded harness replays cover successful startup. No live model or GPU is required.