[WRONG BRANCH] fix(responses): repair terminal-less bridged search legs - #485
[WRONG BRANCH] fix(responses): repair terminal-less bridged search legs#485luvs01 wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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. |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Its title has been prefixed with |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d7dce5ac40
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const terminalRepair = sseBranch.indexOf("relayResponsesSseWithTerminalRepair("); | ||
| const webSearchBridge = sseBranch.indexOf("createPassthroughWebSearchBridgeStream({"); | ||
| expect(terminalRepair).toBeGreaterThanOrEqual(0); | ||
| expect(webSearchBridge).toBeGreaterThan(terminalRepair); | ||
| expect(sseBranch.slice(webSearchBridge)).toContain("firstLeg: passthroughSseBody,"); |
There was a problem hiding this comment.
Add behavioral coverage for the terminal-less bridge
These assertions only inspect source-text ordering, so they pass without proving the liveness fix: the repair timer could fail to arm, its synthetic terminal could be ignored by the bridge, or the continuation could remain unsent. Add a focused test that supplies a completed-but-never-closing web_search first leg through handleResponses, advances the injected scheduler, and verifies that search execution and the continuation request occur; this directly protects the production hang this change addresses.
AGENTS.md reference: AGENTS.md:L367-L370
Useful? React with 👍 / 👎.
Motivation
web_searchcall but does not emit a terminal or close the leg.Description
src/server/responses/core.tsso terminal repair is applied to the raw upstream first and the resulting repaired stream is passed as thefirstLegtocreatePassthroughWebSearchBridgeStream.tests/responses/passthrough-abort.test.tsto assert the composition order and that the bridge receives the repaired stream as itsfirstLeg.Testing
bun test tests/responses/passthrough-abort.test.ts, which passed (24 tests, 0 failures).bun run typecheck, which succeeded.bun run test; focused changes passed but the full-suite run encountered unrelated, environment-sensitive failures and panics in other test areas (combo-management / codex-shim) that prevented a complete parallel run; these failures are not related to the patched changes.Codex Task