[PR #3908] [MERGED] fix: separate Conversation smart candidates #6151

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

📋 Pull Request Information

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

Base: staging ← Head: agent/conversation-smart-candidate-blocks


📝 Commits (1)

  • 3a43190 fix: separate Conversation smart candidates

📊 Changes

3 files changed (+107 additions, -15 deletions)

View changed files

📝 packages/server/src/routes/generate.routes.ts (+15 -15)
📝 packages/server/src/services/generation/conversation-context-utils.ts (+32 -0)
📝 scripts/regressions/prompt.regression.ts (+60 -0)

📄 Description

Linked issue

No linked issue. This is a maintainer-requested follow-up to Conversation Individual-mode smart response ordering.

Why this change

Conversation smart sorting placed every character inside one <candidates> block using YAML-like - id: separators. Character personality and description text can contain their own headings, indentation, and bullet lists, making candidate boundaries ambiguous to the selector model.

What changed

  • Wrap each Conversation smart-sort character in its own <candidate>...</candidate> block.
  • Preserve character card content verbatim inside each block.
  • Keep the existing Roleplay smart-sort candidate format unchanged.
  • Add a prompt regression covering card-owned Core Traits bullets and the Roleplay negative control.

Validation

  • pnpm check passes locally
  • pnpm regression:prompt passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Automated prompt regression verifies that each Conversation candidate receives a distinct XML block even when personality content contains its own bullet list.
  • Automated negative control verifies that Roleplay retains the legacy list format.
  • No live provider request was performed.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence

Not applicable; this changes an internal selector prompt.

Summary by CodeRabbit

  • Improvements
    • Improved consistency in smart group responder selection by standardizing how candidate details are presented.
    • Candidate information such as names, availability, activity, personality, descriptions, and talkativeness is now formatted more reliably.
    • Added safeguards to verify formatting across supported responder selection modes.

🔄 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/3908 **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-smart-candidate-blocks` --- ### 📝 Commits (1) - [`3a43190`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3a431904cbcc5501e32acd2d06e42e958c7cb7dc) fix: separate Conversation smart candidates ### 📊 Changes **3 files changed** (+107 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/generate.routes.ts` (+15 -15) 📝 `packages/server/src/services/generation/conversation-context-utils.ts` (+32 -0) 📝 `scripts/regressions/prompt.regression.ts` (+60 -0) </details> ### 📄 Description ## Linked issue No linked issue. This is a maintainer-requested follow-up to Conversation Individual-mode smart response ordering. ## Why this change Conversation smart sorting placed every character inside one `<candidates>` block using YAML-like `- id:` separators. Character personality and description text can contain their own headings, indentation, and bullet lists, making candidate boundaries ambiguous to the selector model. ## What changed - Wrap each Conversation smart-sort character in its own `<candidate>...</candidate>` block. - Preserve character card content verbatim inside each block. - Keep the existing Roleplay smart-sort candidate format unchanged. - Add a prompt regression covering card-owned `Core Traits` bullets and the Roleplay negative control. ## Validation - [ ] `pnpm check` passes locally - [ ] `pnpm regression:prompt` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Automated prompt regression verifies that each Conversation candidate receives a distinct XML block even when personality content contains its own bullet list. - Automated negative control verifies that Roleplay retains the legacy list format. - No live provider request was performed. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence Not applicable; this changes an internal selector prompt. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Improved consistency in smart group responder selection by standardizing how candidate details are presented. * Candidate information such as names, availability, activity, personality, descriptions, and talkativeness is now formatted more reliably. * Added safeguards to verify formatting across supported responder selection modes. <!-- 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:35 +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#6151
No description provided.