mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8323] [MERGED] fix: prevent unintended post-history macro rerolls #8275
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#8275
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/8323
Author: @SpicyMarinara
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/8318-single-macro-evaluation📝 Commits (3)
5c4d430test: reproduce deferred character memory rerolls8ab2246fix: reuse resolved post-history instructions per prompt pass334c052test: cover merged post-history prompt reuse📊 Changes
5 files changed (+263 additions, -27 deletions)
View changed files
📝
packages/server/src/routes/generate.routes.ts(+19 -2)📝
packages/server/src/services/prompt/assembler.ts(+3 -0)📝
packages/server/src/services/prompt/macro-context.ts(+4 -1)📝
packages/shared/src/utils/macro-engine.ts(+15 -24)➕
scripts/regressions/deferred-character-side-effects.regression.ts(+222 -0)📄 Description
Linked issue
Closes #8318
Why this change
A card can reveal one memory to the main model while silently marking another memory as fired. Post History Instructions were evaluated again when preparing character profiles, and deferred name expansion also evaluated unused card fields.
What changed
Validation
pnpm checkpasses locallyCONTRIBUTING.mdLocal proof at final head
334c052d19040daaea8ee5e09f5498cb584abefa:git diff --checkpass.pnpm checkpasses, including the production build.pnpm regression:promptpasses all three regression files. The focused fixture also passes against the actual compiled server/shared modules.pnpm smoke:uipasses 7/7 desktop Chromium tests with one worker. No UI layout changes are included.8ab224699and reported two duplicate requests for merged-responder coverage. That coverage was added; a fresh final test-only delta review at334c052d1reports zero findings. Production source did not change between those review heads.334c052d1904, its built-file fingerprint verifies clean, and the new compiled artifacts were hashed separately from the retained earlier Gacha baseline.GitHub CI and Dottore Review remain independent merge gates.
Manual verification notes
Claim boundary
This fixes unintended re-evaluation during character-profile preparation and unused deferred-field expansion. Explicitly authoring the same executable macro in multiple prompt sections remains separate execution. It adds no global macro cache and changes no persisted format or provider routing.
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue openedNo user-facing docs, localization, release metadata, or storage format changes.
UI evidence
No UI changes. Before/after proof is deterministic macro state plus actual main-provider and activated-agent payloads.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.