mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1318] [MERGED] Fix 429 query retry storm #5038
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5038
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1318
Author: @cha1latte
Created: 5/26/2026
Status: ✅ Merged
Merged: 5/26/2026
Merged by: @cha1latte
Base:
refactor← Head:fix/issue-1277-rate-limit-backoff📝 Commits (2)
cf735b3Fix 429 query retry storm69a868cMerge remote-tracking branch 'upstream/refactor' into fix/issue-1277-rate-limit-backoff📊 Changes
7 files changed (+159 additions, -17 deletions)
View changed files
📝
src/app/main.tsx(+3 -1)📝
src/features/catalog/chats/hooks/use-chats.ts(+5 -12)📝
src/shared/api/api-errors.ts(+25 -1)➕
src/shared/api/query-retry.test.ts(+58 -0)➕
src/shared/api/query-retry.ts(+43 -0)📝
src/shared/api/remote-runtime.ts(+8 -3)📝
src/shared/api/tauri-client.test.ts(+17 -0)📄 Description
Linked issue
Closes #1277
Why this change
useChatsanduseChatSummariestreated 429 responses as retryable up to 10 times, so multiple tabs could keep hammering a self-hosted backend that was already rate limiting.What changed
Retry-Aftermetadata.Retry-Afterfrom remote runtime HTTP errors intoApiErrordetails so React Query can honor one delayed retry when the backend explicitly asks for it.Refactor impact
Primary owner:
shared API
Impact areas reviewed:
Boundary notes:
src/shared/apiand app/feature query configuration.Pressure points touched:
Validation
pnpm checkpasses locallypnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallyManual verification notes
Retry-Afterproduced 11 attempts while 400 produced 1 attempt.scratch/issue-1277-repro.test.ts: 429 withoutRetry-Afternow produces 1 attempt, 429 withretryAfterMsproduces 2 attempts, and 400 still produces 1 attempt.pnpm exec vitest run src\shared\api\query-retry.test.ts --reporter=verbose.pnpm exec vitest run src\shared\api\tauri-client.test.ts --reporter=verbose.pnpm check; it passed architecture, frontend typecheck, Rust cargo check, and docs checks.Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdNo docs or release metadata changes are included.
UI evidence
N/A - this is a non-visual retry policy fix. The proof is the QueryClient retry harness and shared API tests listed above.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.