mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3352] Multi-rewrite-agent merge (v2.0.9) silently drops settings-based rules — Prose Guardian stops editing when sharing a chat with another rewrite agent[Issue]: #1816
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#1816
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?
Originally created by @mgbraddy on GitHub (Jul 8, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3352
Originally assigned to: @SpicyMarinara on GitHub.
Summary
As of v2.0.9, when two or more built-in rewrite agents (prose-guardian, continuity, html) are active in the same chat, they're collapsed into one merged rewrite pass whose prompt is built only from each agent's promptTemplate. Prose Guardian's promptTemplate is empty by design — its ruleset lives in settings.banned/avoid/prefer — so the merge produces an instruction-less no-op and PG stops fixing prose.
Expected behavior
When Prose Guardian is merged with another rewrite agent, its settings-based rules (banned/avoid/prefer word lists) should be folded into the merged prompt, so it keeps enforcing them.
Actual behavior
The merged rewrite agent runs with an empty instruction body (both PG's and Continuity's promptTemplate are ""), returns editNeeded:false in ~27 tokens, and all the slop PG normally kills (e.g. the "A beat." fragment tic) passes through untouched. PG's own agent-run row never appears; the merged run is logged under the other agent's config ID, and baseAgent inherits that agent's settings, dropping PG's banned list entirely.
Steps to reproduce
In one chat, activate only Prose Guardian as a rewrite agent → it runs solo and edits correctly.
In a second chat (same characters/preset), activate both Prose Guardian and Continuity Checker (or Immersive HTML).
Generate messages containing PG's banned patterns (e.g. "A beat.").
Observe: in the solo chat PG rewrites them; in the two-rewrite-agent chat they pass through untouched, and no prose-guardian agent-run is recorded (a single merged text_rewrite runs under the other agent's ID as a ~27-token no-op).
Environment
Marinara Engine version: v2.0.9
Install type: source
OS + version: Windows 10
Browser or app shell: Chrome
Logs, screenshots, or video
Merge logic: packages/server/src/services/generation/prose-guardian-settings.ts — mergePairedBuiltInRewriteAgents (~L156) and buildMergedRewritePrompt (~L135) build the merged prompt from promptTemplate only.
PG's rules are injected separately via applyProseGuardianChatSettings from settings.banned/avoid/prefer, which the merge never reads.
Observed run: merged text_rewrite logged under Continuity's config ID, editNeeded:false, 27 tokens / ~5.7s.
Additional context
Suggested fix: in buildMergedRewritePrompt, run each agent's chat-settings transform (applyTextRewriteAgentChatSettings / applyProseGuardianChatSettings) and fold the resulting rules into the merged prompt before combining — don't rely on promptTemplate alone for agents whose rules live in settings.
Workaround: keep only one built-in rewrite agent active per chat (disabling Continuity restores PG).
Root-caused via Professor Mari on 2026-07-08.
Template check
[ ] I DID NOT read this template and provide the requested details.
@SpicyMarinara commented on GitHub (Jul 8, 2026):
In PR.