mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7329] [MERGED] fix(lorebooks): stop reporting empty entries as budget-skipped and name the budget #7683
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#7683
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/7329
Author: @SpicyMarinara
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/7325-lorebook-skipped-entries📝 Commits (8)
fe7d5dcfix(lorebooks): stop reporting empty entries as budget-skipped and name the budgetb4216c1Merge origin/staging into fix/7325-lorebook-skipped-entries7516d05fix(lorebooks): keep {{setvar}} from entries that macros emptyf044a27Merge origin/staging into fix/7325-lorebook-skipped-entries6020ba1fix(lorebooks): say the current-location lore limit is fixed05c3203Merge origin/staging into fix/7325-lorebook-skipped-entries2f758d3Move the CHANGELOG entry away from other open PRsb49b967Merge origin/staging into fix/7325-lorebook-skipped-entries📊 Changes
6 files changed (+204 additions, -15 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
docs/lorebooks/token-budgets.md(+4 -1)📝
packages/client/src/components/chat/ChatRoleplayPanels.tsx(+39 -10)📝
packages/client/src/localization/locales/en.json(+3 -0)📝
packages/server/src/services/lorebook/index.ts(+29 -4)➕
scripts/regressions/lorebook-budget-skips.regression.ts(+128 -0)📄 Description
Linked issue
Closes #7325
Why this change
packages/server/src/services/lorebook/index.ts,trySelectBudgetedLorebookEntry): an entry whose text is blank, or that macros resolve to nothing (for example a{{setvar}}-only entry or an{{#if}}branch not taken), failsfitLorebookEntryToBudgetbecause it has no text. The skip reason then fell back to"chat"ingetBudgetSkipReason, so the panel showed it as blocked by the chat budget with "3 / 0". With every budget off, such entries were the only way to get a chat/lorebook skip. Reproduced on staging with budgets 0 and 0: blank and macro-emptied entries came back asblockedBy: "chat".What changed
{{setvar}}-only entry sets its variable, so entries that read it (for example{{#if {{getvar::x}}}}…{{/if}}) keep their text. Since #6809 the budget pass rolled those macros back, which silently dropped the dependent lore.--marinara-app-accent-static) and theme tokens instead of hard-coded amber, so it never pulses with Accent Pulse.chat.activeContext.budgetHint.chat,.lorebook,.location.scripts/regressions/lorebook-budget-skips.regression.ts(fails on staging, passes here). It also pins that real chat, lorebook and image skips are still reported with the right budget.docs/lorebooks/token-budgets.md(notice color, budget line, location reason, empty entries). Translations tracked in #7328.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
{{setvar::x::1}}(or empty). After a new reply, Active Context shows no skipped-entries notice.{{setvar::met::yes}}and a second entry with the same keyword whose text is{{#if {{getvar::met}} == "yes"}}Vibrance trusts you.{{/if}}. After a new reply, Active Context lists the second entry with that text and Chat Variables showsmet = yes.Agent-run checks:
node ./scripts/run-regressions.mjs --filterforlorebook-budget-skips(also run against staging'slorebook/index.tsto confirm it fails there),experience-lore-entries,lorebook-image-prompt,lorebook-images,lorebook-decision-activation,lorebook-include-macro,chat-lorebook-entry-scope,lorebook-scan-compaction,lorebook-test-scan;pnpm localization:check.pnpm checkandpnpm regression:promptresults are added in a comment below once they finish.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
None captured by the agent; see the manual checks above.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.