[PR #5214] [MERGED] fix: preserve example dialogue without a dedicated marker #6678

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5214
Author: @SpicyMarinara
Created: 8/17/2026
Status: ✅ Merged
Merged: 8/17/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/5213-example-dialogue-fallback


📝 Commits (3)

  • 9d9fb57 fix prompt example dialogue fallback
  • f28e1c5 fix prompt fallback field order
  • 1c316c0 Merge remote-tracking branch 'origin/staging' into agent/5213-example-dialogue-fallback

📊 Changes

4 files changed (+38 additions, -9 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/server/src/services/prompt/assembler.ts (+10 -0)
📝 packages/server/src/services/prompt/marker-expander.ts (+11 -1)
📝 scripts/regressions/prompt.regression.ts (+16 -8)

📄 Description

Linked issue

Closes #5213

Why this change

Character-card Example Dialogue silently disappeared from model prompts whenever a preset kept Character Info but omitted the dedicated Dialogue Examples marker.

What changed

  • Fall back to the card's Example Dialogue inside the default Character Info marker when no Dialogue Examples marker exists.
  • Keep enabled Dialogue Examples markers authoritative so content is injected exactly once.
  • Treat a present but disabled Dialogue Examples marker as an explicit opt-out.
  • Add regression coverage across XML, Markdown, and unwrapped prompt formats.
  • Add an Unreleased changelog entry.

Validation

  • pnpm check 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

  • Not manually exercised in the browser; this is server-side prompt assembly.
  • Automated prompt regression covered missing, enabled, and disabled marker states in XML, Markdown, and unwrapped formats.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] <paths> follow-up issue opened
  • Version/release files updated (only if this PR includes a version bump)

Automated evidence

  • pnpm regression:prompt passed.
  • pnpm check passed.

Summary by CodeRabbit

  • Bug Fixes
    • Character prompts now include example dialogue automatically when no dedicated Dialogue Examples marker is configured.
    • Example dialogue is included only once when both character and dedicated dialogue sections are available.
    • Disabled Dialogue Examples markers continue to suppress example dialogue as expected.
  • Tests
    • Added regression coverage for prompt configurations with missing, enabled, and disabled dialogue markers.

🔄 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/5214 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/17/2026 **Status:** ✅ Merged **Merged:** 8/17/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/5213-example-dialogue-fallback` --- ### 📝 Commits (3) - [`9d9fb57`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9d9fb5797c8af409050791b1ce67ff66be52ff7e) fix prompt example dialogue fallback - [`f28e1c5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f28e1c5f1288ca60b7960a776d0486a9d2672a03) fix prompt fallback field order - [`1c316c0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1c316c0319fe1cf17ecb84849cb1a8658a1738ec) Merge remote-tracking branch 'origin/staging' into agent/5213-example-dialogue-fallback ### 📊 Changes **4 files changed** (+38 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/server/src/services/prompt/assembler.ts` (+10 -0) 📝 `packages/server/src/services/prompt/marker-expander.ts` (+11 -1) 📝 `scripts/regressions/prompt.regression.ts` (+16 -8) </details> ### 📄 Description ## Linked issue Closes #5213 ## Why this change Character-card Example Dialogue silently disappeared from model prompts whenever a preset kept Character Info but omitted the dedicated Dialogue Examples marker. ## What changed - Fall back to the card's Example Dialogue inside the default Character Info marker when no Dialogue Examples marker exists. - Keep enabled Dialogue Examples markers authoritative so content is injected exactly once. - Treat a present but disabled Dialogue Examples marker as an explicit opt-out. - Add regression coverage across XML, Markdown, and unwrapped prompt formats. - Add an Unreleased changelog entry. ## Validation - [ ] `pnpm check` 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 - Not manually exercised in the browser; this is server-side prompt assembly. - Automated prompt regression covered missing, enabled, and disabled marker states in XML, Markdown, and unwrapped formats. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n] <paths>` follow-up issue opened - [ ] Version/release files updated (only if this PR includes a version bump) ## Automated evidence - `pnpm regression:prompt` passed. - `pnpm check` passed. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Character prompts now include example dialogue automatically when no dedicated Dialogue Examples marker is configured. * Example dialogue is included only once when both character and dedicated dialogue sections are available. * Disabled Dialogue Examples markers continue to suppress example dialogue as expected. * **Tests** * Added regression coverage for prompt configurations with missing, enabled, and disabled dialogue markers. <!-- 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:12:40 +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#6678
No description provided.