[PR #2394] [MERGED] Reply as all characters in sequential individual group chat #5577

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

📋 Pull Request Information

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

Base: refactor ← Head: fix/sequential-group-all-turns


📝 Commits (1)

  • d9cb012 Reply as all characters in sequential individual group chat

📊 Changes

1 file changed (+9 additions, -2 deletions)

View changed files

📝 src/engine/generation/start-generation.ts (+9 -2)

📄 Description

Linked issue

Closes #2282

Why this change

  • In roleplay group chat with groupChatMode: "individual" and groupResponseOrder: "sequential", only one character replied per user send instead of all active characters taking a turn. The sequential branch of resolveIndividualGroupTurnIds returned a single next-in-rotation id while the "smart" branch already returned the full multi-selection. The turn loop, group_turn total, and client index/total handling already support N>1, so only the sequential branch under-filled the array.

What changed

  • Added sequentialGroupTurnOrder in src/engine/generation/start-generation.ts returning the full active-character rotation in turn order, starting at the character after the last visible assistant.
  • The sequential branch of resolveIndividualGroupTurnIds now returns that full rotation instead of [singleTarget].
  • The single-target sequentialGroupTarget helper is unchanged and still used by the merged-mode single-responder and smart-fallback paths.

Refactor impact

Primary owner: engine generation

Impact areas reviewed:

  • src/engine/generation/start-generation.ts (resolveIndividualGroupTurnIds, new sequentialGroupTurnOrder)

Boundary notes:

  • None. Engine-only; reuses engine-local lastVisibleAssistantCharacterId and activeCharacterIds. No feature/shared/Rust crossing.

Pressure points touched:

  • None. Consumed only by the pre-existing runIndividualGroupTurnLoop.

Validation

  • Matching validation command passes locally
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • pnpm vitest run src/engine/generation/start-generation.test.ts — 19 passed (3 new: full rotation emits one group_turn per active character with total: 3; round starts after the last visible assistant; manual order still emits zero turns).
  • pnpm exec tsc -b — clean.

Feature Discoverability

  • Updated src/features/shell/discovery/
  • N/A because this PR is a bugfix restoring intended group-turn behavior.

Reason:

  • No new discoverable surface; the control already exists.

Docs and release impact

  • No docs changes needed

🔄 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/2394 **Author:** [@Romuromylus](https://github.com/Romuromylus) **Created:** 6/6/2026 **Status:** ✅ Merged **Merged:** 6/6/2026 **Merged by:** [@Romuromylus](https://github.com/Romuromylus) **Base:** `refactor` ← **Head:** `fix/sequential-group-all-turns` --- ### 📝 Commits (1) - [`d9cb012`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d9cb01221dedcd68588da220c306f9311c82c276) Reply as all characters in sequential individual group chat ### 📊 Changes **1 file changed** (+9 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/engine/generation/start-generation.ts` (+9 -2) </details> ### 📄 Description ## Linked issue Closes #2282 ## Why this change - In roleplay group chat with `groupChatMode: "individual"` and `groupResponseOrder: "sequential"`, only one character replied per user send instead of all active characters taking a turn. The sequential branch of `resolveIndividualGroupTurnIds` returned a single next-in-rotation id while the "smart" branch already returned the full multi-selection. The turn loop, `group_turn` total, and client `index`/`total` handling already support N>1, so only the sequential branch under-filled the array. ## What changed - Added `sequentialGroupTurnOrder` in `src/engine/generation/start-generation.ts` returning the full active-character rotation in turn order, starting at the character after the last visible assistant. - The sequential branch of `resolveIndividualGroupTurnIds` now returns that full rotation instead of `[singleTarget]`. - The single-target `sequentialGroupTarget` helper is unchanged and still used by the merged-mode single-responder and smart-fallback paths. ## Refactor impact Primary owner: engine generation Impact areas reviewed: - `src/engine/generation/start-generation.ts` (`resolveIndividualGroupTurnIds`, new `sequentialGroupTurnOrder`) Boundary notes: - None. Engine-only; reuses engine-local `lastVisibleAssistantCharacterId` and `activeCharacterIds`. No feature/shared/Rust crossing. Pressure points touched: - None. Consumed only by the pre-existing `runIndividualGroupTurnLoop`. ## Validation - [x] Matching validation command passes locally - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - `pnpm vitest run src/engine/generation/start-generation.test.ts` — 19 passed (3 new: full rotation emits one `group_turn` per active character with `total: 3`; round starts after the last visible assistant; `manual` order still emits zero turns). - `pnpm exec tsc -b` — clean. ## Feature Discoverability - [ ] Updated `src/features/shell/discovery/` - [x] N/A because this PR is a bugfix restoring intended group-turn behavior. Reason: - No new discoverable surface; the control already exists. ## Docs and release impact - [x] No docs changes needed --- <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:31 +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#5577
No description provided.