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. |
✅ READY
Hygiene✅ Deterministic PR hygiene checks passed. |
리뷰 · 우선순위 67 / 80요청을 보냈는데 연결이 중간에 끊기면, 서버가 그 일을 이미 했는지 알 수 없습니다. 그래서 자동으로 다시 보내지 않습니다. 운영자가 한 번만 다시 보내라고 허락한 경우에만, 한 번 더 보냅니다. 그 한 번이 서버의 잠깐 오류로 끝나면, 예전 코드는 502 같은 답을 그대로 클라이언트에게 줬습니다. 이 길을 쓰는 클라이언트는 그런 5xx를 다시 보내도록 되어 있습니다. 허락한 한 번 위에 또 보내면, 같은 일이 두 번 실행될 수 있습니다. 이 PR은 그 5xx를 클라이언트에게 넘기지 않습니다. 받은 답의 몸체는 버리고, 다시 보내지 말라는 429를 돌려줍니다. 그 429에는 다시 보내지 말라는 표시가 있습니다. 테스트는 끊김 다음에 502가 오면 세 번째 전송이 없는지 확인합니다. base는 src/lib/upstream-retry.ts:609 - 거절로 바꿀 때 쓰는 문장은, 응답을 받기 전에 연결이 닫혔다고 말합니다. 이 길은 502를 받은 다음입니다. 429와 다시 보내지 말라는 표시는 맞습니다. 문장만 보면, 답이 없었던 일처럼 읽힙니다. 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
|
Review feedback applied on |
|
Consolidated into #5553 as a single related-function aggregate. Source head: Implementation 980c662 and wording/logging follow-up c1fd0cc match carried 35fb727 and 940b318 by stable patch ID with source authors retained. The dev merge adds no remerge-resolution delta. The final aggregate's 604 distinct focused tests include terminal transient-5xx refusal after an operator-granted replacement, preserving one policy invocation and no alternate-account retry. The proposal remains limited to transient 5xx; whether to extend it to 408/409/provider 429 is explicitly carried as an open review question on #5553. Full-suite completion, exact-head hosted CI and security review remain pending. Closing this duplicate standalone review entry as part of the requested consolidation after verifying coverage. This is not a merge or release claim; remaining integration checks and reviews are tracked on the replacement. Original branches are retained. |
|
Thanks @luvs01. This fence landed on dev in #5575 ( It was widened on the way in. After a spent replacement, 307, 308, 401, 402, 408, 409, 413, 429 and every 5xx now settle as the refusal, where before 429 and 529 escaped. Other errors keep their real status but are marked non-replayable, and the Codex pool's gated-model retry and combo hops now honor that marker. The reworded refusal message landed too, with the classifier matching the full sentence. |
Motivation
5xxresponse from escaping after an operator-authorized ambiguous-reset replacement and thereby inviting client-level retries that can duplicate a logical turn.Description
fetchWithResetRetrydetect when an operator replacement was spent (spentOperatorReplacement) and the replacement resolved to a transient upstream status, cancel that response body withcancelResponseBodyBestEffortand return the existing non-replayablereplayRefusalResponse()instead of returning the transient5xx.tests/lib/upstream-retry.test.tsthat reproduces theECONNRESET -> replacement 502sequence and asserts the terminal answer is the non-replayable 429 refusal.Testing
bun test tests/lib/upstream-retry.test.ts: 49 tests pass.