[PR #1436] [MERGED] Fix Conversation impersonate quick reply persistence #5086

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

📋 Pull Request Information

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

Base: refactor ← Head: fix/refactor-issue-1432-impersonate-quick-reply


📝 Commits (5)

  • 8ec589b Fix impersonate quick reply persistence
  • ea9b045 Fix Rust clippy lifetime warning
  • 502c7fa Address impersonate persistence review feedback
  • 9336cb3 Obsolete stale generation replay review thread
  • 6d5a56d Move regenerate replay patch into helper

📊 Changes

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

View changed files

📝 src-tauri/src/commands/storage/commands/entities.rs (+3 -3)
📝 src/engine/generation/start-generation.test.ts (+77 -0)
📝 src/engine/generation/start-generation.ts (+68 -14)

📄 Description

Linked issue

Closes #1432

Why this change

  • Conversation Impersonate quick replies generated text as the active persona, but the generated persona/user output was not persisted to chat storage.

What changed

  • Store impersonate generations as generated role: "user" chat messages with replay metadata.
  • Preserve impersonated-user regenerate behavior by adding a new swipe to the target user message.
  • Keep assistant-only side effects, including Discord mirroring, tracker snapshots, and auto lorebook backfill, limited to assistant message saves.
  • Added focused generation tests for impersonate persistence and impersonated regenerate swipes.
  • Fixed an existing Rust clippy lifetime warning that blocked the required Rust Capability Layer CI job on this PR.

Refactor impact

Primary owner:

  • engine generation

Impact areas reviewed:

  • startGeneration save path for assistant, guided, and impersonate generations.
  • Generation replay metadata.
  • Regenerate swipe persistence.

Boundary notes:

  • Engine generation change plus a Rust clippy-only cleanup in an existing storage command helper. No React, shared API, Rust storage schema, dependency, auth, or remote-runtime boundary changes.

Pressure points touched:

  • Runtime generation persistence.
  • Rust storage command helper signature only; no behavior/schema change.

Validation

  • pnpm check passes locally
  • 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
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

  • Codex proof run:
  • pnpm exec vitest run src/engine/generation/start-generation.test.ts -t impersonate passed after the fix.
  • pnpm exec vitest run src/engine/generation/start-generation.test.ts passed with 33 tests.
  • pnpm check passed, including architecture, frontend typecheck, Rust cargo check, and docs checks.
  • cargo clippy --manifest-path src-tauri/Cargo.toml --workspace --all-targets -- -D warnings passed after the CI-only Rust cleanup.
  • node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json passed.
  • Graphify was run with python -m graphify update .; generated graphify-out cache/path churn was omitted from the PR because it was not portable reviewable evidence for this fix.

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 an engine persistence bug. The proof asserts the generated impersonate output is persisted as a user message with replay metadata and does not create an assistant message.

🔄 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/1436 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/27/2026 **Status:** ✅ Merged **Merged:** 5/27/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/refactor-issue-1432-impersonate-quick-reply` --- ### 📝 Commits (5) - [`8ec589b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8ec589b777b1429726d0e86162b98e2af6c8f871) Fix impersonate quick reply persistence - [`ea9b045`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ea9b045e10f6eef3418293e70fb2fb6ec5c9a8f0) Fix Rust clippy lifetime warning - [`502c7fa`](https://github.com/Pasta-Devs/Marinara-Engine/commit/502c7fa7c6b5f5797e4b8d390d6dedd272706cd4) Address impersonate persistence review feedback - [`9336cb3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9336cb3fdee3be3856e5552d74c0d08780736311) Obsolete stale generation replay review thread - [`6d5a56d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6d5a56d16de2b1cf020653f9ca7c86d81387a29f) Move regenerate replay patch into helper ### 📊 Changes **3 files changed** (+148 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/commands/entities.rs` (+3 -3) 📝 `src/engine/generation/start-generation.test.ts` (+77 -0) 📝 `src/engine/generation/start-generation.ts` (+68 -14) </details> ### 📄 Description ## Linked issue Closes #1432 ## Why this change - Conversation Impersonate quick replies generated text as the active persona, but the generated persona/user output was not persisted to chat storage. ## What changed - Store impersonate generations as generated `role: "user"` chat messages with replay metadata. - Preserve impersonated-user regenerate behavior by adding a new swipe to the target user message. - Keep assistant-only side effects, including Discord mirroring, tracker snapshots, and auto lorebook backfill, limited to assistant message saves. - Added focused generation tests for impersonate persistence and impersonated regenerate swipes. - Fixed an existing Rust clippy lifetime warning that blocked the required Rust Capability Layer CI job on this PR. ## Refactor impact Primary owner: - engine generation Impact areas reviewed: - `startGeneration` save path for assistant, guided, and impersonate generations. - Generation replay metadata. - Regenerate swipe persistence. Boundary notes: - Engine generation change plus a Rust clippy-only cleanup in an existing storage command helper. No React, shared API, Rust storage schema, dependency, auth, or remote-runtime boundary changes. Pressure points touched: - Runtime generation persistence. - Rust storage command helper signature only; no behavior/schema change. ## Validation - [ ] `pnpm check` passes locally - [ ] `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 - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes - Codex proof run: - `pnpm exec vitest run src/engine/generation/start-generation.test.ts -t impersonate` passed after the fix. - `pnpm exec vitest run src/engine/generation/start-generation.test.ts` passed with 33 tests. - `pnpm check` passed, including architecture, frontend typecheck, Rust cargo check, and docs checks. - `cargo clippy --manifest-path src-tauri/Cargo.toml --workspace --all-targets -- -D warnings` passed after the CI-only Rust cleanup. - `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json` passed. - Graphify was run with `python -m graphify update .`; generated `graphify-out` cache/path churn was omitted from the PR because it was not portable reviewable evidence for this fix. ## 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 an engine persistence bug. The proof asserts the generated impersonate output is persisted as a user message with replay metadata and does not create an assistant message. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:13: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#5086
No description provided.