[PR #2431] [MERGED] Reject Claude Subscription embeddings #5608

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2431
Author: @Xelvanis
Created: 6/6/2026
Status: ✅ Merged
Merged: 6/6/2026
Merged by: @Xelvanis

Base: refactor ← Head: fix/claude-subscription-embedding-reject


📝 Commits (6)

  • 418c025 llm: reject Claude Subscription embeddings
  • adc5f97 ci: allow provider names in metadata guard
  • 4ecf060 ci: tighten metadata authorship patterns
  • 5d2c7d9 ci: detect prefixed authorship clauses
  • e5467df ci: allow relative output clauses
  • da9ac20 ci: clarify metadata guard patterns

📊 Changes

4 files changed (+180 additions, -12 deletions)

View changed files

📝 scripts/check-workflow-names.mjs (+68 -10)
📝 src-tauri/src/commands/storage/prompts.rs (+102 -0)
📝 src/features/catalog/lorebooks/components/editor/LorebookVectorizeSection.tsx (+8 -1)
📝 src/features/shell/connections/components/ConnectionEditor.tsx (+2 -1)

📄 Description

Linked issue

Closes #2426

Why this change

  • Claude Subscription connections cannot create embeddings through local subscription auth. Refactor was falling through to the OpenAI-compatible embedding transport, which produced a provider/network failure instead of the clear legacy unsupported-provider guidance.

What changed

  • Reject claude_subscription embedding connections in the Rust embedding resolver before transport.
  • Reject direct embed_text calls for claude_subscription before any provider HTTP request.
  • Exclude Claude Subscription and ChatGPT local-auth providers from embedding-capable picker lists.
  • Add focused Rust regression coverage for direct, active, and dedicated Claude Subscription embedding rejection.

Refactor impact

Primary owner:

  • Rust storage/provider embedding transport, with small catalog/shell UI picker cleanup.

Impact areas reviewed:

  • llm_embed command path.
  • /api/sidecar/v1/embeddings HTTP runtime path.
  • Lorebook vectorization connection picker.
  • Connection editor dedicated embedding picker.
  • Existing OpenAI ChatGPT local-auth and retired local-sidecar embedding guards.

Boundary notes:

  • Engine code unchanged.
  • Shared API wrappers unchanged.
  • Feature UI only filters provider choices already rejected by the Rust owner.
  • Rust owner keeps embedded Tauri and remote HTTP embedding behavior consistent because both call the same resolver/embed helper.

Pressure points touched:

  • None.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • cargo test --manifest-path src-tauri/Cargo.toml claude_subscription_embedding passed: 3 tests.
  • cargo test --manifest-path src-tauri/Cargo.toml embedding_connection passed: 12 tests.
  • pnpm typecheck passed.
  • pnpm check passed.
  • Durable test rationale: #2426 is a known provider transport regression, embedding rejection is easy to break silently through default-provider fallback, and the added tests are narrow prompts.rs guards beside existing embedding resolver tests.
  • Manual UI/Tauri click-through not run; picker cleanup was reviewed statically and backend rejection remains authoritative.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Bugfix for an existing provider/embedding workflow; no new discoverable feature.

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

UI evidence

  • Not captured. UI change is limited to removing unsupported providers from embedding connection option lists; no visual layout change intended.

🔄 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/2431 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 6/6/2026 **Status:** ✅ Merged **Merged:** 6/6/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `refactor` ← **Head:** `fix/claude-subscription-embedding-reject` --- ### 📝 Commits (6) - [`418c025`](https://github.com/Pasta-Devs/Marinara-Engine/commit/418c025b19a6aaad8a296abfa7bf4b09b743f2c2) llm: reject Claude Subscription embeddings - [`adc5f97`](https://github.com/Pasta-Devs/Marinara-Engine/commit/adc5f97af8ed327ea37f3e2defb203b900e2a8ee) ci: allow provider names in metadata guard - [`4ecf060`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4ecf060726f3601624b7b2a2a1520917838be78f) ci: tighten metadata authorship patterns - [`5d2c7d9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5d2c7d97d654d58964db8bad7181c225544d2292) ci: detect prefixed authorship clauses - [`e5467df`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e5467df419b550355e3d0d5f4d23ebc0639961b6) ci: allow relative output clauses - [`da9ac20`](https://github.com/Pasta-Devs/Marinara-Engine/commit/da9ac20320af10e4ecd567ecd391ec5e664746d7) ci: clarify metadata guard patterns ### 📊 Changes **4 files changed** (+180 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `scripts/check-workflow-names.mjs` (+68 -10) 📝 `src-tauri/src/commands/storage/prompts.rs` (+102 -0) 📝 `src/features/catalog/lorebooks/components/editor/LorebookVectorizeSection.tsx` (+8 -1) 📝 `src/features/shell/connections/components/ConnectionEditor.tsx` (+2 -1) </details> ### 📄 Description ## Linked issue Closes #2426 ## Why this change - Claude Subscription connections cannot create embeddings through local subscription auth. Refactor was falling through to the OpenAI-compatible embedding transport, which produced a provider/network failure instead of the clear legacy unsupported-provider guidance. ## What changed - Reject `claude_subscription` embedding connections in the Rust embedding resolver before transport. - Reject direct `embed_text` calls for `claude_subscription` before any provider HTTP request. - Exclude Claude Subscription and ChatGPT local-auth providers from embedding-capable picker lists. - Add focused Rust regression coverage for direct, active, and dedicated Claude Subscription embedding rejection. ## Refactor impact Primary owner: - Rust storage/provider embedding transport, with small catalog/shell UI picker cleanup. Impact areas reviewed: - `llm_embed` command path. - `/api/sidecar/v1/embeddings` HTTP runtime path. - Lorebook vectorization connection picker. - Connection editor dedicated embedding picker. - Existing OpenAI ChatGPT local-auth and retired local-sidecar embedding guards. Boundary notes: - Engine code unchanged. - Shared API wrappers unchanged. - Feature UI only filters provider choices already rejected by the Rust owner. - Rust owner keeps embedded Tauri and remote HTTP embedding behavior consistent because both call the same resolver/embed helper. Pressure points touched: - None. ## Validation - [x] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [x] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - `cargo test --manifest-path src-tauri/Cargo.toml claude_subscription_embedding` passed: 3 tests. - `cargo test --manifest-path src-tauri/Cargo.toml embedding_connection` passed: 12 tests. - `pnpm typecheck` passed. - `pnpm check` passed. - Durable test rationale: #2426 is a known provider transport regression, embedding rejection is easy to break silently through default-provider fallback, and the added tests are narrow `prompts.rs` guards beside existing embedding resolver tests. - Manual UI/Tauri click-through not run; picker cleanup was reviewed statically and backend rejection remains authoritative. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [x] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Bugfix for an existing provider/embedding workflow; no new discoverable feature. ## Docs and release impact - [x] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [x] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence - Not captured. UI change is limited to removing unsupported providers from embedding connection option lists; no visual layout change intended. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:17:47 +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#5608
No description provided.