fix(runtime): classify expired probe budget as timeout - #2344
Merged
Astro-Han merged 1 commit intoAug 7, 2026
Conversation
liugddx
force-pushed
the
fix/runtime-probe-deadline-classification
branch
from
August 7, 2026 00:20
57eca2a to
2c6a579
Compare
37 tasks
Member
Author
Astro-Han
reviewed
Aug 7, 2026
Astro-Han
left a comment
Contributor
There was a problem hiding this comment.
Thanks — this is a clean, minimal reclassification. We traced the reachability: on the dominant path (all candidates fail, last one aborted) the old code already returned timeout, so the real change is the unreachable-in-production index-0 budget-expiry corner, and every reachable outcome is field-for-field identical to the old behavior. Consumers (connections:test status patch, runtime-host summary, redaction of 'Fetch timeout') all map consistently; no retry/metric consumers exist. 7/7 + 10/10 + 19/19 green.
Two optional notes:
- The deleted
assert.ok(requestedModels.length > 0)(opencode-free-anonymous.test.ts:244,254-255,273) was the only assertion that could distinguish 'probes were actually issued' from 'no probe was ever issued'. Under the new semantics the test would pass even if the loop never fired a single request. Keeping it (it still passes on a normal machine) or an equivalent counting assertion would keep the deadline test load-bearing. - The
lastFailure ?? timeoutfallback at test-connection.ts:171 is dead code (the candidate list is statically non-empty and index-0 expiry is pre-returned) — harmless, could be simplified.
Merging.
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
timeoutWhy
If the process is descheduled for the full 40ms test budget before the first fallback iteration, no probe starts and
lastFailureremains empty. The old fallback then reportedprovider_unavailable, even though the only known fact is that the shared deadline expired. This caused a CI flake and exposed an incorrect production edge classification.Validation
npm --workspace @maka/core run buildnpm --workspace @maka/runtime run buildnode --test packages/runtime/dist/__tests__/opencode-free-anonymous.test.js(7 pass)git diff --check