[PR #1372] [MERGED] Fix hostable runtime command parity #5041

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1372
Author: @cha1latte
Created: 5/27/2026
Status: ✅ Merged
Merged: 5/27/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/refactor-issue-1346-hostable-commands


📝 Commits (1)

  • 701a457 Fix hostable runtime command parity

📊 Changes

3 files changed (+852 additions, -61 deletions)

View changed files

📝 src-tauri/src/commands/storage.rs (+15 -15)
📝 src-tauri/src/http_dispatch.rs (+689 -24)
📝 src/shared/api/remote-runtime.ts (+148 -22)

📄 Description

Linked issue

Closes #1346

Why this change

  • The hostable /api/invoke runtime only exposed 40 commands while desktop exposed 171, leaving many remote-capable refactor features unreachable when the app is configured to use a Remote Runtime URL.
  • PR #1370 restored the hostable runtime security gates first; this PR lands the command-surface parity fix on top of that gated runtime.

What changed

  • Expanded REMOTE_COMMANDS to include every desktop command that can be represented as a JSON request/response command.
  • Added matching /api/invoke dispatch handlers for the added remote commands, reusing the same Rust storage/capability modules as the desktop Tauri command wrappers.
  • Left five shell/channel-only commands desktop-only: fonts_open_folder, game_assets_open_folder, spotify_authorize, import_st_bulk_run_events, and llm_stream_channel.
  • Added a Rust regression test that compares desktop command registration, the shared remote allowlist, and HTTP dispatch so future command-surface drift fails fast.

Refactor impact

Primary owner:

Shared API / remote runtime / Rust HTTP dispatch.

Impact areas reviewed:

  • Shared API wrapper and remote runtime routing
  • Tauri/Rust command registration and HTTP dispatch
  • Remote runtime security dependency from PR #1370
  • Import/export, storage, assets, integrations, agents, and Professor Mari command reachability

Boundary notes:

  • This proves dispatch reachability and command-surface parity, not full provider/device behavior for every integration.
  • Shell/browser-opening actions and Tauri IPC Channel streaming remain desktop-only by design. Remote LLM streaming continues to use /api/llm/stream.
  • No schema, dependency, version, release metadata, or prompt assembly changes.

Pressure points touched:

  • src-tauri/src/lib.rs command registration is used as ground truth by the new parity test.
  • src/shared/api/remote-runtime.ts
  • src-tauri/src/http_dispatch.rs
  • src-tauri/src/commands/storage.rs

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

  • Codex ran node scratch\issue-1346-command-parity.mjs: desktop=171, desktop-only=5, remote allowlist=166, HTTP dispatch=166, no missing or extra remote commands.
  • Codex ran cargo test --manifest-path src-tauri\Cargo.toml --workspace remote_runtime_command_surfaces_match_desktop_minus_documented_desktop_only.
  • Codex ran pnpm check.
  • Codex ran node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json.
  • Manual integration behavior for provider/device-backed commands such as Spotify, haptics, TTS, and external model/image providers is still a human/provider-credential check; this PR proves those commands are reachable through the secured remote dispatch path.

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; non-UI remote runtime dispatch fix.


🔄 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/1372 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/27/2026 **Status:** ✅ Merged **Merged:** 5/27/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/refactor-issue-1346-hostable-commands` --- ### 📝 Commits (1) - [`701a457`](https://github.com/Pasta-Devs/Marinara-Engine/commit/701a45783832942ace3141508569ca8349fe7703) Fix hostable runtime command parity ### 📊 Changes **3 files changed** (+852 additions, -61 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage.rs` (+15 -15) 📝 `src-tauri/src/http_dispatch.rs` (+689 -24) 📝 `src/shared/api/remote-runtime.ts` (+148 -22) </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 #1346 ## Why this change - The hostable `/api/invoke` runtime only exposed 40 commands while desktop exposed 171, leaving many remote-capable refactor features unreachable when the app is configured to use a Remote Runtime URL. - PR #1370 restored the hostable runtime security gates first; this PR lands the command-surface parity fix on top of that gated runtime. ## What changed - Expanded `REMOTE_COMMANDS` to include every desktop command that can be represented as a JSON request/response command. - Added matching `/api/invoke` dispatch handlers for the added remote commands, reusing the same Rust storage/capability modules as the desktop Tauri command wrappers. - Left five shell/channel-only commands desktop-only: `fonts_open_folder`, `game_assets_open_folder`, `spotify_authorize`, `import_st_bulk_run_events`, and `llm_stream_channel`. - Added a Rust regression test that compares desktop command registration, the shared remote allowlist, and HTTP dispatch so future command-surface drift fails fast. ## Refactor impact Primary owner: Shared API / remote runtime / Rust HTTP dispatch. Impact areas reviewed: - Shared API wrapper and remote runtime routing - Tauri/Rust command registration and HTTP dispatch - Remote runtime security dependency from PR #1370 - Import/export, storage, assets, integrations, agents, and Professor Mari command reachability Boundary notes: - This proves dispatch reachability and command-surface parity, not full provider/device behavior for every integration. - Shell/browser-opening actions and Tauri IPC Channel streaming remain desktop-only by design. Remote LLM streaming continues to use `/api/llm/stream`. - No schema, dependency, version, release metadata, or prompt assembly changes. Pressure points touched: - `src-tauri/src/lib.rs` command registration is used as ground truth by the new parity test. - `src/shared/api/remote-runtime.ts` - `src-tauri/src/http_dispatch.rs` - `src-tauri/src/commands/storage.rs` ## Validation - [ ] `pnpm check` passes locally - [ ] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [ ] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes - Codex ran `node scratch\issue-1346-command-parity.mjs`: desktop=171, desktop-only=5, remote allowlist=166, HTTP dispatch=166, no missing or extra remote commands. - Codex ran `cargo test --manifest-path src-tauri\Cargo.toml --workspace remote_runtime_command_surfaces_match_desktop_minus_documented_desktop_only`. - Codex ran `pnpm check`. - Codex ran `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json`. - Manual integration behavior for provider/device-backed commands such as Spotify, haptics, TTS, and external model/image providers is still a human/provider-credential check; this PR proves those commands are reachable through the secured remote dispatch path. ## 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; non-UI remote runtime dispatch fix. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:12:43 +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#5041
No description provided.