Skip to content

fix(responses): narrow the send budget once for the adapter contract (#4546) - #4613

Merged
lidge-jun merged 1 commit into
devfrom
codex/260914-budget-typefix
Sep 14, 2026
Merged

fix(responses): narrow the send budget once for the adapter contract (#4546)#4613
lidge-jun merged 1 commit into
devfrom
codex/260914-budget-typefix

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

Refs #4546. Forward fix for the gates failure on 1abc5cc563 (#4611).

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 with TS2740.

It is narrowed once next to the other budget helpers rather than asserted at each call site. An adapter that receives undefined keeps 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 TS2740 plus the same at 7856 and 8414.

Checklist

  • Targets dev
  • No request bodies, API keys or account identifiers are logged
  • Local CI — NOT RUN by policy

…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.
@lidge-jun
lidge-jun merged commit 237a128 into dev Sep 14, 2026
5 of 6 checks passed
@lidge-jun
lidge-jun deleted the codex/260914-budget-typefix branch September 14, 2026 09:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T09:58:14.430045Z 68c3d41 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added bug Something isn't working intake: hygiene-blocked Deterministic PR hygiene checks failed labels Sep 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Deterministic hygiene checks failed.

  • missing_regression_test — Behavior changed under src/ or gui/src/ without a test change. Add focused coverage or obtain test-exception-approved.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • hygiene: missing_regression_test.

What to do

  • Fix missing_regression_test — Behavior changed under src/ or gui/src/ without a test change. Add focused coverage or obtain test-exception-approved.

Automatic draft conversion failed (token cannot change draft status). Please convert this pull request to a draft manually. The required enforce-target check will keep failing until every issue above is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working intake: hygiene-blocked Deterministic PR hygiene checks failed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant