fix(responses): recover routed continuations after replay misses - #4086
fix(responses): recover routed continuations after replay misses#4086Eleven-is-cool wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. This PR stays in draft until every box above is ticked. |
|
@/home/box/developer/review-comments/pr-4086.md |
리뷰 · 우선순위 63 / 80이 PR(draft, Eleven-is-cool)은 routed Responses에서 로컬 replay가 없거나 만료됐을 때 orphan tool result를 upstream으로 보내지 않고, 클라이언트가 전체 히스토리를 다시 보내게 합니다. 지금 라인 src/server/responses/core.ts · hasUnexpandedPreviousResponse 블록 - openai-responses + (statelessResponses 또는 unmapped custom output)만 막습니다. stateful native function/custom은 upstream 소유로 남깁니다. 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Summary
previous_response_not_foundbefore dispatch, allowing a client to resend complete history instead of forwarding an orphaned tool result.statelessResponsescapability, and actual tool declarations. Preserve upstream-owned native function/native-only custom continuations, existing defaults, and the canonical forward recovery path. No model-specific special cases, new retention store, or request-body logging.Verification
Using Bun 1.4.2:
bun test tests/responses/custom-tool-compat.test.ts tests/responses/responses-custom-tool-repair.test.ts tests/codex-integration/issue-702-expired-replay-state.test.ts --timeout 30000: focused suites passed; subsequent HTTP/native/custom-forward/model-override additions also passed their focused runs and the full-suite run. The four initial routed recovery scenarios failed before the production change and passed afterward.bun run typecheck: passed.bun run privacy:scanandgit diff --check: passed. Added lines were also checked for private paths, identifiers, endpoint details, and business content.cd docs-site && bun install --frozen-lockfile && bun run build: passed, 425 pages built.bun run test --timeout 30000: not fully green. The parallel lane reported 21,785 passed, 17 skipped, and 3 failed; all six serial lanes passed (180 additional tests). Failures:server-auth.test.ts:OpenAI option auth matrix keeps direct, pool, and API credentials independent— WebSocket timeout.native-profile-drain-server.test.ts:HTTP and Responses WebSocket keep Direct live while main Pool frames are rejected— WebSocket timeout.responses-state.test.ts:periodic reclaim frees abandoned temps without any continuation access— cleanup count assertion.--parallel=1produced 258 passed and the same two WebSocket failures; the cleanup test passed. Running those three failing test names on an unmodified8026405baseline reproduced both WebSocket failures and passed the cleanup test. Unrelated tests were not changed to hide these failures.Checklist
This PR remains draft because the full local test run is not green. No running user installation or provider configuration was changed.
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.