fix(responses): narrow the send budget once for the adapter contract (#4546) - #4613
Merged
Conversation
…4546) Refs #4546. Forward fix for the gates failure on 1abc5cc. HandleResponsesOptions.sendBudget is typed as the narrow TransientSendBudget holder so a caller that predates the execution budget can still pass one. AdapterFetchContext needs the full contract, because an adapter that retries internally has to call reserveDispatch. Passing the narrowed value straight through failed typecheck at all three fetchResponse literals. Narrow it once next to the other budget helpers instead of asserting at each call site; an adapter that receives undefined keeps its own retry shape, which is the documented optional behaviour.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
|
Contributor
⏳ DRAFT
What to do
Automatic draft conversion failed (token cannot change draft status). Please convert this pull request to a draft manually. The required |
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
Refs #4546. Forward fix for the
gatesfailure on1abc5cc563(#4611).HandleResponsesOptions.sendBudgetis typed as the narrowTransientSendBudgetholder so a caller that predates the execution budget can still pass one.AdapterFetchContextneeds the full contract, because an adapter that retries internally has to callreserveDispatch. Passing the narrowed value straight through failed typecheck at all threefetchResponseliterals with TS2740.It is narrowed once next to the other budget helpers rather than asserted at each call site. An adapter that receives
undefinedkeeps its own retry shape, which is the documented optional behaviour.Verification
Hosted CI at the exact head; local checks NOT RUN by policy. The failing signature was
src/server/responses/core.ts(7721,9): error TS2740plus the same at 7856 and 8414.Checklist
dev