[PR #2074] [MERGED] Fix selfie prompt connection routing #5419

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

📋 Pull Request Information

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

Base: refactor ← Head: fix/issue-2056-selfie-agent-connection


📝 Commits (2)

  • 40e64a7 Fix selfie prompt connection routing
  • 7c054c6 Surface selfie connection config read failures

📊 Changes

2 files changed (+351 additions, -2 deletions)

View changed files

➕ src/engine/generation/connected-commands.test.ts (+322 -0)
📝 src/engine/generation/connected-commands.ts (+29 -2)

📄 Description

Linked issue

Closes #2056

Why this change

  • Chat-triggered selfies were building the image prompt through the active chat LLM connection, so the provider log showed the chat endpoint/model instead of the Illustrator agent's configured connection.

What changed

  • Resolves the LLM connection for conversation selfie prompt generation from the enabled Illustrator agent first.
  • Falls back to the default non-image agent connection, then the active chat connection when no agent/default override exists.
  • Keeps the actual selfie image-generation request on the chat's configured metadata.imageGenConnectionId.
  • Adds focused regression coverage for Illustrator override, default-agent fallback, chat fallback, and the image-provider connection boundary.

Refactor impact

Primary owner:

engine generation

Impact areas reviewed:

  • persistConnectedCommandTags [selfie] command path.
  • Illustrator/default-agent LLM connection fallback behavior.
  • Chat-level selfie image-generation connection payload.

Boundary notes:

  • Engine-only change; no React, shared API wrapper, Rust command, storage schema, or remote-runtime boundary changes.
  • Existing chat metadata still owns the image-generation connection for command selfies.

Pressure points touched:

  • src/engine/generation/connected-commands.ts

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

  • Codex machine proof:
  • pnpm test src/engine/generation/connected-commands.test.ts passed on the final rebased branch: 3 tests.
  • pnpm typecheck passed before final full check.
  • pnpm check passed on the final rebased branch: line endings, architecture, frontend, Rust, docs, discovery, unused.
  • node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json passed.
  • Bunny review passed before opening this draft.
  • No human-only manual verification is blocking the core claim; this is a non-UI command-routing bug proven with a focused harness.

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 only; no new user-discoverable feature or setting.

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

N/A. This is a non-UI engine-generation routing fix. The direct evidence is the focused harness recording the LLM and image-generation connection IDs before/after the fix.


🔄 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/2074 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/3/2026 **Status:** ✅ Merged **Merged:** 6/3/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-2056-selfie-agent-connection` --- ### 📝 Commits (2) - [`40e64a7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/40e64a7a9821952481ef9d7990fdbde2bbf5081e) Fix selfie prompt connection routing - [`7c054c6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7c054c62ae7c85803ba31198c18ddc5e03e11551) Surface selfie connection config read failures ### 📊 Changes **2 files changed** (+351 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `src/engine/generation/connected-commands.test.ts` (+322 -0) 📝 `src/engine/generation/connected-commands.ts` (+29 -2) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue <!-- Every user-facing PR should reference a feature request or issue report when practical. --> Closes #2056 ## Why this change <!-- What user problem, bug, refactor goal, or maintenance need does this solve? --> - Chat-triggered selfies were building the image prompt through the active chat LLM connection, so the provider log showed the chat endpoint/model instead of the Illustrator agent's configured connection. ## What changed <!-- List the key changes in this PR. --> - Resolves the LLM connection for conversation selfie prompt generation from the enabled Illustrator agent first. - Falls back to the default non-image agent connection, then the active chat connection when no agent/default override exists. - Keeps the actual selfie image-generation request on the chat's configured `metadata.imageGenConnectionId`. - Adds focused regression coverage for Illustrator override, default-agent fallback, chat fallback, and the image-provider connection boundary. ## Refactor impact Primary owner: <!-- Examples: app shell, catalog, chat mode, roleplay mode, game mode, runtime generation, world-state, shared API, engine generation, Rust storage, imports, remote runtime. --> engine generation Impact areas reviewed: - `persistConnectedCommandTags` `[selfie]` command path. - Illustrator/default-agent LLM connection fallback behavior. - Chat-level selfie image-generation connection payload. Boundary notes: <!-- Note engine/shared-api/feature/Rust/remote-runtime boundaries. Say "none" only if you checked. --> - Engine-only change; no React, shared API wrapper, Rust command, storage schema, or remote-runtime boundary changes. - Existing chat metadata still owns the image-generation connection for command selfies. Pressure points touched: <!-- Mention ModeSurface, GameSurface, shared mode UI, src-tauri/src/lib.rs command registration, or import modules if touched. --> - `src/engine/generation/connected-commands.ts` ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> <!-- Do not submit *.test.ts or *.test.tsx files as PR proof; cite existing checks, command output, app/browser/Tauri verification, or manual notes instead. --> - [ ] 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 <!-- Describe exact commands and manual steps, including typecheck/build/docs/architecture/Rust/browser/remote-runtime checks when they apply. If an AI agent filled this out, verify it yourself before ticking boxes. --> - Codex machine proof: - `pnpm test src/engine/generation/connected-commands.test.ts` passed on the final rebased branch: 3 tests. - `pnpm typecheck` passed before final full check. - `pnpm check` passed on the final rebased branch: line endings, architecture, frontend, Rust, docs, discovery, unused. - `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json` passed. - Bunny review passed before opening this draft. - No human-only manual verification is blocking the core claim; this is a non-UI command-routing bug proven with a focused harness. ## 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 only; no new user-discoverable feature or setting. ## 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 <!-- Add before/after screenshots or recordings for visible UI changes. --> N/A. This is a non-UI engine-generation routing fix. The direct evidence is the focused harness recording the LLM and image-generation connection IDs before/after the fix. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:16:08 +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#5419
No description provided.