[PR #2091] [MERGED] Add remote API body limit proof #5432

Closed
opened 2026-10-22 04:16:16 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2091
Author: @cha1latte
Created: 6/3/2026
Status: ✅ Merged
Merged: 6/3/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-2069-body-limits


📝 Commits (2)

  • 993977b Add remote API body limit proof
  • 6dee50d Cover embeddings body limit rejection

📊 Changes

2 files changed (+57 additions, -15 deletions)

View changed files

📝 README.md (+5 -0)
📝 src-tauri/src/http_server.rs (+52 -15)

📄 Description

Linked issue

Closes #2069

Why this change

  • The hostable Remote Runtime body-limit implementation already landed with the broader hostable API controls work, but the split body/upload issue still needed direct boundary proof and visible policy documentation.
  • The split issue asks for an explicit default request body/upload policy, focused accepted/rejected boundary proof, and route coverage for large JSON/upload-style API paths.

What changed

  • Expanded api_body_size_rejects_oversized_unsafe_api_requests so oversized bodies are rejected on /api/invoke and dedicated JSON API routes.
  • Added exact-boundary proof that /api/invoke, bulk import, embeddings, and LLM streaming allow requests at the legacy 256 MiB policy boundary.
  • Documented the Remote Runtime 256 MiB JSON/upload-style request body policy, 413 response, and request_body_too_large code in README.md.

Refactor impact

Primary owner:

  • Remote runtime / hostable HTTP dispatch in src-tauri.

Impact areas reviewed:

  • Hostable /api/invoke
  • Dedicated hostable JSON API routes: /api/import/st-bulk/run, /api/sidecar/v1/embeddings, /api/llm/stream
  • Remote Runtime README setup guidance

Boundary notes:

  • The runtime behavior stays in src-tauri/src/http_server.rs; no React UI, engine, shared API wrapper, schema, dependency, auth, storage, prompt, or release metadata changed.
  • This follow-up does not change the 256 MiB runtime policy added by the merged hostable controls work; it adds the split issue's proof and docs.

Pressure points touched:

  • src-tauri/src/http_server.rs hostable API body-size tests.
  • README.md Remote Runtime section.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • Local proof ran cargo test --manifest-path src-tauri/Cargo.toml api_body_size --lib: 3 passed.
  • Local proof ran cargo check --manifest-path src-tauri/Cargo.toml: passed.
  • Local proof ran pnpm check: passed.
  • Bunny pre-PR review: pass.
  • The local proof-gate helper path from workflow notes was unavailable on this machine: C:/Users/celia/.codex/tools/marinara-proof-gate.mjs.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Internal remote-runtime proof/docs follow-up only; no user-discoverable app surface is added.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

N/A. This is a backend/hostable HTTP runtime proof and README update with command-level validation, not visible UI behavior.

Summary by CodeRabbit

  • Documentation
    • Added clarification regarding remote API request limits. Remote API JSON and upload-style requests are documented to have a 256 MiB maximum request body size. Requests exceeding this limit return HTTP 413 error code. Managed asset downloads retain their own independent caching and streaming behavior.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/2091 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/3/2026 **Status:** ✅ Merged **Merged:** 6/3/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-2069-body-limits` --- ### 📝 Commits (2) - [`993977b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/993977b789d2928642ccfcca9a35cc61543597d6) Add remote API body limit proof - [`6dee50d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6dee50d8f4cca7d47b18001b8ce2ab6ef659c627) Cover embeddings body limit rejection ### 📊 Changes **2 files changed** (+57 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+5 -0) 📝 `src-tauri/src/http_server.rs` (+52 -15) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Closes #2069 ## Why this change - The hostable Remote Runtime body-limit implementation already landed with the broader hostable API controls work, but the split body/upload issue still needed direct boundary proof and visible policy documentation. - The split issue asks for an explicit default request body/upload policy, focused accepted/rejected boundary proof, and route coverage for large JSON/upload-style API paths. ## What changed - Expanded `api_body_size_rejects_oversized_unsafe_api_requests` so oversized bodies are rejected on `/api/invoke` and dedicated JSON API routes. - Added exact-boundary proof that `/api/invoke`, bulk import, embeddings, and LLM streaming allow requests at the legacy 256 MiB policy boundary. - Documented the Remote Runtime 256 MiB JSON/upload-style request body policy, `413` response, and `request_body_too_large` code in `README.md`. ## Refactor impact Primary owner: - Remote runtime / hostable HTTP dispatch in `src-tauri`. Impact areas reviewed: - Hostable `/api/invoke` - Dedicated hostable JSON API routes: `/api/import/st-bulk/run`, `/api/sidecar/v1/embeddings`, `/api/llm/stream` - Remote Runtime README setup guidance Boundary notes: - The runtime behavior stays in `src-tauri/src/http_server.rs`; no React UI, engine, shared API wrapper, schema, dependency, auth, storage, prompt, or release metadata changed. - This follow-up does not change the 256 MiB runtime policy added by the merged hostable controls work; it adds the split issue's proof and docs. Pressure points touched: - `src-tauri/src/http_server.rs` hostable API body-size tests. - `README.md` Remote Runtime section. ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> <!-- Do not submit *.test.ts or *.test.tsx files as PR proof; cite existing checks, command output, app/browser/Tauri verification, or manual notes instead. --> - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - Local proof ran `cargo test --manifest-path src-tauri/Cargo.toml api_body_size --lib`: 3 passed. - Local proof ran `cargo check --manifest-path src-tauri/Cargo.toml`: passed. - Local proof ran `pnpm check`: passed. - Bunny pre-PR review: pass. - The local proof-gate helper path from workflow notes was unavailable on this machine: `C:/Users/celia/.codex/tools/marinara-proof-gate.mjs`. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [ ] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Internal remote-runtime proof/docs follow-up only; no user-discoverable app surface is added. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence N/A. This is a backend/hostable HTTP runtime proof and README update with command-level validation, not visible UI behavior. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added clarification regarding remote API request limits. Remote API JSON and upload-style requests are documented to have a 256 MiB maximum request body size. Requests exceeding this limit return HTTP 413 error code. Managed asset downloads retain their own independent caching and streaming behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:16:16 +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#5432
No description provided.