[GH-ISSUE #1247] [Issue]: Refactor HTTP storage_delete skips message tracker snapshot cleanup #609

Closed
opened 2026-10-20 17:30:42 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Xelvanis on GitHub (May 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1247

Originally assigned to: @cha1latte on GitHub.

Summary

The embedded storage_delete command has special cleanup behavior when deleting messages, but the HTTP remote-runtime storage_delete dispatcher appears to delete the row without that message-specific cleanup. Remote message deletion can leave tracker snapshots or chat game-state data behind.

Expected behavior

Deleting a message through embedded Tauri and deleting the same message through remote /api/invoke should have equivalent storage semantics, including tracker snapshot cleanup and any chat game-state synchronization tied to message deletion.

Actual behavior

The embedded command path has message-specific cleanup for tracker snapshots. The HTTP dispatch path handles storage_delete as a generic storage delete and does not mirror that message cleanup branch.

Steps to reproduce

  1. On the refactor branch, run the remote runtime.
  2. Create a chat with an assistant message that has tracker snapshot/game-state data.
  3. Delete that message through the remote runtime path that calls /api/invoke with storage_delete.
  4. Inspect storage for leftover tracker snapshot rows or stale chat game-state data.

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, identified during 2026-05-26 failpath audit
  • Run mode: remote runtime / HTTP /api/invoke
  • OS + version: not OS-specific
  • Node + pnpm versions: not captured
  • Rust version, if relevant: not captured
  • Remote Runtime URL configured? yes
  • Provider, model, or integration, if relevant: not relevant

Logs, screenshots, or video

Relevant code paths:

src-tauri/src/commands/storage/commands/entities.rs
src-tauri/src/http_dispatch.rs

Audit finding:

Embedded storage_delete handles message tracker snapshot cleanup.
HTTP storage_delete dispatch does not appear to include the messages-specific cleanup branch.

Regression notes

Found by source inspection during the 2026-05-26 failpath audit. Needs a focused embedded-vs-HTTP parity test.

Additional context

This is remote runtime parity, not a UI-only deletion problem. The fix should keep the delete owner centralized or add parity coverage so embedded and HTTP entrypoints cannot drift again.

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 @Xelvanis on GitHub (May 26, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1247 Originally assigned to: @cha1latte on GitHub. ## Summary The embedded `storage_delete` command has special cleanup behavior when deleting messages, but the HTTP remote-runtime `storage_delete` dispatcher appears to delete the row without that message-specific cleanup. Remote message deletion can leave tracker snapshots or chat game-state data behind. ## Expected behavior Deleting a message through embedded Tauri and deleting the same message through remote `/api/invoke` should have equivalent storage semantics, including tracker snapshot cleanup and any chat game-state synchronization tied to message deletion. ## Actual behavior The embedded command path has message-specific cleanup for tracker snapshots. The HTTP dispatch path handles `storage_delete` as a generic storage delete and does not mirror that message cleanup branch. ## Steps to reproduce 1. On the `refactor` branch, run the remote runtime. 2. Create a chat with an assistant message that has tracker snapshot/game-state data. 3. Delete that message through the remote runtime path that calls `/api/invoke` with `storage_delete`. 4. Inspect storage for leftover tracker snapshot rows or stale chat game-state data. ## Impact area - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [x] Chat mode - [ ] Roleplay mode - [x] Game mode - [ ] Shared mode UI - [x] 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`, identified during 2026-05-26 failpath audit - Run mode: remote runtime / HTTP `/api/invoke` - OS + version: not OS-specific - Node + pnpm versions: not captured - Rust version, if relevant: not captured - Remote Runtime URL configured? yes - Provider, model, or integration, if relevant: not relevant ## Logs, screenshots, or video Relevant code paths: ```text src-tauri/src/commands/storage/commands/entities.rs src-tauri/src/http_dispatch.rs ``` Audit finding: ```text Embedded storage_delete handles message tracker snapshot cleanup. HTTP storage_delete dispatch does not appear to include the messages-specific cleanup branch. ``` ## Regression notes Found by source inspection during the 2026-05-26 failpath audit. Needs a focused embedded-vs-HTTP parity test. ## Additional context This is remote runtime parity, not a UI-only deletion problem. The fix should keep the delete owner centralized or add parity coverage so embedded and HTTP entrypoints cannot drift again. ## 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-20 17:30:42 +07:00
Author
Owner

@cha1latte commented on GitHub (May 26, 2026):

closed in #1304

<!-- gh-comment-id:4548413834 --> @cha1latte commented on GitHub (May 26, 2026): closed in #1304
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#609
No description provided.