[PR #3910] [MERGED] Fix Individual Conversation group generation #6154

Closed
opened 2026-10-23 04:07:36 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3910
Author: @SpicyMarinara
Created: 7/21/2026
Status: ✅ Merged
Merged: 7/21/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/conversation-individual-runtime-fixes


📝 Commits (3)

  • 41e5bf1 Fix Individual Conversation group generation
  • 08559be Deduplicate conversation relocation values
  • 274b07d Merge remote-tracking branch 'origin/staging' into codex/review-3910

📊 Changes

2 files changed (+223 additions, -67 deletions)

View changed files

📝 packages/server/src/routes/generate.routes.ts (+170 -67)
📝 scripts/regressions/open-issues.regression.ts (+53 -0)

📄 Description

Why

Individual Conversation group chats could behave inconsistently across larger Smart groups, autonomous replies, Character Exchanges, and character-tagged lorebooks:

  • Smart selection was biased toward exactly one responder.
  • A model could append another character's dialogue to a targeted Individual completion.
  • Lorebook matching happened before Smart or Sequential responders were known, so every group member's character tags could activate entries for each responder.

What changed

  • Let Smart selection choose every naturally involved participant without biasing large groups toward one responder.
  • Keep autonomous messages and Character Exchanges as separate, single-character generations, and discard an extra named character turn if a model returns one in the same completion.
  • Defer lorebook injection for untargeted Individual generations until each responder is known.
  • Scan character-tagged lorebooks with only the current responder while advancing shared lorebook runtime state once for the overall chat turn.
  • Preserve existing lorebook relocation macros, depth injection, and conditional placement.
  • Leave Grouped Conversation behavior unchanged.
  • Add regression guards for Smart selection, targeted autonomous lanes, Character Exchanges, responder-scoped lorebooks, and extra-speaker pruning.

Validation

  • pnpm check
  • pnpm regression:prompt
  • pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/open-issues.regression.ts
  • git diff --check

Manual verification

  • Manually verify Smart Response Order can select several appropriate responders in a six-character Individual Conversation.
  • Manually verify an autonomous message saves only the selected character's reply and a Character Exchange arrives as a separate generation.
  • Manually verify character-tagged lorebook entries only appear for the current Individual responder.
  • Manually verify Grouped Conversation prompts and responses remain unchanged.

Risk boundary

This changes prompt assembly and responder routing in /api/generate. Automated prompt and source regressions passed; no live external model generation was performed.

No linked issue was supplied; please add one before merge if project policy requires it.

Summary by CodeRabbit

  • New Features

    • Improved Conversation-mode group responses with responder-specific lorebook context.
    • Smart group ordering now supports multiple responders in larger conversations.
    • Individual responses better preserve turn boundaries by removing unintended extra speaker turns.
    • Autonomous messaging more reliably targets a single character and starts separate individual exchanges.
  • Tests

    • Expanded regression coverage for group responder selection, lorebook scoping, turn handling, and autonomous messaging.

🔄 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/3910 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/21/2026 **Status:** ✅ Merged **Merged:** 7/21/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/conversation-individual-runtime-fixes` --- ### 📝 Commits (3) - [`41e5bf1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/41e5bf12a46fada06ca6455675e3b0abd4e3fe0a) Fix Individual Conversation group generation - [`08559be`](https://github.com/Pasta-Devs/Marinara-Engine/commit/08559be5e83a468bf1a571df6af8323a585c7b57) Deduplicate conversation relocation values - [`274b07d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/274b07ddd599c2f4fe45caf503429c2657bff901) Merge remote-tracking branch 'origin/staging' into codex/review-3910 ### 📊 Changes **2 files changed** (+223 additions, -67 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/generate.routes.ts` (+170 -67) 📝 `scripts/regressions/open-issues.regression.ts` (+53 -0) </details> ### 📄 Description ## Why Individual Conversation group chats could behave inconsistently across larger Smart groups, autonomous replies, Character Exchanges, and character-tagged lorebooks: - Smart selection was biased toward exactly one responder. - A model could append another character's dialogue to a targeted Individual completion. - Lorebook matching happened before Smart or Sequential responders were known, so every group member's character tags could activate entries for each responder. ## What changed - Let Smart selection choose every naturally involved participant without biasing large groups toward one responder. - Keep autonomous messages and Character Exchanges as separate, single-character generations, and discard an extra named character turn if a model returns one in the same completion. - Defer lorebook injection for untargeted Individual generations until each responder is known. - Scan character-tagged lorebooks with only the current responder while advancing shared lorebook runtime state once for the overall chat turn. - Preserve existing lorebook relocation macros, depth injection, and conditional placement. - Leave Grouped Conversation behavior unchanged. - Add regression guards for Smart selection, targeted autonomous lanes, Character Exchanges, responder-scoped lorebooks, and extra-speaker pruning. ## Validation - `pnpm check` - `pnpm regression:prompt` - `pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/open-issues.regression.ts` - `git diff --check` ## Manual verification - [ ] Manually verify Smart Response Order can select several appropriate responders in a six-character Individual Conversation. - [ ] Manually verify an autonomous message saves only the selected character's reply and a Character Exchange arrives as a separate generation. - [ ] Manually verify character-tagged lorebook entries only appear for the current Individual responder. - [ ] Manually verify Grouped Conversation prompts and responses remain unchanged. ## Risk boundary This changes prompt assembly and responder routing in `/api/generate`. Automated prompt and source regressions passed; no live external model generation was performed. No linked issue was supplied; please add one before merge if project policy requires it. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Improved Conversation-mode group responses with responder-specific lorebook context. * Smart group ordering now supports multiple responders in larger conversations. * Individual responses better preserve turn boundaries by removing unintended extra speaker turns. * Autonomous messaging more reliably targets a single character and starts separate individual exchanges. * **Tests** * Expanded regression coverage for group responder selection, lorebook scoping, turn handling, and autonomous messaging. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:07:36 +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#6154
No description provided.