mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2066] Hostable remote runtime lacks legacy API abuse/body/cache policy #1013
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#1013
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?
Originally created by @Promansis on GitHub (Jun 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2066
Originally assigned to: @cha1latte on GitHub.
Summary
The hostable Rust remote runtime does not visibly preserve legacy API abuse, payload, and JSON cache controls. Legacy Fastify had global and route-specific API rate limits with
Retry-After, 256 MB body/upload limits, and defaultCache-Control: no-storefor API JSON responses.Expected behavior
Remote/runtime HTTP paths should preserve the legacy safety envelope:
Retry-Afterso the refactor client'sretryAfterMspath can work.Cache-Control: no-storeunless a route deliberately overrides it.Actual behavior
Static parityscan of the current refactor slice found client-side support for parsing
Retry-After, but no Rust hostable runtime source that emits API 429 rate-limit responses or preserves the legacy global body/cache policy.Refactor evidence:
src/shared/api/remote-runtime.tsreadsretry-afterintoretryAfterMs.src/shared/api/query-retry.tsonly retries 429 whenretryAfterMsexists.src-tauri/src/http_server.rsdefines the hostable routes and error mapping, but the scanned slice did not find a rate-limit/body-limit/no-store policy equivalent.Legacy evidence:
packages/server/src/middleware/rate-limit.tshad a default 600/min API bucket plus route-specific limits and emittedRateLimit-*plusRetry-After.packages/server/src/app.tsconfiguredbodyLimit, multipartfileSize, registeredrateLimitHook, and added defaultCache-Control: no-storefor/api/*.Steps to reproduce
main:packages/server/src/middleware/rate-limit.tsandmain:packages/server/src/app.ts.Retry-After,RateLimit,429,bodyLimit,Cache-Control,no-store, and rate-limit terms insrc-tauri/src/http_server.rsandsrc/shared/api.Impact area
Environment
refactorat9bcfb164during parityscanLogs, screenshots, or video
No runtime logs. Static parity evidence from:
src-tauri/src/http_server.rssrc/shared/api/remote-runtime.tssrc/shared/api/query-retry.tsmain:packages/server/src/middleware/rate-limit.tsmain:packages/server/src/app.tsRegression notes
Legacy
mainhad these API policy controls in the Node/Fastify server. Current refactor hostable Rust runtime appears to lack the equivalent controls, so remote clients may miss 429 retry metadata, payload bounds, or no-store headers that legacy users had.Additional context
Found during Target 3 remote runtime parityscan slice for health, error, readiness contracts, writable storage, invalid URL handling, HTTP error envelope, and retry metadata. Parent tracker: #2050.
Suggested repair: add hostable HTTP policy coverage for API throttling, route-specific hot/privileged limits, request body/upload bounds, no-store defaults for JSON API responses, and tests proving 429 +
Retry-AfterreachesApiError.details.retryAfterMs.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: