mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6639] [MERGED] fix: apply User Input regex to other Roleplay group characters #7264
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7264
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6639
Author: @SpicyMarinara
Created: 9/24/2026
Status: ✅ Merged
Merged: 9/24/2026
Merged by: @SpicyMarinara
Base:
staging← Head:codex/group-user-input-regex📝 Commits (4)
a01e933docs: track Individual group regex fix (#6637)8cb251cfix: apply group prompt regexes from the responding character perspective432b110fix: preserve regex anchors and inactive character regeneration872ee9afix: preserve attachments and scope the regex fix to Roleplay📊 Changes
9 files changed (+481 additions, -37 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
docs/extending/regex-scripts.md(+2 -0)📝
packages/server/src/routes/generate.routes.ts(+55 -19)📝
packages/server/src/routes/generate/dry-run-route.ts(+50 -7)📝
packages/server/src/routes/generate/generate-route-utils.ts(+7 -1)📝
packages/server/src/services/generation/prompt-message-scope.ts(+19 -8)📝
packages/server/src/services/generation/runtime-agent-sections.ts(+4 -2)➕
scripts/regressions/group-prompt-regex.regression.ts(+319 -0)📝
scripts/regressions/prompt.regression.ts(+23 -0)📄 Description
Linked issue
Closes #6637
Why this change
In a Roleplay chat using Individual group mode, Pantalone's replies become User Input for Maukie. Prompt regexes were applied before that role change when a character was explicitly selected, so a User Input thought-hiding script could leave Pantalone's thoughts visible. Rewriting shared history early also carried one responder's filtering into later responders.
What changed
Validation
Automated proof completed for
872ee9ae4:pnpm checkpassed (existing unrelated GameNarration hook-dependency warning; no errors).pnpm regression:promptpassed.node scripts/run-regressions.mjs --filter group-prompt-regexpassed. Before the fix, it failed because Maukie's request contained Pantalone's thoughts.Group mention routing and Roleplay whisper generation regressions passed.
The new proof checks explicit recipients, sequential replies, narrator handoffs/exclusions, global and character-scoped scripts, AI Output placement, preset/display exclusions, depth zero, anchored patterns, one application per rule, saved-text preservation, preset-less preview, merged groups, impersonation and single-character controls. Added coverage for optional speaker prefixes, inactive-character regeneration and attachment-only history after regex removal.
Local CodeRabbit reviews completed. Fixed the valid speaker-prefix, inactive-recipient, attachment and fixture-order findings; the latest local rerun returned no findings. An additional focused review of the final wrapper-cleanup guard hit the CLI quota; that guard is covered by the passing attachment regression and remains subject to the final GitHub review. Hosted CI/review is in progress.
Rejected the suggestion to disable deferral in Manual mode: no selected character intentionally means no provider call (verified with a temporary route proof), while applying regexes early for an explicit manual recipient reproduces #6637. The retained regression covers explicit Manual replies and a handoff to an excluded narrator.
pnpm checkpasses locallyContainer (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.mdManual verification notes
Manually verify the original Hide thoughts regex in an Individual group with Pantalone, Maukie and an excluded narrator; inspect each character's Peek Prompt and generated request. The automated fixture uses asterisk-delimited thoughts; the reporter's private chat and exact saved regex were not inspected. No interactive browser verification was performed. Local container validation is limited by roughly 2 GiB free disk space; hosted container checks are running.
Prompt claim boundary
The change selects regex placement and recipient scope for live history. It does not reconstruct older generated summaries or change display-side regex behavior. No storage format or provider protocol changes are included.
Docs and release impact
Updated the English regex guide and CHANGELOG. Translation follow-up: #6640. No version bump.
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue openedUI evidence (if applicable)
No UI changes.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.