[GH-ISSUE #2059] [Issue]: hostable remote runtime lacks legacy API abuse/body/cache controls #1006

Closed
opened 2026-10-21 05:25:04 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Jun 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2059

Originally assigned to: @cha1latte on GitHub.

Summary

The hostable Rust Remote Runtime does not visibly preserve the legacy server's API abuse, body-size, and no-store cache controls for API paths.

Expected behavior

Remote Runtime HTTP paths should preserve legacy-equivalent controls for hot or privileged API traffic:

  • Global and route-specific rate limits that can return 429 with Retry-After.
  • Explicit request body/upload size limits comparable to legacy server limits.
  • Cache-Control: no-store or equivalent no-cache policy for JSON API responses where legacy applied it.

Actual behavior

Target 3 static parity tracing found the remote client can consume Retry-After metadata if a server sends it, but no hostable Rust source for legacy-equivalent rate limits, body-size limits, or default no-store JSON API policy was found in this slice.

Legacy evidence:

  • packages/server/src/middleware/rate-limit.ts defined global and route-specific API limits, including haptic/sidecar-sensitive paths.
  • packages/server/src/app.ts configured body/upload size policy and applied no-store behavior for API JSON responses.

Refactor evidence:

  • src/shared/api/remote-runtime.ts preserves retry metadata from Retry-After.
  • Static search of src-tauri/src/http_server.rs and shared remote client code did not find a Rust rate-limit/429 source or the same default body/cache policy.

Steps to reproduce

  1. Run the hostable Remote Runtime.
  2. Exercise repeated or oversized /api/invoke / dedicated API requests.
  3. Compare behavior to legacy main server API rate-limit/body/cache policy.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: refactor, Target 3 rescan on 2026-06-04
  • Run mode: remote runtime
  • OS + version: not captured
  • Node + pnpm versions: not relevant
  • Rust version, if relevant: not captured
  • Remote Runtime URL configured? yes
  • Provider, model, or integration, if relevant: hostable HTTP runtime

Logs, screenshots, or video

No live abuse/body repro attached. This is static parity evidence from Target 3.

Regression notes

Legacy main had explicit API rate-limit/body/cache controls. Refactor Remote Runtime may still be safe through other deployment limits, but the legacy-equivalent app-owned controls were not found.

Additional context

Related tracker: #1904 target 3 and #2050. This should be split or repaired before Target 3 moves to on_par.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Jun 3, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2059 Originally assigned to: @cha1latte on GitHub. ## Summary The hostable Rust Remote Runtime does not visibly preserve the legacy server's API abuse, body-size, and no-store cache controls for API paths. ## Expected behavior Remote Runtime HTTP paths should preserve legacy-equivalent controls for hot or privileged API traffic: - Global and route-specific rate limits that can return `429` with `Retry-After`. - Explicit request body/upload size limits comparable to legacy server limits. - `Cache-Control: no-store` or equivalent no-cache policy for JSON API responses where legacy applied it. ## Actual behavior Target 3 static parity tracing found the remote client can consume `Retry-After` metadata if a server sends it, but no hostable Rust source for legacy-equivalent rate limits, body-size limits, or default no-store JSON API policy was found in this slice. Legacy evidence: - `packages/server/src/middleware/rate-limit.ts` defined global and route-specific API limits, including haptic/sidecar-sensitive paths. - `packages/server/src/app.ts` configured body/upload size policy and applied no-store behavior for API JSON responses. Refactor evidence: - `src/shared/api/remote-runtime.ts` preserves retry metadata from `Retry-After`. - Static search of `src-tauri/src/http_server.rs` and shared remote client code did not find a Rust rate-limit/429 source or the same default body/cache policy. ## Steps to reproduce 1. Run the hostable Remote Runtime. 2. Exercise repeated or oversized `/api/invoke` / dedicated API requests. 3. Compare behavior to legacy `main` server API rate-limit/body/cache policy. ## Impact area - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [ ] Chat mode - [ ] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [ ] React-free engine behavior, contracts, agents, or capability ports - [x] Shared API wrapper or remote runtime routing - [x] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: `refactor`, Target 3 rescan on 2026-06-04 - Run mode: remote runtime - OS + version: not captured - Node + pnpm versions: not relevant - Rust version, if relevant: not captured - Remote Runtime URL configured? yes - Provider, model, or integration, if relevant: hostable HTTP runtime ## Logs, screenshots, or video No live abuse/body repro attached. This is static parity evidence from Target 3. ## Regression notes Legacy `main` had explicit API rate-limit/body/cache controls. Refactor Remote Runtime may still be safe through other deployment limits, but the legacy-equivalent app-owned controls were not found. ## Additional context Related tracker: #1904 target 3 and #2050. This should be split or repaired before Target 3 moves to `on_par`. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:25:04 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#1006
No description provided.