[PR #2090] [MERGED] Fix remote runtime API cache policy #5431

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/2090
Author: @cha1latte
Created: 6/3/2026
Status: ✅ Merged
Merged: 6/3/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-2070-api-cache-policy


📝 Commits (2)

  • 9c58aaf Fix remote runtime API cache policy
  • fb35544 Record issue 2070 PR proof

📊 Changes

3 files changed (+179 additions, -68 deletions)

View changed files

📝 scratch/bugfix-verification.json (+69 -55)
📝 src/shared/api/remote-runtime.test.ts (+91 -1)
📝 src/shared/api/remote-runtime.ts (+19 -12)

📄 Description

Linked issue

Closes #2070

Why this change

  • Restores legacy no-store parity for remote runtime JSON/SSE client fetches so health checks, command calls, import streams, LLM streams, and cancel requests do not reuse stale browser/proxy cache entries.
  • The hostable response-side no-store behavior is already present on current refactor; this PR keeps that behavior covered while fixing the remaining client fetch policy gap.

What changed

  • Added a shared remoteFetchInit helper that applies cache: "no-store" to remote runtime fetch calls.
  • Routed health, /api/invoke, generic JSON/SSE event streams, /api/llm/stream, and stream cancel fetches through that helper.
  • Added regression coverage for every changed remote fetch path.
  • Updated scratch/bugfix-verification.json with the issue-2070 proof ledger.

Refactor impact

Primary owner:

  • Shared API wrapper / remote runtime.

Impact areas reviewed:

  • src/shared/api/remote-runtime.ts
  • src/shared/api/remote-runtime.test.ts
  • Existing src-tauri/src/http_server.rs no-store/managed-asset cache header coverage

Boundary notes:

  • Client-side remote fetch policy stays in src/shared/api.
  • Hostable HTTP response cache policy remains in src-tauri; this PR does not change managed asset headers.
  • No React feature UI, engine behavior, storage schema, auth, dependency, or release metadata changes.

Pressure points touched:

  • Remote runtime health probe, invoke calls, JSON/SSE stream calls, LLM stream calls, and stream cancel calls.

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

  • Codex ran pnpm test -- src/shared/api/remote-runtime.test.ts: passed, 5 tests.
  • Codex ran cargo test --manifest-path src-tauri/Cargo.toml api_no_store_headers_apply_only_to_api_responses: passed, 1 test.
  • Codex ran pnpm typecheck: passed.
  • Codex ran node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json: passed.
  • Codex ran pnpm check: passed.
  • Codex ran Bunny before opening this draft: pass.
  • Manual verification needed: none for the core claim; this is a cache-policy wrapper/header behavior with no visible UI state.

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:

  • Compatibility bugfix for remote runtime cache policy; no new user-discoverable feature or setting 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 remote runtime cache-policy fix with no visible UI state; proof is command/test output plus the issue-2070 verification ledger.


🔄 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/2090 **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-2070-api-cache-policy` --- ### 📝 Commits (2) - [`9c58aaf`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9c58aafcf0ab9f6e268e618b8b3ce8a0e5bfacb0) Fix remote runtime API cache policy - [`fb35544`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fb35544a94a715b909fd46487201ab590af9ae13) Record issue 2070 PR proof ### 📊 Changes **3 files changed** (+179 additions, -68 deletions) <details> <summary>View changed files</summary> 📝 `scratch/bugfix-verification.json` (+69 -55) 📝 `src/shared/api/remote-runtime.test.ts` (+91 -1) 📝 `src/shared/api/remote-runtime.ts` (+19 -12) </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 #2070 ## Why this change - Restores legacy no-store parity for remote runtime JSON/SSE client fetches so health checks, command calls, import streams, LLM streams, and cancel requests do not reuse stale browser/proxy cache entries. - The hostable response-side no-store behavior is already present on current `refactor`; this PR keeps that behavior covered while fixing the remaining client fetch policy gap. ## What changed - Added a shared `remoteFetchInit` helper that applies `cache: "no-store"` to remote runtime fetch calls. - Routed health, `/api/invoke`, generic JSON/SSE event streams, `/api/llm/stream`, and stream cancel fetches through that helper. - Added regression coverage for every changed remote fetch path. - Updated `scratch/bugfix-verification.json` with the issue-2070 proof ledger. ## Refactor impact Primary owner: - Shared API wrapper / remote runtime. Impact areas reviewed: - `src/shared/api/remote-runtime.ts` - `src/shared/api/remote-runtime.test.ts` - Existing `src-tauri/src/http_server.rs` no-store/managed-asset cache header coverage Boundary notes: - Client-side remote fetch policy stays in `src/shared/api`. - Hostable HTTP response cache policy remains in `src-tauri`; this PR does not change managed asset headers. - No React feature UI, engine behavior, storage schema, auth, dependency, or release metadata changes. Pressure points touched: - Remote runtime health probe, invoke calls, JSON/SSE stream calls, LLM stream calls, and stream cancel calls. ## 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 - Codex ran `pnpm test -- src/shared/api/remote-runtime.test.ts`: passed, 5 tests. - Codex ran `cargo test --manifest-path src-tauri/Cargo.toml api_no_store_headers_apply_only_to_api_responses`: passed, 1 test. - Codex ran `pnpm typecheck`: passed. - Codex ran `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json`: passed. - Codex ran `pnpm check`: passed. - Codex ran Bunny before opening this draft: pass. - Manual verification needed: none for the core claim; this is a cache-policy wrapper/header behavior with no visible UI state. ## 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: - Compatibility bugfix for remote runtime cache policy; no new user-discoverable feature or setting 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 remote runtime cache-policy fix with no visible UI state; proof is command/test output plus the issue-2070 verification ledger. --- <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#5431
No description provided.