Repository navigation
fix(combo): fail over zero-output transport incompletes (carry of #3227) - #3236
Conversation
|
✅ Deterministic PR hygiene checks passed. |
리뷰 · 우선순위 75 / 80이 PR은 기여자 @RHODIZSECURITY 의 #3227을 메인테이너가 현재 문제는 콤보(여러 백업 대상을 이어 쓰는 모드)의 스트림 사전점검(preflight)이 고침은 좁습니다. 프록시가 직접 찍어 내는 전송(transport) incomplete 이유 세 개만 제로 아웃풋일 때 재시도로 바꿉니다: 테스트도 핵심만 잠급니다. 단위 테스트는 (1) 세 transport incomplete → kind 라인 27-31 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Co-authored-by: RHODIZ IT <180237049+RHODIZSECURITY@users.noreply.github.com>
Co-authored-by: RHODIZ IT <180237049+RHODIZSECURITY@users.noreply.github.com>
Summary
Carry of #3227 by @RHODIZSECURITY (commit cherry-picked onto current
devwith author credit; the contributor branch is not pushable by maintainers).Combo stream preflight only treated
response.failedas a retryable zero-output terminal. An upstream answering HTTP 200 with a stream that ends asresponse.incompletefor a proxy-minted transport reason (adapter_eof,missing_terminal_event,upstream_stall_timeout) was accepted, so a combo with healthy backups never advanced. Those three reasons now count as retryable when no output has committed; semantic incompletes (max_output_tokens,content_filter) and any incomplete after output commit stay accepted. The failed attempt is recorded as a 502 in log/usage receipts, same as a zero-outputresponse.failed.Supersedes #3227 (landed via maintainer).
Verification
bun test tests/combo-stream-preflight.test.ts tests/server-combo-failover-e2e.test.ts— 88 pass / 0 fail on the PR head and again after rebase ontodev. New unit cases: transport incomplete → retryable; semantic incomplete → accepted; transport incomplete after commit → accepted. New e2e: A endsadapter_eofbefore output, B wins, receipts assert 502 → 200.bridge.ts,relay.ts,responses-terminal-repair.ts), not upstream semantics.bun run typecheckclean;bun run privacy:scanpassed. Full suite deferred to CI (maintainer bypass).Checklist
dev