[GH-ISSUE #2108] [Issue]: Docker build fails after cache bust + profile import broken for large exports via remote runtime #1029

Closed
opened 2026-10-21 05:25:22 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @felorhik on GitHub (Jun 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2108

Originally assigned to: @Xelvanis on GitHub.


Docker build fails after cache bust + profile import broken for large exports via remote runtime

Labels: bug


Summary

Two separate bugs affect the Docker remote runtime: docker compose build fails with a missing file error whenever the build cache is invalidated, and profile import is non-functional for large exports when using a remote runtime — both the ZIP and JSON-only paths fail for different reasons.


Expected behavior

  • docker compose build should compile successfully regardless of cache state.
  • A profile export ZIP should be importable via Settings → Import Profile when connected to a remote runtime.
  • If a ZIP is too large to transmit, the JSON-only import should at minimum bring through data (connections, characters, chats) and warn about missing assets rather than hard failing.

Actual behavior

Build failure: After any change to src-tauri/src/ busts Docker's layer cache, cargo build fails:
error: couldn't read src/commands/storage/../../../../src/engine/generation/prompt-overrides.manifest.json: No such file or directory
--> src/commands/storage/prompt_overrides.rs:8:5
error: could not compile marinara-engine (lib) due to 1 previous error

ZIP import: The import UI fails silently with "base64 is required". For large exports (~400MB) the browser cannot produce a valid DataURL, readFileAsBase64 resolves with an empty string. Even if the browser succeeded, the server's 256MB body limit (MAX_API_BODY_BYTES) would reject a ~535MB base64-encoded payload regardless.

JSON-only import: Extracting the JSON from the ZIP and importing it fails:
Profile asset avatars/.png is missing base64 data
There is no fallback to skip missing assets and import data only.


Steps to reproduce

Build failure:

  1. Check out refactor
  2. Run docker compose build successfully (primes cache)
  3. Make any change to a file under src-tauri/src/ (or switch branches and back)
  4. Run docker compose build again — fails with the include_str! error above

Profile import:

  1. Configure a remote runtime URL in Settings
  2. Set ADMIN_SECRET in .env and enter it in the app's Admin Access field
  3. Export a profile from an existing install (produces a ZIP ~400MB+)
  4. Settings → Import Profile (JSON/ZIP) → select the ZIP → "base64 is required"
  5. Extract marinara-profile.json from the ZIP, import that instead → "Profile asset ... missing base64 data"

Impact area

  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime

Environment

  • Branch: refactor
  • Run mode: Docker runtime + web shell (remote runtime)
  • Remote Runtime URL configured: yes

Regression notes

Build failure: Introduced in #1762 — prompt_overrides.rs added an include_str! referencing src/engine/generation/prompt-overrides.manifest.json which is outside src-tauri/. The Dockerfile was not updated to copy src/. The build appeared to work before because Docker's layer cache preserved the previously compiled binary.

Profile import: profile_import_file (import from a file path, no size constraint) exists in the codebase but is Tauri-only and not exposed over the HTTP API, leaving remote runtime users with no viable import path for large exports.


Additional context

Build workaround: Create a gitignored docker-compose.override.yml pointing at a local Dockerfile.local that adds COPY src ./src before the cargo build step. Remove once the upstream Dockerfile is fixed.

Build fix: Add one line to Dockerfile before cargo build:
COPY src ./src

Import fix suggestions:

  • Expose profile_import_file over the HTTP API as a privileged command so a file staged in the data directory can be imported by path
  • Or stream ZIP uploads rather than base64-encoding the entire file in memory
  • Allow JSON-only import to skip missing assets with warnings rather than hard failing

  • I DID NOT read this template and provide the requested details.

I had claude write this, as I did a bunch of debugging with it and this is a rundown of the results of that.

Originally created by @felorhik on GitHub (Jun 4, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2108 Originally assigned to: @Xelvanis on GitHub. --- Docker build fails after cache bust + profile import broken for large exports via remote runtime Labels: bug --- Summary Two separate bugs affect the Docker remote runtime: docker compose build fails with a missing file error whenever the build cache is invalidated, and profile import is non-functional for large exports when using a remote runtime — both the ZIP and JSON-only paths fail for different reasons. --- Expected behavior - docker compose build should compile successfully regardless of cache state. - A profile export ZIP should be importable via Settings → Import Profile when connected to a remote runtime. - If a ZIP is too large to transmit, the JSON-only import should at minimum bring through data (connections, characters, chats) and warn about missing assets rather than hard failing. --- Actual behavior Build failure: After any change to src-tauri/src/ busts Docker's layer cache, cargo build fails: error: couldn't read `src/commands/storage/../../../../src/engine/generation/prompt-overrides.manifest.json`: No such file or directory --> src/commands/storage/prompt_overrides.rs:8:5 error: could not compile `marinara-engine` (lib) due to 1 previous error ZIP import: The import UI fails silently with "base64 is required". For large exports (~400MB) the browser cannot produce a valid DataURL, readFileAsBase64 resolves with an empty string. Even if the browser succeeded, the server's 256MB body limit (MAX_API_BODY_BYTES) would reject a ~535MB base64-encoded payload regardless. JSON-only import: Extracting the JSON from the ZIP and importing it fails: Profile asset avatars/<uuid>.png is missing base64 data There is no fallback to skip missing assets and import data only. --- Steps to reproduce Build failure: 1. Check out refactor 2. Run docker compose build successfully (primes cache) 3. Make any change to a file under src-tauri/src/ (or switch branches and back) 4. Run docker compose build again — fails with the include_str! error above Profile import: 1. Configure a remote runtime URL in Settings 2. Set ADMIN_SECRET in .env and enter it in the app's Admin Access field 3. Export a profile from an existing install (produces a ZIP ~400MB+) 4. Settings → Import Profile (JSON/ZIP) → select the ZIP → "base64 is required" 5. Extract marinara-profile.json from the ZIP, import that instead → "Profile asset ... missing base64 data" --- Impact area - [x] Shared API wrapper or remote runtime routing - [x] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime --- Environment - Branch: refactor - Run mode: Docker runtime + web shell (remote runtime) - Remote Runtime URL configured: yes --- Regression notes Build failure: Introduced in #1762 — prompt_overrides.rs added an include_str! referencing src/engine/generation/prompt-overrides.manifest.json which is outside src-tauri/. The Dockerfile was not updated to copy src/. The build appeared to work before because Docker's layer cache preserved the previously compiled binary. Profile import: profile_import_file (import from a file path, no size constraint) exists in the codebase but is Tauri-only and not exposed over the HTTP API, leaving remote runtime users with no viable import path for large exports. --- Additional context Build workaround: Create a gitignored docker-compose.override.yml pointing at a local Dockerfile.local that adds COPY src ./src before the cargo build step. Remove once the upstream Dockerfile is fixed. Build fix: Add one line to Dockerfile before cargo build: COPY src ./src Import fix suggestions: - Expose profile_import_file over the HTTP API as a privileged command so a file staged in the data directory can be imported by path - Or stream ZIP uploads rather than base64-encoding the entire file in memory - Allow JSON-only import to skip missing assets with warnings rather than hard failing --- - [ ] I DID NOT read this template and provide the requested details. I had claude write this, as I did a bunch of debugging with it and this is a rundown of the results of that.
bsakaguchi 2026-10-21 05:25:22 +07:00
  • closed this issue
  • added the
    bug
    label
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#1029
No description provided.