mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2028] 2. Storage and data access #991
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#991
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 @Xelvanis on GitHub (Jun 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2028
Originally assigned to: @Xelvanis on GitHub.
Target 2: Storage And Data Access
Scope
Included:
Not checked:
Surface Inventory Additions
packages/server/src/services/storage/*; message and resource list/get routessrc/engine/capabilities/storage.ts;src-tauri/src/commands/storage/commands/entities.rs;src-tauri/src/commands/storage/shared.rs;src-tauri/src/http_dispatch.rspackages/server/src/db/schema/chats.ts;packages/server/src/services/storage/chats.storage.tssrc-tauri/src/commands/storage/shared.rs;src-tauri/src/commands/storage/commands/entities.rssrc-tauri/src/commands/storage/contracts.rs;src-tauri/src/commands/storage/shared.rs;src-tauri/src/commands/storage/profile.rs;src-tauri/src/state.rspackages/server/src/services/storage/*; resource routes inpackages/server/src/routes/*src/engine/capabilities/storage.ts;src/shared/api/storage-api.ts;src/shared/api/storage-commands-api.ts;src-tauri/src/commands/storage/commands/entities.rs;src-tauri/src/http_dispatch.rspackages/shared/src/schemas/*;packages/server/src/routes/*;packages/server/src/services/storage/*src-tauri/src/commands/storage/contracts.rs;src-tauri/src/commands/storage/commands/entities.rs;src-tauri/src/commands/storage/shared.rs;src-tauri/src/http_dispatch.rs.bakfallback, corrupt primary/backup handling, atomic writes, and flush self-heal behavior.packages/server/src/db/file-backed-store.ts;packages/server/src/db/connection.ts;packages/server/src/app.tssrc-tauri/crates/storage/src/lib.rs;src-tauri/src/state.rspackages/server/src/services/storage/chats.storage.ts;packages/server/src/services/storage/lorebooks.storage.ts;packages/server/src/services/storage/prompts.storage.ts; folder storage servicessrc-tauri/src/commands/storage/commands/entities.rs;src-tauri/src/commands/storage/chats.rs;src-tauri/src/commands/storage/contracts.rs;src-tauri/src/commands/storage/game_state_snapshots.rs;src-tauri/src/connection_refs.rspackages/server/src/routes/chats.routes.ts;packages/server/src/routes/characters.routes.ts;packages/server/src/routes/connections.routes.ts; related storage servicessrc-tauri/src/commands/storage/commands/entities.rs;src-tauri/src/commands/storage/commands/chats.rs;src-tauri/src/commands/storage/commands/game_state_snapshots.rs; focused wrappers insrc/shared/apipackages/server/src/services/storage/chats.storage.ts;packages/server/src/routes/chats.routes.tssrc/shared/api/storage-api.ts;src-tauri/src/commands/storage/chats.rs;src-tauri/src/commands/storage/shared.rs;src-tauri/src/http_dispatch.rspackages/server/src/services/storage/chats.storage.ts;packages/server/src/services/storage/game-state.storage.ts;packages/server/src/services/storage/gallery.storage.ts;packages/server/src/routes/chats.routes.tssrc-tauri/src/commands/storage/chats.rs;src-tauri/src/commands/storage/game_state_snapshots.rs;src-tauri/src/commands/storage/shared.rs;src/engine/generation/tracker-snapshots.tspackages/server/src/services/storage/connections.storage.ts;packages/server/src/routes/connections.routes.ts;packages/server/src/routes/backup.routes.tssrc-tauri/src/commands/storage/connection_secrets.rs;src-tauri/src/commands/storage/commands/entities.rs;src-tauri/src/http_dispatch.rs;src/shared/api/storage-api.tspackages/server/src/routes/backup.routes.ts;packages/server/src/db/file-backed-store.tssrc-tauri/src/commands/storage/contracts.rs;src-tauri/src/commands/storage/profile.rs;src-tauri/src/commands/storage/profile/legacy.rs;src-tauri/src/commands/storage/profile/zip_import.rspackages/server/src/routes/backup.routes.ts;packages/shared/src/types/export.tssrc-tauri/src/commands/storage/profile.rs;src-tauri/src/commands/storage/profile/assets.rs;src-tauri/src/commands/storage/profile/zip_import.rs;src-tauri/src/commands/storage/backup.rs;src/shared/api/profile-api.tspackages/server/src/routes/import.routes.ts; import services underpackages/server/src/services/import/*; backup import pathssrc-tauri/src/commands/storage/imports/**;src-tauri/src/commands/storage/profile/assets.rs;src-tauri/src/commands/storage/imports/rollback.rs;src/shared/api/import-api.tspackages/server/src/routes/admin.routes.ts;packages/server/src/db/schema/*src-tauri/src/commands/storage/admin.rs;src-tauri/src/http_dispatch.rs;src/shared/api/admin-api.tssrc/features/catalog/*/hooks;src/app;src/shared/api/storage-api.ts;src-tauri/src/commands/storage/commands/entities.rspackages/server/src/services/storage/chats.storage.ts;packages/server/src/routes/chats.routes.tssrc/features/catalog/chats/hooks/use-chats.ts;src/features/modes/shared/chat-ui/hooks/use-chat-surface-data.ts;src/app/startup/chat-switch-effects.ts;src-tauri/src/commands/storage/commands/entities.rs;src-tauri/crates/storage/src/lib.rssrc/engine/generation/context.ts;src/engine/generation/prompt-preview.ts;src/engine/generation/prompt-assembly.ts;src/engine/generation/start-generation.ts;src/features/catalog/chats/hooks/use-chats.tssrc/features/modes/conversation/hooks/autonomous/use-background-autonomous.ts;src/engine/modes/chat/schedules/schedule.service.ts;src/engine/generation/active-lorebook-scanner.ts;src/engine/generation/agent-runner.tssrc/shared/api/remote-runtime.ts;src-tauri/src/http_dispatch.rs;src-tauri/src/http_server.rs; focused wrappers insrc/shared/apisrc/shared/api/storage-api.ts;src/shared/api/import-api.ts;src/shared/api/profile-api.ts;src/shared/api/local-file-api.ts;src-tauri/src/http_server.rspackages/server/src/routes/avatars.routes.ts;packages/server/src/routes/backgrounds.routes.ts;packages/server/src/routes/gallery.routes.ts;packages/server/src/routes/sprites.routes.ts;packages/server/src/routes/knowledge-sources.routes.tssrc-tauri/src/commands/storage/avatars.rs;src-tauri/src/commands/storage/backgrounds.rs;src-tauri/src/commands/storage/media_uploads.rs;src-tauri/src/commands/storage/sprites.rs;src-tauri/src/commands/storage/knowledge.rsCoverage Matrix
Status values are normalized to one tracker token per row. Proof flavor and limitations are recorded in the proof column instead of being encoded into the status.
storage_getfull-row readgeneric_storageandstorage_list_projectedfocused tests pass.message_swipes,delete_swipe, and branch-chat focused tests pass.generic_storagefocused tests pass.089e1d72static/focused proof shows remote multipart profile upload, preview/progress coverage, JSON missing-asset warnings, and profile upload body-limit coverage; profile/ZIP/import rollback tests pass. #2108 closed on 2026-06-04, so no open Target 2 blocker remains.admin_clear_alland remote-admin guard focused tests pass.Batch Progress
gaps_open.089e1d72on_par.Follow-Ups
storage_getfull-row read parity.089e1d72proof covered multipart profile upload, upload preview/progress, JSON missing-asset warnings, and profile upload body limit. No open Target 2 blocker remains.Rescan Criteria
Target 2 is
on_paras oforigin/refactor 089e1d72plus #2108 closure on 2026-06-04.Rescan if a later
refactorchange touches storage CRUD/projection, profile import/export, remote profile upload routes, storage I/O error mapping, admin destructive commands, or managed asset import/write paths.Residual manual gap:
Batch 1 Foundation Rescan - 2026-06-03
Base:
fix/message-swipe-sidecar-regressionatf56efb20.origin/main/ v1.6.1 file-native storage.Outcome:
gaps_open; #1923 later closed via merged PR #2021, and #2029/#2030 were later closed and proof-checked in batch 6.Proof:
cargo test --manifest-path src-tauri/Cargo.toml generic_storage-> 4 passed.cargo test --manifest-path src-tauri/Cargo.toml storage_list_projected-> 4 passed.cargo test --manifest-path src-tauri/Cargo.toml storage_list_searches_projected_character_fields_without_returning_avatar_payloads-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml registry_answers_core_contract_questions-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml app_state_startup_recovers_when_collection_and_backup_are_corrupt-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml agent_default_connection-> 2 passed.cargo test --manifest-path src-tauri/Cargo.toml http_dispatch::tests::dispatch_storage-> 7 passed.cargo test --manifest-path src-tauri/Cargo.toml -p marinara-storage-> 34 passed.Batch 2 Data-Loss And Guard Behavior - 2026-06-03
Base:
fix/message-swipe-sidecar-regressionatf56efb20.origin/main/ v1.6.1 file-native storage.Outcome:
Proof:
cargo test --manifest-path src-tauri/Cargo.toml generic_storage_commands-> 2 passed.cargo test --manifest-path src-tauri/Cargo.toml generic_storage_mutations_reject_message_swipe_sidecars-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml normalize_typed_lorebook_entry-> 5 passed.cargo test --manifest-path src-tauri/Cargo.toml game_state_snapshot_rejects_malformed_persona_stats_string-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml -p marinara-storage corrupt_collection-> 2 passed.cargo test --manifest-path src-tauri/Cargo.toml -p marinara-storage writes_refresh_backup-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml -p marinara-storage replace_all_many-> 5 passed.cargo test --manifest-path src-tauri/Cargo.toml -p marinara-storage update_collections_atomically-> 5 passed.cargo test --manifest-path src-tauri/Cargo.toml deleting_-> 6 passed.cargo test --manifest-path src-tauri/Cargo.toml delete_chat-> 2 passed.cargo test --manifest-path src-tauri/Cargo.toml delete_swipe-> 2 passed.cargo test --manifest-path src-tauri/Cargo.toml dispatch_storage_delete-> 2 passed.cargo test --manifest-path src-tauri/Cargo.toml connection_delete-> 2 passed.cargo test --manifest-path src-tauri/Cargo.toml admin_expunge-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml admin_access-> 0 matched.cargo test --manifest-path src-tauri/Cargo.toml profile_import_-> 13 passed.cargo test --manifest-path src-tauri/Cargo.toml legacy_present_but_malformed_table_is_rejected_without_wiping-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml legacy_partial_profile_does_not_wipe_absent_collections-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml connection_api_key-> 2 passed.cargo test --manifest-path src-tauri/Cargo.toml projected_connection_get_preserves_secret_mask_fields-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml duplicating_connection_resets_default_flags_and_keeps_secret_masked-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml profile_export_import_preserves_connection_folders-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml removes_professor_mari_character_seed-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml removes_legacy_professor_mari_records-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml admin_clear_all-> 0 matched.cargo test --manifest-path src-tauri/Cargo.toml moving_connection_rejects_missing_folder-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml reordering_connection_folders_requires_each_folder_once-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml default_chat_preset-> 1 passed.Batch 3 Chat/message Storage - 2026-06-03
Base:
fix/message-swipe-sidecar-regressionatf56efb20.origin/main/ v1.6.1 file-native storage.Outcome:
swipes/swipeCount/swipePreviews, sidecars live inmessage-swipes, projected reads materialize summaries without returning full sidecar payloads, and native/legacy profile imports normalize or clear sidecars coherently.hiddenFromAIkey; batch 6 confirms #2030 is closed and focused proof now passes.bulk_delete_messageshas no focused test match.Proof:
cargo test --manifest-path src-tauri/Cargo.toml message_swipes-> 26 passed.cargo test --manifest-path src-tauri/Cargo.toml prompt_snapshot-> 6 passed.cargo test --manifest-path src-tauri/Cargo.toml delete_swipe-> 2 passed.cargo test --manifest-path src-tauri/Cargo.toml branch_chat-> 4 passed.cargo test --manifest-path src-tauri/Cargo.toml dispatch_storage_delete_message_cleans_tracker_snapshots-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml projected_message-> 6 passed.cargo test --manifest-path src-tauri/Cargo.toml bulk_delete_messages-> 0 matched.cargo test --manifest-path src-tauri/Cargo.toml chat_memor-> 0 matched.cargo test --manifest-path src-tauri/Cargo.toml chat_message-> 0 matched.Batch 4 Performance Hot Paths - 2026-06-04
Base:
f56efb20;origin/refactorfetched at86c9b8c9and shape-checked for the same hot-path callers.origin/main/ v1.6.1 server storage reference.Outcome:
8.87mscold /8.18mswarm and avoided full transcript payloads.1798.17mscold /1681.39mswarm for 1,200 large cards and chat summaries measured874.68ms/872.68msfor 2,500 chats. Tracked in #2036, later closed by merged PR #2052; fresh timing still needed.Proof:
cargo test --manifest-path src-tauri/Cargo.toml -p marinara-storage perf_hot_paths_large_profile_timing -- --nocapturewith temporary synthetic integration harness -> 1 passed.timeline.page_projected_20:8.87mscold /8.18mswarm; payload130,221bytes.generation.full_messages:3069.33mscold /2983.80mswarm; payload101,686,891bytes.timeline.message_count:129.76mscold /128.60mswarm.catalog.characters.projected:1798.17mscold /1681.39mswarm; payload5,324,581bytes.catalog.chats.summary_projected:874.68mscold /872.68mswarm; payload878,891bytes.lorebook_entries.one_book_full_filter:215.76mscold /20.22mswarm; payload1,311,385bytes.Batch 5 Cross-target Handoff Scan - 2026-06-04
Base:
f56efb20;origin/refactorfetched at86c9b8c9and shape-checked for the same backup/remote exposure paths.origin/main/ v1.6.1 server storage reference.Outcome:
backup_listnow requires Admin Access and omits local backup paths, with Target 3 still owning remote-runtime-wide policy proof.Proof:
cargo test --manifest-path src-tauri/Cargo.toml backup::tests -- --nocapture-> 2 passed.cargo test --manifest-path src-tauri/Cargo.toml profile_import_ -- --nocapture-> 13 passed.cargo test --manifest-path src-tauri/Cargo.toml import_profile_zip -- --nocapture-> 2 passed.cargo test --manifest-path src-tauri/Cargo.toml rolls_back -- --nocapture-> 11 passed.cargo test --manifest-path src-tauri/Cargo.toml restores_target -- --nocapture-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml preserves_group_id_when_branch_import_fails -- --nocapture-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml persona_avatar_file_rolls_back -- --nocapture-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml http_dispatch::tests::remote_runtime_command_surfaces_match_desktop_minus_documented_non_remote_commands -- --nocapture-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml http_dispatch::tests::dispatch_rejects_remote_raw_server_path_commands -- --nocapture-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml http_server::tests::hostable_security_ -- --nocapture-> 10 passed.packages/server/src/routes/backup.routes.tslisted backups as{ name, createdAt }; refactorsrc-tauri/src/commands/storage/backup.rsreturns{ name, createdAt, path }.Batch 6 Current Refactor Refresh - 2026-06-04
Base:
origin/refactoratd20876dc.origin/main/ v1.6.1 file-native storage reference.Outcome:
gaps_openbecause #2036 still tracked large selector summary/cache performance. Batch 7 moves the current target verdict tofixed_needs_rescanafter #2036 closed.hiddenFromAIandhiddenFromAi; focused Rust proof passes.listLorebookEntriesByLorebookIdsand Rustlist_where_in; focused TS and Rust proof pass.pathfrom list responses; backup and remote command-surface proof pass.Proof:
cargo test --manifest-path src-tauri/Cargo.toml admin_clear_all -- --nocapture-> 8 passed.cargo test --manifest-path src-tauri/Cargo.toml chat_memor -- --nocapture-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml lorebook_entries_list_by_lorebook_ids_reads_matching_books_once -- --nocapture-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml hostable_security_requires_admin_access_for_remote_backup_list -- --nocapture-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml http_dispatch::tests::remote_runtime_command_surfaces_match_desktop_minus_documented_non_remote_commands -- --nocapture-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml backup::tests -- --nocapture-> 2 passed.pnpm test -- src/engine/generation/active-lorebook-scanner.test.ts-> 1 file / 1 test passed.pnpm test -- src/engine/generation/start-generation.test.ts-> no test file found.pnpm test -- src/engine/modes/chat/autonomous/autonomous.service.test.ts-> no test file found.Static trace:
src-tauri/src/commands/storage/admin.rs,src-tauri/src/http_dispatch.rs,src-tauri/src/http_server.rs,src/shared/api/admin-api.ts.src-tauri/src/commands/storage/chats.rs.src/engine/generation/start-generation.ts,src/engine/generation/context.ts,src/engine/modes/chat/autonomous/autonomous.service.ts.src/engine/capabilities/storage.ts,src/shared/api/storage-api.ts,src/engine/generation/active-lorebook-scanner.ts,src-tauri/src/commands/storage/commands/entities.rs.src/shared/api/remote-runtime.ts,src-tauri/src/http_server.rs,src-tauri/src/commands/storage/backup.rs.src/features/catalog/personas/hooks/use-personas.ts,src/features/catalog/connections/hooks/use-connections.ts,src/features/catalog/presets/hooks/use-presets.ts,src/features/catalog/characters/hooks/use-characters.ts,src/features/modes/shared/chat-ui/hooks/use-chat-surface-data.ts. Batch 7 supersedes this with PR #2052 closure evidence.Batch 7 #2036 Closure Refresh - 2026-06-04
Base:
origin/refactorat6057d69c, merged PR #2052 (Fix catalog summary selector reads).fix/issue-2036-catalog-summary-readsatca8c9afd.Outcome:
gaps_opentofixed_needs_rescan: all known Target 2 follow-up blockers are closed, but there has not been a fresh Target 2 parity rescan or native/large-profile timing pass after #2052.origin/refactorshows connection selectors useCONNECTION_SUMMARY_OPTIONS, preset list/default/default-mutation paths usePRESET_SUMMARY_OPTIONS, chat surface usesuseCharacterSummariesByIds, and Rust storage owns projected-list cache keys/stamps plus invalidation.Proof:
cargo test --manifest-path src-tauri/Cargo.toml -p marinara-storage list_projected_ -- --nocapture-> 7 passed.pnpm test -- src/features/modes/shared/chat-ui/hooks/use-chat-surface-data.test.tsx-> 1 file / 1 test passed.Remaining rescan need:
refactorand repeat large-profile cold/warm timing before upgrading toon_par.Batch 8 Current Rescan After #2052 - 2026-06-04
Base:
origin/refactorat6057d69c.Outcome:
gaps_open, noton_par, because hostable remote storageio_errorstill falls through to generic HTTP 500 instead of legacy-style actionable 503-class storage failure behavior. Tracked in #2060/#2067.Proof:
cargo test --manifest-path src-tauri/Cargo.toml -p marinara-storage -- --nocapture-> 42 passed.generic_storage(4),storage_list_projected(4),message_swipes(26),prompt_snapshot(6),delete_swipe(2),branch_chat(4),projected_message(6),chat_memor(1),admin_clear_all(8),hostable_security_requires_admin_access_for_remote_backup_list(1),http_dispatch::tests::remote_runtime_command_surfaces_match_desktop_minus_documented_non_remote_commands(1),backup::tests(2),profile_import_(13),import_profile_zip(2),rolls_back(11),persona_avatar_file_rolls_back(1), andlorebook_entries_list_by_lorebook_ids_reads_matching_books_once(1).pnpm exec vitest run src/engine/generation/active-lorebook-scanner.test.ts-> 1 file / 1 test passed.pnpm exec vitest run src/features/modes/shared/chat-ui/hooks/use-chat-surface-data.test.tsx-> 1 file / 1 test passed.cargo test --manifest-path src-tauri/Cargo.toml -p marinara-storage perf_hot_paths_large_profile_timing -- --nocapturewith a temporary local integration harness -> 1 passed; harness removed after proof.Timing:
catalog.characters.panel_projected:1829.58mscold /156.99mswarm; 1,200 rows; 32,513,491 bytes.catalog.personas.summary_projected:1430.33mscold /120.95mswarm; 1,200 rows; 34,897,289 bytes.catalog.presets.summary_projected:1449.57mscold /119.71mswarm; 1,500 rows; 1,803,389 bytes.catalog.connections.summary_projected:772.69mscold /65.94mswarm; 1,500 rows; 2,165,589 bytes.catalog.chats.summary_projected:1761.13mscold /153.89mswarm; 2,500 rows; 1,378,813 bytes.timeline.page_projected_20:12.34mscold /12.24mswarm; 20 rows; 773,961 bytes.generation.recent_projected_80:49.73mscold /49.45mswarm; 80 rows; 3,095,841 bytes.lorebook.entries.where_in_projected:1208.15mscold /1236.09mswarm; 2,500 rows; 23,356,391 bytes.Static blocker trace:
src-tauri/crates/core/src/lib.rsmapsstd::io::ErrorintoAppErrorcodeio_error.src-tauri/src/http_server.rsmaps known error codes to 400/401/403/404/422/502/501, but all other codes, includingio_error, default to500.packages/server/src/middleware/error-handler.tsmapped readonly/locked storage backend failures to 503-style actionable responses.Cross-target notes:
Batch 9 Current Refactor Rescan After Remote/Storage Fixes - 2026-06-04
Base:
origin/refactorat5248a86b.Outcome:
io_errorcases map to HTTP 503 while uncategorized I/O remains 500.import_st_bulk_scannow requires Admin Access.gaps_openbecause #2108 reports large profile import is still broken for Remote Runtime: large ZIP upload exceeds/strains base64/body-limit transport,profile_import_fileis desktop-only, and JSON-only import fails on missing asset base64 instead of importing data with warnings.Proof:
cargo test --manifest-path src-tauri/Cargo.toml -p marinara-storage -- --nocapture-> 42 passed.generic_storage(4),storage_list_projected(4),message_swipes(26),prompt_snapshot(6),delete_swipe(2),branch_chat(4),projected_message(6),chat_memor(1),admin_clear_all(8),hostable_security_requires_admin_access_for_remote_backup_list(1),remote_st_bulk_scan_requires_admin_access(1),io_errors_map_to_storage_unavailable_http_status(3),locked_database_io_errors_map_to_storage_unavailable_http_status(1),message_only_storage_io_errors_map_to_storage_unavailable_http_status(1),uncategorized_io_errors_keep_internal_server_error_status(1),http_dispatch::tests::remote_runtime_command_surfaces_match_desktop_minus_documented_non_remote_commands(1),backup::tests(2),profile_import_(13),import_profile_zip(2),rolls_back(11),persona_avatar_file_rolls_back(1), andlorebook_entries_list_by_lorebook_ids_reads_matching_books_once(1).pnpm exec vitest run src/engine/generation/active-lorebook-scanner.test.ts src/features/modes/shared/chat-ui/hooks/use-chat-surface-data.test.tsx src/shared/api/remote-runtime.test.ts src/engine/modes/chat/schedules/schedule.service.test.ts-> 4 files / 9 tests passed.cargo test --manifest-path src-tauri/Cargo.toml -p marinara-storage perf_hot_paths_large_profile_timing -- --nocapturewith a temporary local integration harness -> 1 passed; harness removed after proof.Timing:
catalog.characters.panel_projected:1337.62mscold /111.84mswarm; 1,200 rows; 32,471,491 bytes.catalog.personas.summary_projected:1037.13mscold /87.95mswarm; 1,200 rows; 32,278,890 bytes.catalog.presets.summary_projected:449.85mscold /35.14mswarm; 1,500 rows; 1,779,389 bytes.catalog.connections.summary_projected:488.38mscold /37.19mswarm; 1,500 rows; 2,129,589 bytes.catalog.chats.summary_projected:710.06mscold /56.93mswarm; 2,500 rows; 1,241,313 bytes.timeline.page_projected_20:8.68mscold /8.47mswarm; 20 rows; 354,791 bytes.generation.recent_projected_80:23.56mscold /24.54mswarm; 80 rows; 1,419,161 bytes.lorebook.entries.where_in_projected:1230.86mscold /1517.45mswarm; 2,500 rows; 23,356,391 bytes.Static blocker trace:
src-tauri/src/http_server.rscaps JSON/API body size atMAX_API_BODY_BYTES = 256 * 1024 * 1024and guardsprofile_import/profile_import_uploadas privileged remote commands.src/shared/api/profile-api.tsstill base64-encodes file uploads before invokingprofile_import_upload;profile_import_fileis only available for embedded/Tauri path import and is listed as not remote insrc-tauri/src/http_dispatch.rs.src-tauri/src/commands/storage/profile/assets.rsstill rejects profile JSON asset entries missing base64 data, matching the #2108 JSON-only failure mode.Batch 10 Status-Field Refresh And Current Rescan - 2026-06-04
Base: Refactor
origin/refactor/ current checkoutcc4c523b; legacy reference remains v1.6.1 file-native storage.Outcome:
proof_levelis normalized tofocused_testinstead of a compound proof string.gaps_openbecause #2108 is still open and this refresh did not run live large remote import, Docker/build proof, or native large-profile QA./api/profile/importinstead of remote base64 upload, and JSON profile assets with missing payloads warn/skip instead of hard-failing the whole import.Current proof run:
cargo test --manifest-path src-tauri/Cargo.toml -p marinara-storage -- --nocapturepassed: 42 tests.generic_storage,storage_list_projected,message_swipes,prompt_snapshot,delete_swipe,branch_chat,projected_message,chat_memor,admin_clear_all, remote admin guard tests, storage I/O error mapping tests, backup tests, profile import/export tests, ZIP import tests, rollback tests, persona avatar rollback, and lorebook entry lookup.pnpm exec vitest run src/engine/generation/active-lorebook-scanner.test.ts src/features/modes/shared/chat-ui/hooks/use-chat-surface-data.test.tsx src/shared/api/remote-runtime.test.ts src/engine/modes/chat/schedules/schedule.service.test.tspassed: 4 files, 9 tests.Current static trace:
src/shared/api/profile-api.tsroutes remote file uploads through multipart HTTP for/api/profile/import; remote local-path import remains rejected as unsupported.src-tauri/src/http_server.rsgives/api/profile/importa profile-sized body limit and streams multipart upload through the admin-gated profile import path.src-tauri/src/commands/storage/profile/assets.rsrecords warnings for JSON profile asset entries without base64 payloads and continues importing the rest of the profile.Still not proven in batch 10:
Batch 11 Current Rescan At
089e1d72- 2026-06-04Base:
origin/refactorat089e1d72.Outcome:
src/shared/api/profile-api.tssends remote files as multipart HTTP to/api/profile/import, andsrc-tauri/src/http_server.rsgives that route the profile upload limit and temp-file stream path.gaps_openbecause #2108 was still open and no live large remote import or Docker/build proof was run. Batch 12 supersedes this after #2108 closed.Proof:
cargo test --manifest-path src-tauri/Cargo.toml -p marinara-storage -- --nocapture-> 42 passed.generic_storage(4),storage_list_projected(4),message_swipes(26),prompt_snapshot(6),delete_swipe(2),branch_chat(4),projected_message(6),chat_memor(1),admin_clear_all(8),hostable_security_requires_admin_access_for_remote_backup_list(1),remote_st_bulk_scan_requires_admin_access(1), storage I/O error mapping filters (4),http_dispatch::tests::remote_runtime_command_surfaces_match_desktop_minus_documented_non_remote_commands(1),backup::tests(2),profile_import(30),import_profile_zip(3),rolls_back(11),persona_avatar_file_rolls_back(1),lorebook_entries_list_by_lorebook_ids_reads_matching_books_once(1), andprofile_upload(4, including the profile upload body-limit test).pnpm exec vitest run src/engine/generation/active-lorebook-scanner.test.ts src/features/modes/shared/chat-ui/hooks/use-chat-surface-data.test.tsx src/shared/api/remote-runtime.test.ts src/engine/modes/chat/schedules/schedule.service.test.ts-> 4 files / 9 tests passed.Static trace:
src/shared/api/profile-api.tsroutes remote upload and preview through multipart HTTP for/api/profile/importand/api/profile/import/preview; remote local-path import still returnsremote_local_path_unsupported.src-tauri/src/http_server.rsexposes admin-gated/api/profile/import,/api/profile/import/preview, and/api/profile/import/eventswith the 1 GiB profile upload body limit.src-tauri/src/commands/storage/profile/assets.rsrecordsmissing_assetwarnings for JSON/ZIP manifest entries without payloads and continues importing the rest of the profile.src-tauri/src/http_dispatch.rsstill lists local file import commands as non-remote, so remote import coverage belongs to the multipart HTTP route.Still not proven in batch 11:
Batch 12 #2108 Closure Refresh - 2026-06-04
Base:
origin/refactorat089e1d72from batch 11.Outcome:
gaps_opentoon_parusing the current batch 11 focused proof plus live #2108 closure state.focused_test; no native Tauri large-profile pass was added in this closure refresh.Proof:
gh issue view 2108 --repo Pasta-Devs/Marinara-Engine --json state,closedAt->CLOSED,2026-06-04T10:59:15Z.089e1d72remains the current target proof.@Xelvanis commented on GitHub (Jun 3, 2026):
Target 2 batch 1 foundation rescan
Provisional refactor base:
fix/message-swipe-sidecar-regressionatf56efb20.Legacy anchor:
origin/main/ v1.6.1 file-native storage.Result: no new foundation storage blocker found. Target 2 stays
gaps_openbecause #1923 is still the dedicated chat/message storage gap for batch 3.Covered in this pass:
storage_getuses storage-levelget_projected;storage_listroutes projected message pages throughlist_messages_for_chat_page_projected; character search expands read fields for matching then returns the caller projection without embedded avatar payloads./api/invokestorage list/get/create/update/delete dispatch delegates to the same embedded storage helpers, so #1895/#1906 guard drift stays fixed.scanActiveLorebookEntriespassesembeddingSource: null; the button still runs a lightweight storage scan while mounted, so storage read-shape/timing remains part of batch 4.Proof run:
cargo test --manifest-path src-tauri/Cargo.toml generic_storage-> 4 passed.cargo test --manifest-path src-tauri/Cargo.toml storage_list_projected-> 4 passed.cargo test --manifest-path src-tauri/Cargo.toml storage_list_searches_projected_character_fields_without_returning_avatar_payloads-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml registry_answers_core_contract_questions-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml app_state_startup_recovers_when_collection_and_backup_are_corrupt-> 1 passed.cargo test --manifest-path src-tauri/Cargo.toml agent_default_connection-> 2 passed.cargo test --manifest-path src-tauri/Cargo.toml http_dispatch::tests::dispatch_storage-> 7 passed.cargo test --manifest-path src-tauri/Cargo.toml -p marinara-storage-> 34 passed.Next batch: data-loss and guard behavior.