Skip to content

fix(retry): honor upstream no-retry verdict - #7505

Closed
Platinum-Scripts wants to merge 1 commit into
lidge-jun:devfrom
Platinum-Scripts:fix/respect-upstream-no-retry
Closed

Platinum-Scripts wants to merge 1 commit into
lidge-jun:devfrom
Platinum-Scripts:fix/respect-upstream-no-retry

Conversation

@Platinum-Scripts

@Platinum-Scripts Platinum-Scripts commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Stop the internal transient-status retry ladder when the upstream response carries the exact x-should-retry: false verdict.
  • Return the original response without cancelling, parsing, or rewriting its body.
  • Add a regression that pins one physical send and preserves the original 503 response, header, and canonical retryable: false body.

Verification

  • RED: focused regression failed before the guard because the helper retried and returned a different response.
  • GREEN: bun test tests/lib/upstream-retry.test.ts — 69 pass, 0 fail, 275 assertions.
  • bun run typecheck — pass.
  • bun run structure:check — pass.
  • bun run privacy:scan — pass.
  • bun run test:changed — 44,244 pass, 108 skip, 0 fail, 711,243 assertions across 2,047 files.
  • Full suite diagnostic — 50,724 pass, 129 skip, 1 pre-existing failure in claude-desktop-remote-hub.test.ts. The exact focused test fails identically on pristine upstream/dev at bf4eb120 because generated synthetic model aliases are ordered differently after a cold restart.

Checklist

  • Change is scoped to the central retry helper, its regression, and the owning transport contract.
  • Documentation updated for the new retry boundary.
  • Security and privacy checks completed.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • Required local validation passed; commands, results, and any full-suite exception are documented.

  • I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Signed-off-by: Platinum-Scripts <133908028+Platinum-Scripts@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • review readiness checklist open (0/4 boxes ticked).

What to do

  • Tick all four boxes in the PR description once you're done (currently 0/4).

Review readiness checklist

  • ⬜ Required local validation passed; commands, results, and any full-suite exception are documented.
  • ⬜ I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
  • ⬜ I resolved all correct Codex and CodeRabbit findings.
  • ⬜ My PR is ready for review.

0/4 boxes ticked.

This PR stays in draft until every box above is ticked.

@lidge-jun

Copy link
Copy Markdown
Owner

Carried onto the current dev tip in #7538, with your commit, Signed-off-by, and a Co-authored-by trailer preserved. The change is unchanged apart from a one-line comment explaining the new condition. A maintainer will close this PR once the carry is handled. Thanks for the fix and the regression test.

lidge-jun added a commit that referenced this pull request Oct 22, 2026
Stop fetchWithTransientRetry's same-target transient ladder when the
upstream gateway status carries the exact x-should-retry: false verdict,
returning the original response with its body intact.

Carries #7505.

Signed-off-by: Platinum-Scripts <133908028+Platinum-Scripts@users.noreply.github.com>
Co-authored-by: Platinum-Scripts <133908028+Platinum-Scripts@users.noreply.github.com>
@lidge-jun

Copy link
Copy Markdown
Owner

Thank you, @Platinum-Scripts. This change was carried onto current dev in #7538 with your authorship kept as a Co-authored-by trailer, and merged there. Closing this draft in favour of that PR.

@lidge-jun lidge-jun closed this Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants