[GH-ISSUE #2060] [Issue]: remote storage IO errors map to generic 500 #1005

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/2060

Originally assigned to: @cha1latte on GitHub.

Summary

Remote Runtime command-level storage io_error failures currently map to generic HTTP 500 responses instead of the more actionable 503-style storage failure behavior legacy provided for read-only or locked database cases.

Expected behavior

When Remote Runtime storage commands fail because the data store is unavailable, read-only, locked, or otherwise not writable at command time, the HTTP error should be specific and actionable. Legacy converted comparable storage availability failures into 503-class responses with user-facing guidance.

Actual behavior

Target 3 health/error/readiness tracing found Rust io_error falls through the hostable HTTP error mapper to a generic 500. The writable /health check catches some not-writable runtime states up front, but command-level storage failures can still produce less precise errors.

Evidence:

  • Refactor src-tauri/src/http_server.rs maps HTTP errors and currently treats generic io_error as 500.
  • Refactor src-tauri/crates/core/src/lib.rs defines core app error codes including IO failures.
  • Legacy packages/server/src/middleware/error-handler.ts converted read-only/locked database failures into 503 with actionable copy.

Steps to reproduce

  1. Run hostable Remote Runtime against a data directory that becomes read-only, locked, or otherwise fails during command execution after startup.
  2. Call a storage-backed /api/invoke command.
  3. Observe the HTTP status and message for the resulting io_error.

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: storage-backed commands

Logs, screenshots, or video

No destructive runtime repro attached. This is static parity evidence from Target 3.

Regression notes

Legacy main provided more actionable 503-class handling for storage availability failures. Refactor health readiness is stronger at startup, but command-level failure mapping still appears weaker.

Additional context

Related tracker: #1904 target 3 and #2050. Suggested fix: map storage availability io_error cases to a stable 503-class response where appropriate, without masking unrelated internal errors.

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/2060 Originally assigned to: @cha1latte on GitHub. ## Summary Remote Runtime command-level storage `io_error` failures currently map to generic HTTP 500 responses instead of the more actionable 503-style storage failure behavior legacy provided for read-only or locked database cases. ## Expected behavior When Remote Runtime storage commands fail because the data store is unavailable, read-only, locked, or otherwise not writable at command time, the HTTP error should be specific and actionable. Legacy converted comparable storage availability failures into 503-class responses with user-facing guidance. ## Actual behavior Target 3 health/error/readiness tracing found Rust `io_error` falls through the hostable HTTP error mapper to a generic 500. The writable `/health` check catches some not-writable runtime states up front, but command-level storage failures can still produce less precise errors. Evidence: - Refactor `src-tauri/src/http_server.rs` maps HTTP errors and currently treats generic `io_error` as 500. - Refactor `src-tauri/crates/core/src/lib.rs` defines core app error codes including IO failures. - Legacy `packages/server/src/middleware/error-handler.ts` converted read-only/locked database failures into 503 with actionable copy. ## Steps to reproduce 1. Run hostable Remote Runtime against a data directory that becomes read-only, locked, or otherwise fails during command execution after startup. 2. Call a storage-backed `/api/invoke` command. 3. Observe the HTTP status and message for the resulting `io_error`. ## 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: storage-backed commands ## Logs, screenshots, or video No destructive runtime repro attached. This is static parity evidence from Target 3. ## Regression notes Legacy `main` provided more actionable 503-class handling for storage availability failures. Refactor health readiness is stronger at startup, but command-level failure mapping still appears weaker. ## Additional context Related tracker: #1904 target 3 and #2050. Suggested fix: map storage availability `io_error` cases to a stable 503-class response where appropriate, without masking unrelated internal errors. ## 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#1005
No description provided.