[GH-ISSUE #1363] [Issue]: Refactor memory recall uses lexical vectors instead of provider embeddings #687

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

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

Originally assigned to: @Promansis on GitHub.

Summary

Legacy Memory Recall could use provider/local-sidecar embeddings. Current refresh/import paths appear to use lexical local vectors instead.

Classification: Behavior changed / possible quality regression needing decision

Expected behavior

Memory Recall should preserve provider/local-sidecar embedding behavior or explicitly document the quality/performance tradeoff of lexical-only vectors.

Actual behavior

Current Rust/TS memory paths reference lexical_memory_embedding; no provider embedding selection path was found.

Steps to reproduce

  1. Inspect legacy memory recall embedding/provider code paths.
  2. Inspect current src-tauri/src/commands/storage/chats.rs and prompt assembly memory retrieval.
  3. Compare embeddings generated during chat memory refresh/import.

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 (audit snapshot 07af6d8b)
  • Legacy baseline: origin/staging / v1.6.1 raw codebase
  • Run mode: Tauri desktop / remote runtime parity audit
  • OS + version: not OS-specific unless labeled Windows/Android
  • Node + pnpm versions: not captured for this audit ticket
  • Rust version, if relevant: not captured for this audit ticket
  • Remote Runtime URL configured? not relevant unless the issue is remote-runtime/security related
  • Provider, model, or integration, if relevant: see summary/additional context

Logs, screenshots, or video

No runtime logs or screenshots. Finding comes from raw-codebase parity inspection.

Regression notes

Legacy behavior/source exists in origin/staging / v1.6.1 raw codebase and is tracked in docs/refactor-staging-1.6-feature-gap-audit.md. Current refactor source did not show equivalent behavior at the paths named below.

Additional context

This may depend on the broader local sidecar/provider embedding decision.

Audit report: docs/refactor-staging-1.6-feature-gap-audit.md.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @ghost on GitHub (May 26, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1363 Originally assigned to: @Promansis on GitHub. ## Summary Legacy Memory Recall could use provider/local-sidecar embeddings. Current refresh/import paths appear to use lexical local vectors instead. **Classification:** Behavior changed / possible quality regression needing decision ## Expected behavior Memory Recall should preserve provider/local-sidecar embedding behavior or explicitly document the quality/performance tradeoff of lexical-only vectors. ## Actual behavior Current Rust/TS memory paths reference `lexical_memory_embedding`; no provider embedding selection path was found. ## Steps to reproduce 1. Inspect legacy memory recall embedding/provider code paths. 2. Inspect current `src-tauri/src/commands/storage/chats.rs` and prompt assembly memory retrieval. 3. Compare embeddings generated during chat memory refresh/import. ## Impact area - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [ ] Chat mode - [ ] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [x] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [x] React-free engine behavior, contracts, agents, or capability ports - [ ] 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 (audit snapshot 07af6d8b) - Legacy baseline: origin/staging / v1.6.1 raw codebase - Run mode: Tauri desktop / remote runtime parity audit - OS + version: not OS-specific unless labeled Windows/Android - Node + pnpm versions: not captured for this audit ticket - Rust version, if relevant: not captured for this audit ticket - Remote Runtime URL configured? not relevant unless the issue is remote-runtime/security related - Provider, model, or integration, if relevant: see summary/additional context ## Logs, screenshots, or video No runtime logs or screenshots. Finding comes from raw-codebase parity inspection. ## Regression notes Legacy behavior/source exists in `origin/staging / v1.6.1 raw codebase` and is tracked in `docs/refactor-staging-1.6-feature-gap-audit.md`. Current refactor source did not show equivalent behavior at the paths named below. ## Additional context This may depend on the broader local sidecar/provider embedding decision. Audit report: `docs/refactor-staging-1.6-feature-gap-audit.md`. ## Template check - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@SpicyMarinara commented on GitHub (May 27, 2026):

Fixed on refactor in c994f7be.

Memory Recall now uses configured provider/local embedding paths when available:

  • chat memory refresh/import are async and generate embeddings through the chat connection's embeddingConnectionId or embeddingModel, falling back to lexical vectors only when no embedding model is configured.
  • memory chunks record embeddingSource, embeddingModel, and embeddingConnectionId metadata.
  • added llm_embed to the embedded and remote runtime command surface so the app can request query embeddings from the same provider/local connection path.
  • prompt assembly now asks for a provider query embedding and uses provider memory vectors when dimensions match, with lexical fallback retained for offline/unconfigured cases.

Validation:

  • pnpm test -- src/engine/generation/prompt-assembly.test.ts src/shared/api/llm-api.test.ts
  • cargo test --manifest-path src-tauri/Cargo.toml --workspace memory_embedding -- --nocapture
  • cargo test --manifest-path src-tauri/Cargo.toml --workspace embed_memory_content_uses_lexical_fallback_without_context -- --nocapture
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace
  • git diff --check
  • pnpm check
<!-- gh-comment-id:4554930768 --> @SpicyMarinara commented on GitHub (May 27, 2026): Fixed on refactor in c994f7be. Memory Recall now uses configured provider/local embedding paths when available: - chat memory refresh/import are async and generate embeddings through the chat connection's embeddingConnectionId or embeddingModel, falling back to lexical vectors only when no embedding model is configured. - memory chunks record embeddingSource, embeddingModel, and embeddingConnectionId metadata. - added llm_embed to the embedded and remote runtime command surface so the app can request query embeddings from the same provider/local connection path. - prompt assembly now asks for a provider query embedding and uses provider memory vectors when dimensions match, with lexical fallback retained for offline/unconfigured cases. Validation: - pnpm test -- src/engine/generation/prompt-assembly.test.ts src/shared/api/llm-api.test.ts - cargo test --manifest-path src-tauri/Cargo.toml --workspace memory_embedding -- --nocapture - cargo test --manifest-path src-tauri/Cargo.toml --workspace embed_memory_content_uses_lexical_fallback_without_context -- --nocapture - cargo check --manifest-path src-tauri/Cargo.toml --workspace - git diff --check - pnpm check
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#687
No description provided.