Repository navigation
Bound provider requests over the whole response, not just headers - #76
Merged
aryanorastar merged 1 commit intoOct 23, 2026
Conversation
axios's `timeout` is cleared once response headers arrive and then relies on socket inactivity, so a provider body that keeps trickling could hold a customer waiting far past the configured budget (BasedHardware#72). Each planner, answer and review request now also carries a full-operation abort signal and reports the abort as the existing timeout error shape, so current retry handling is unchanged. Red-before loopback tests: a 250 ms budget previously ran ~3.9 s on a trickling body for all three stages; a normal response still completes; the error carries no response text. Broader cross-stage budgeting stays parked under BasedHardware#72. Co-authored-by: Railway <68434857+railway-app[bot]@users.noreply.github.com>
This was referenced Oct 23, 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.
Closes the reproduced mechanism from #72. The broader cross-stage answer budget, remainder-bounded retries and fallback wording stay parked under #72.
Customer failure prevented
A reply could take far longer than its configured provider timeout when the model API started a response but kept the body trickling. axios's
timeoutis cleared once response headers arrive and then relies only on socket inactivity, so a slow body never tripped it.Change
commandcode.js:providerSendwraps the planner, answer and review requests withAbortSignal.timeout(provider.timeout)alongside the existingtimeout, so the deadline covers body consumption. An abort is reported as the existingECONNABORTEDtimeout error, so retry handling is unchanged and no response text leaks into failure metadata.ROADMAP.md: one entry recording this as implemented and tested locally, not reviewed, compared or deployed.Evidence
timeout: 250on a trickling body completed after 1413 ms.test/providerDeadline.test.js(6 tests): planner, answer and review each stop at the budget on a trickling body (red before: a 250 ms budget ran ~3.9 s on all three stages); a normal response still completes; the deadline error carries no response text.Not done
No live-eval or latency comparison, no deploy. Opened from a fork because the Railway GitHub App is not installed on the BasedHardware org.