fix(harness): treat HTTP 408 timeouts as retryable and score exhausted timeouts as Skipped - #83
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Conversation
…d timeouts as Skipped
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
Original prompt from Jason
|
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.
TL;DR
Community fix from @warun7 (authored commit preserved, brought in from
warun7:benchmark-harness:fix/score-408-timeouts-as-skipped, follow-up to #77):ModelErrorwith status 408 is now retryable, so timeouts go throughrateLimitRetryScheduleand, if retries are exhausted, the sample scoresSkippedinstead ofIncorrect, matching 429 and 5xx.What changed?
isRetryableModelErrorinsrc/harness/core.tsaddserror.status === 408.rateLimitRetryScheduleandrunBenchmark'sModelErrorhandler both key offisRetryableModelError, 408s are retried (default 6 attempts, exponential jittered backoff from 1s) and exhausted 408s becomeScoreValue.Skipped.src/harness/core.test.tsfor the retryable/systemic classifiers, arunBenchmarkcase for exhausted 408 scoringSkipped, and arateLimitRetrySchedulecase for 408 retry.Why?
Reported on Discord by warun7. Today a 408 is scored
Incorrect, which counts a transport or timeout failure as a wrong answer in the accuracy denominator, unlike 429 and 5xx which are excluded asSkipped.Searched existing PRs for "408", "timeout", "Skipped"; none matched.
How to test
bun test src/harness/core.test.ts src/harness/run.test.ts src/runtime/retry.test.tsExpected: all pass, including "scores a sample as Skipped (excluded from accuracy) when the model exhausts 408 retries" and "retries transient 408 timeout errors".
Locally on this branch:
bun run format:check,bun run check,bun run typecheck,bun test(1436 pass),bun run buildall succeed.Benchmark impact
This changes reported scores. Any run where a sample previously hit a 408 will now either recover on retry (adding to correct or incorrect) or be excluded from the accuracy denominator. Runs with no 408s are unaffected. Pre and post fix results for the same model are not directly comparable when timeouts occurred.
Two consequences reviewers should weigh, see below.
Reviewer focus
src/providers/responses-model.tssynthesizes a 408ModelErrorwhen the harness's owntimeoutMselapses. So this PR also changes the meaning of--solver-config '{"timeoutMs": N}'from "hard per-sample budget, failure counts against the model" to "per-attempt budget, retried up to 6 times, then excluded from accuracy". A model that consistently cannot answer within the budget is no longer penalized. Whether a timeout is an infrastructure failure or a model failure is a methodology decision that should be made explicitly.timeoutMsset, worst case per sample grows from 1x to 7xtimeoutMsplus backoff. On long agentic evals this is material.Checklist
Link to Devin session: https://openrouter.devinenterprise.com/sessions/e348d039d09045f3a3cc9fc485bf2cda
Open in Devin Desktop: https://openrouter.devinenterprise.com/desktop/session/e348d039d09045f3a3cc9fc485bf2cda?variant=devin
Requested by: @jasoncrabtree-or
Note
Devin errored when opening this Pull Request as jasoncrabtree-or.
As a fallback, Devin opened this PR as itself.