mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2067] Hostable storage I/O errors should return actionable 503 responses #1016
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1016
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Promansis on GitHub (Jun 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2067
Originally assigned to: @cha1latte on GitHub.
Summary
Hostable Rust remote runtime storage I/O failures can fall through to HTTP 500 instead of the legacy-style actionable service-unavailable response. The writable health check catches some not-writable startup states, but command-level storage failures still appear less precise.
Expected behavior
Storage I/O failures that indicate unavailable or unwritable user data should surface as stable, actionable HTTP errors. For readonly/locked/unavailable storage, legacy behavior used 503-style responses with user-facing guidance instead of a generic 500.
Actual behavior
Static parityscan found that Rust
AppError::from(std::io::Error)produces codeio_error, whilesrc-tauri/src/http_server.rsdoes not mapio_errorto a non-500 status. It falls through the default HTTP error mapping to500.Refactor evidence:
src-tauri/crates/core/src/lib.rsmapsstd::io::ErrorintoAppErrorcodeio_error.src-tauri/src/http_server.rsmaps known codes likenot_found,invalid_input,admin_access_*, andunsupported_command; all other codes default to500.src-tauri/src/http_server.rshealth does test writable storage, but that does not necessarily classify command-level storage I/O failures after readiness.Legacy evidence:
packages/server/src/middleware/error-handler.tsmappedSQLITE_READONLY/ readonly database errors andSQLITE_BUSY/ locked database errors to 503 with actionable copy.Steps to reproduce
main:packages/server/src/middleware/error-handler.ts.src-tauri/crates/core/src/lib.rsforstd::io::Errorconversion toio_error.src-tauri/src/http_server.rsHttpErrormapping and observeio_erroris not mapped, so it defaults to 500.checkRemoteRuntimeHealthmay warn on non-writable health state, but command-levelio_errorstill has no stable 503-style envelope.Impact area
Environment
refactorat9bcfb164during parityscanLogs, screenshots, or video
No runtime logs. Static parity evidence from:
src-tauri/crates/core/src/lib.rssrc-tauri/src/http_server.rssrc/shared/api/remote-runtime.tsmain:packages/server/src/middleware/error-handler.tsRegression notes
Legacy
mainconverted readonly/locked storage backend failures to 503 responses with actionable messages. Current refactor hostable runtime can still report command-level storage I/O failures as generic 500s, which can hide the same readiness/auth-adjacent failures this target is trying to make visible.Additional context
Found during Target 3 remote runtime parityscan slice for health, error, readiness contracts, writable storage, invalid URL handling, HTTP error envelope, and retry metadata. Parent tracker: #2050.
Suggested repair: classify storage-related
io_errorcases into stablestorage_unavailable/storage_not_writablestyle codes, map them to 503, and add focused hostable HTTP tests for a should-fail storage command path.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:
@cha1latte commented on GitHub (Jun 3, 2026):
Fixed in #2083