[GH-ISSUE #2057] [Issue]: Browser-prove Basic Auth managed asset blobs for Remote Runtime #1003

Closed
opened 2026-10-21 05:25:02 +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/2057

Originally assigned to: @cha1latte on GitHub.

Summary

Remote Runtime managed asset parity for the asset/cache slice is static-proven, but not browser-proven when the runtime URL uses reverse-proxy Basic Auth.

The current static trace shows the intended path: Remote Runtime URL credentials are stripped into an Authorization header, managed asset URLs with credentials are fetched as blobs, object URLs are cached and revoked, and mriAssetV invalidates mutated asset kinds. A live browser proof should confirm visible assets actually render and refresh through that path.

Expected behavior

In web-shell remote runtime mode with a Basic Auth-protected runtime URL:

  • Managed assets render for avatars, avatar thumbnails, backgrounds, fonts, gallery images, game assets, lorebook images, sprites, and managed thumbnails.
  • Asset fetches include the Basic Auth Authorization header without embedding credentials in rendered DOM URLs.
  • Object URLs are reused while valid, revoked after invalidation, and regenerated after relevant mutations.
  • MIME, Cache-Control, and ETag response headers do not prevent mutated assets from refreshing after mriAssetV changes.

Actual behavior

No broken product behavior was confirmed in the asset/cache parityscan.

Remaining gap: no live browser run was performed with reverse-proxy Basic Auth. The Basic Auth blob rendering path is covered by static trace and focused Rust tests, but not by an end-to-end browser/runtime proof.

Steps to reproduce

  1. Start a hostable Marinara runtime behind Basic Auth or configure the runtime with Basic Auth enabled.
  2. Open the web shell and set Remote Runtime URL to a credentialed URL such as https://user:password@example.test.
  3. Load screens that render managed media: character/persona avatars, game backgrounds/audio assets, gallery images, lorebook images, sprites, custom fonts, and managed thumbnails.
  4. Mutate one asset in each relevant kind where practical: upload/replace avatar, upload background, upload gallery image, upload sprite, rescan or upload game asset, and import media-bearing data.
  5. Verify the browser displays refreshed assets without exposing credentials in DOM URLs and without stale object URLs surviving invalidation.

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 9bcfb164 for the parityscan; legacy baseline main 77a30fa4
  • Run mode: web shell only / remote runtime
  • OS + version: not browser-proven yet
  • Node + pnpm versions: not relevant unless a harness is added
  • Rust version, if relevant: not browser-proven yet
  • Remote Runtime URL configured? yes, Basic Auth-protected URL needed
  • Provider, model, or integration, if relevant: not relevant

Logs, screenshots, or video

Current proof from target #2050:

cargo test --manifest-path src-tauri/Cargo.toml managed_asset_headers_include_cache_and_validation_metadata
cargo test --manifest-path src-tauri/Cargo.toml asset_path
cargo test --manifest-path src-tauri/Cargo.toml managed_thumbnail
cargo test --manifest-path src-tauri/Cargo.toml load_url_binary_reads_managed_asset_urls

No browser screenshot/video exists yet for the Basic Auth asset blob path.

Regression notes

Legacy main served managed media as same-origin direct routes under /api/*/file, so reverse-proxy Basic Auth was handled by ordinary same-origin browser requests. The refactor web shell uses a remote runtime URL and must fetch authenticated managed assets as blobs when credentials are configured.

Additional context

Related tracking issue: #2050.

Relevant refactor paths:

  • src/shared/api/remote-runtime.ts
  • src/shared/api/local-file-api.ts
  • src-tauri/src/http_server.rs
  • src/shared/api/assets-api.ts
  • src/shared/api/settings-assets-api.ts
  • src/shared/api/image-generation-api.ts
  • src/shared/api/storage-api.ts
  • src/shared/api/import-api.ts
  • src/shared/api/profile-api.ts
  • src/features/modes/game/components/DirectionEngine.tsx

Relevant legacy paths:

  • packages/server/src/routes/avatars.routes.ts
  • packages/server/src/routes/backgrounds.routes.ts
  • packages/server/src/routes/game-assets.routes.ts
  • packages/server/src/routes/fonts.routes.ts
  • packages/server/src/routes/gallery.routes.ts
  • packages/server/src/routes/lorebooks.routes.ts
  • packages/server/src/routes/sprites.routes.ts

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/2057 Originally assigned to: @cha1latte on GitHub. ## Summary Remote Runtime managed asset parity for the asset/cache slice is static-proven, but not browser-proven when the runtime URL uses reverse-proxy Basic Auth. The current static trace shows the intended path: Remote Runtime URL credentials are stripped into an `Authorization` header, managed asset URLs with credentials are fetched as blobs, object URLs are cached and revoked, and `mriAssetV` invalidates mutated asset kinds. A live browser proof should confirm visible assets actually render and refresh through that path. ## Expected behavior In web-shell remote runtime mode with a Basic Auth-protected runtime URL: - Managed assets render for avatars, avatar thumbnails, backgrounds, fonts, gallery images, game assets, lorebook images, sprites, and managed thumbnails. - Asset fetches include the Basic Auth `Authorization` header without embedding credentials in rendered DOM URLs. - Object URLs are reused while valid, revoked after invalidation, and regenerated after relevant mutations. - MIME, `Cache-Control`, and `ETag` response headers do not prevent mutated assets from refreshing after `mriAssetV` changes. ## Actual behavior No broken product behavior was confirmed in the asset/cache parityscan. Remaining gap: no live browser run was performed with reverse-proxy Basic Auth. The Basic Auth blob rendering path is covered by static trace and focused Rust tests, but not by an end-to-end browser/runtime proof. ## Steps to reproduce 1. Start a hostable Marinara runtime behind Basic Auth or configure the runtime with Basic Auth enabled. 2. Open the web shell and set Remote Runtime URL to a credentialed URL such as `https://user:password@example.test`. 3. Load screens that render managed media: character/persona avatars, game backgrounds/audio assets, gallery images, lorebook images, sprites, custom fonts, and managed thumbnails. 4. Mutate one asset in each relevant kind where practical: upload/replace avatar, upload background, upload gallery image, upload sprite, rescan or upload game asset, and import media-bearing data. 5. Verify the browser displays refreshed assets without exposing credentials in DOM URLs and without stale object URLs surviving invalidation. ## Impact area - [ ] App shell, navigation, startup, or providers - [x] Catalog resources - [ ] Chat mode - [x] Roleplay mode - [x] Game mode - [x] 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 - [x] Docs, contributor workflow, or templates ## Environment - Branch or commit: `refactor` `9bcfb164` for the parityscan; legacy baseline `main` `77a30fa4` - Run mode: web shell only / remote runtime - OS + version: not browser-proven yet - Node + pnpm versions: not relevant unless a harness is added - Rust version, if relevant: not browser-proven yet - Remote Runtime URL configured? yes, Basic Auth-protected URL needed - Provider, model, or integration, if relevant: not relevant ## Logs, screenshots, or video Current proof from target #2050: ```bash cargo test --manifest-path src-tauri/Cargo.toml managed_asset_headers_include_cache_and_validation_metadata cargo test --manifest-path src-tauri/Cargo.toml asset_path cargo test --manifest-path src-tauri/Cargo.toml managed_thumbnail cargo test --manifest-path src-tauri/Cargo.toml load_url_binary_reads_managed_asset_urls ``` No browser screenshot/video exists yet for the Basic Auth asset blob path. ## Regression notes Legacy `main` served managed media as same-origin direct routes under `/api/*/file`, so reverse-proxy Basic Auth was handled by ordinary same-origin browser requests. The refactor web shell uses a remote runtime URL and must fetch authenticated managed assets as blobs when credentials are configured. ## Additional context Related tracking issue: #2050. Relevant refactor paths: - `src/shared/api/remote-runtime.ts` - `src/shared/api/local-file-api.ts` - `src-tauri/src/http_server.rs` - `src/shared/api/assets-api.ts` - `src/shared/api/settings-assets-api.ts` - `src/shared/api/image-generation-api.ts` - `src/shared/api/storage-api.ts` - `src/shared/api/import-api.ts` - `src/shared/api/profile-api.ts` - `src/features/modes/game/components/DirectionEngine.tsx` Relevant legacy paths: - `packages/server/src/routes/avatars.routes.ts` - `packages/server/src/routes/backgrounds.routes.ts` - `packages/server/src/routes/game-assets.routes.ts` - `packages/server/src/routes/fonts.routes.ts` - `packages/server/src/routes/gallery.routes.ts` - `packages/server/src/routes/lorebooks.routes.ts` - `packages/server/src/routes/sprites.routes.ts` ## 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:02 +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#1003
No description provided.