mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7756] [MERGED] fix(prompt): preserve long manual summaries in model context #7915
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#7915
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/7756
Author: @SpicyMarinara
Created: 10/17/2026
Status: ✅ Merged
Merged: 10/17/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/7754-manual-summary-context📝 Commits (2)
016a897test: reproduce long manual summary truncation96742aafix: preserve authored text beyond macro output ceiling📊 Changes
2 files changed (+143 additions, -2 deletions)
View changed files
📝
packages/shared/src/utils/macro-engine.ts(+8 -2)📝
scripts/regressions/prompt.regression.ts(+135 -0)📄 Description
Linked issue
Closes #7754
Why this change
Long chats silently lost the newest manual summaries before the model context-budget check. The macro resolver clipped all output to 200,000 characters, even text containing no macros. A synthetic 95-summary chat reproduced the reported apparent cutoff at 73 summaries despite ample model capacity.
What changed
Validation
Completed locally on the final source in
96742aad4e9da4ec3b9f93b35fbac0fd1b18d430:pnpm install;pnpm checkpassed. The existing client hook/build warnings remain unchanged.pnpm smoke:ui: 7 passed.pnpm smoke:production: 3 passed (desktop Chromium, mobile Chromium, mobile WebKit).docker build -t marinara-7754:local .passed; the isolated container served a healthy API, compiled frontend, and built asset, then shut down cleanly.getMacroBudget, and summary scoping intentionally shares that counter across parts/readers. Resetting it would alter the existing expansion guard. An independent baseline-versus-patch probe confirmed identical frozen/reused-options behavior.node scripts/run-regressions.mjs): 908/909 files passed. The sole failure was an avatar-renderer import while browser setup concurrently rewrote shared build output; its isolated rerun passed (1/1). All 909 files passed across the run and that rerun; the initial aggregate command itself exited nonzero.Human verification checklist:
Claim boundary and remaining risks
The runnable proof covers shared host prompt assembly with synthetic summaries, both placement paths, positive retention, disabled-entry exclusion, semantic-selection behavior, and explicit/default macro-limit controls. It does not use the reporter's unavailable chat export or physical device. Actual model context fitting can still remove content when capacity is exhausted. Extremely large macro expansions, including encoded deferred conditional payloads, remain subject to the expansion guard.
Docs and release impact
No storage format, release metadata, or user-facing documentation changes.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.