[PR #1753] [MERGED] Fix legacy sidecar embedding selection #5261

Closed
opened 2026-10-22 04:14:42 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1753
Author: @cha1latte
Created: 5/31/2026
Status: ✅ Merged
Merged: 5/31/2026
Merged by: @cha1latte

Base: refactor ← Head: codex/issue-1747-local-sidecar-embeddings


📝 Commits (1)

  • bb83b79 Fix legacy sidecar embedding selection

📊 Changes

3 files changed (+148 additions, -6 deletions)

View changed files

📝 src-tauri/src/commands/storage/prompts.rs (+136 -4)
📝 src/features/catalog/lorebooks/components/LorebookEditor.tsx (+5 -1)
📝 src/features/shell/connections/components/ConnectionEditor.tsx (+7 -1)

📄 Description

Linked issue

Closes #1747

Why this change

  • In v1.6.1, lorebook vectorization could expose the synthetic Local Model sidecar embedding option (__local_sidecar__). In the refactor, the old managed sidecar runtime is retired, so that legacy id must not be offered or routed as an embedding-capable connection.

What changed

  • Reject the legacy __local_sidecar__ id before Rust embedding resolution reaches provider transport.
  • Exclude the retired sidecar id from default embedding connection selection while preserving real embedding-capable connection fallback behavior.
  • Hide stale __local_sidecar__ rows from lorebook vectorization and connection embedding override dropdowns.
  • Added focused Rust regression coverage for direct sidecar id, dedicated embedding override, default resolver skip, and only-sidecar cases.

Refactor impact

Primary owner:

Rust storage / catalog connections and lorebook vectorization

Impact areas reviewed:

  • src-tauri/src/commands/storage/prompts.rs embedding resolver and lorebook vectorization path
  • src/features/catalog/lorebooks/components/LorebookEditor.tsx Semantic Search embedding picker
  • src/features/shell/connections/components/ConnectionEditor.tsx embedding override picker

Boundary notes:

  • Product behavior stays in the Rust storage/provider boundary for actual embedding resolution.
  • React feature code only filters stale picker options; it does not add provider logic or raw runtime calls.
  • No engine import boundary changes.

Pressure points touched:

  • Lorebook vectorization command path
  • Connection embedding override UI
  • Legacy/refactor compatibility for retired Local Model sidecar id

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • pnpm check passes locally before PR push/handoff, including the unused-code check
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Browser screenshot/recording evidence added when UI/browser state is the claim
  • Remote runtime smoke checked when relevant

Codex-run proof:

  • cargo test --manifest-path src-tauri/Cargo.toml legacy_local_sidecar -- --nocapture passed, 4 tests.
  • pnpm check passed locally.
  • node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch/bugfix-verification.json passed.
  • Bunny pass on the current diff before opening the PR: no blocking findings.

Manual verification notes

  • No human-only manual verification is required for the core claim. This is a provider/connection contract fix, proven with focused resolver tests and the full pre-PR gate.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

No docs changes needed: the refactor docs already state the old managed sidecar is retired and normal embedding-capable connections should be used.

UI evidence

N/A. The visible symptom is the stale Local Model sidecar appearing as an embedding/vectorization choice, but the core fix is the embedding resolver contract plus picker filtering. The behavior is covered by Rust regression tests, TypeScript typecheck, and pnpm check.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1753 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/31/2026 **Status:** ✅ Merged **Merged:** 5/31/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `codex/issue-1747-local-sidecar-embeddings` --- ### 📝 Commits (1) - [`bb83b79`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bb83b79b4f04acd60180d87e4a4fd2e55363008c) Fix legacy sidecar embedding selection ### 📊 Changes **3 files changed** (+148 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/prompts.rs` (+136 -4) 📝 `src/features/catalog/lorebooks/components/LorebookEditor.tsx` (+5 -1) 📝 `src/features/shell/connections/components/ConnectionEditor.tsx` (+7 -1) </details> ### 📄 Description ## Linked issue Closes #1747 ## Why this change - In v1.6.1, lorebook vectorization could expose the synthetic Local Model sidecar embedding option (`__local_sidecar__`). In the refactor, the old managed sidecar runtime is retired, so that legacy id must not be offered or routed as an embedding-capable connection. ## What changed - Reject the legacy `__local_sidecar__` id before Rust embedding resolution reaches provider transport. - Exclude the retired sidecar id from default embedding connection selection while preserving real embedding-capable connection fallback behavior. - Hide stale `__local_sidecar__` rows from lorebook vectorization and connection embedding override dropdowns. - Added focused Rust regression coverage for direct sidecar id, dedicated embedding override, default resolver skip, and only-sidecar cases. ## Refactor impact Primary owner: Rust storage / catalog connections and lorebook vectorization Impact areas reviewed: - `src-tauri/src/commands/storage/prompts.rs` embedding resolver and lorebook vectorization path - `src/features/catalog/lorebooks/components/LorebookEditor.tsx` Semantic Search embedding picker - `src/features/shell/connections/components/ConnectionEditor.tsx` embedding override picker Boundary notes: - Product behavior stays in the Rust storage/provider boundary for actual embedding resolution. - React feature code only filters stale picker options; it does not add provider logic or raw runtime calls. - No engine import boundary changes. Pressure points touched: - Lorebook vectorization command path - Connection embedding override UI - Legacy/refactor compatibility for retired Local Model sidecar id ## Validation - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] `pnpm check` passes locally before PR push/handoff, including the unused-code check - [ ] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [ ] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Browser screenshot/recording evidence added when UI/browser state is the claim - [ ] Remote runtime smoke checked when relevant Codex-run proof: - `cargo test --manifest-path src-tauri/Cargo.toml legacy_local_sidecar -- --nocapture` passed, 4 tests. - `pnpm check` passed locally. - `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch/bugfix-verification.json` passed. - Bunny pass on the current diff before opening the PR: no blocking findings. ### Manual verification notes - No human-only manual verification is required for the core claim. This is a provider/connection contract fix, proven with focused resolver tests and the full pre-PR gate. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims No docs changes needed: the refactor docs already state the old managed sidecar is retired and normal embedding-capable connections should be used. ## UI evidence N/A. The visible symptom is the stale Local Model sidecar appearing as an embedding/vectorization choice, but the core fix is the embedding resolver contract plus picker filtering. The behavior is covered by Rust regression tests, TypeScript typecheck, and `pnpm check`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:14:42 +07:00
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#5261
No description provided.