mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #5977] [MERGED] fix(game): preserve selected world lore and check context limits #7010
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#7010
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/5977
Author: @SpicyMarinara
Created: 9/8/2026
Status: ✅ Merged
Merged: 9/9/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/worldgen-selected-lore-context-5952-5953📝 Commits (10+)
b3d03b2chore: begin selected world lore and context handling848e8fafix(game): preserve chosen world lore within the model context8a125ceMerge remote-tracking branch 'origin/staging' into fix/worldgen-selected-lore-context-5952-59534d9528btest(game): retain automatic lore budget coveragedf7166btest(game): scope ordinary budget assertion to its book7773566Merge remote-tracking branch 'origin/staging' into fix/worldgen-selected-lore-context-5952-595386b7211docs: align world-generation release note with exact selections226247cMerge remote-tracking branch 'origin/staging' into fix/worldgen-selected-lore-context-5952-5953b47b793Merge remote-tracking branch 'origin/staging' into fix/worldgen-selected-lore-context-5952-595333ec650docs: distinguish explicit world lore from automatic budgets📊 Changes
5 files changed (+150 additions, -217 deletions)
View changed files
📝
CHANGELOG.md(+3 -2)📝
packages/server/src/routes/game.routes.ts(+35 -51)📝
packages/server/src/services/lorebook/index.ts(+16 -6)📝
packages/server/src/services/storage/lorebooks.storage.ts(+3 -2)📝
scripts/regressions/experience-lore-entries.regression.ts(+93 -156)📄 Description
Linked issue
Closes #5952
Partially addresses #5953; the paired Pixelforge picker change belongs to Marinara-Agents and must land before closing that issue.
Why this change
World generation silently discarded explicitly selected lore at automatic lorebook token/count budgets, and sent oversized prompts to small-context models without checking the connection limit. The package then blamed a generic provider failure on the player's description.
What changed
context_limitresponse before contacting the provider, identifying selected lore when present.Validation
Automated checks completed:
pnpm checkandpnpm regression:promptpassed on the updated staging base.node scripts/run-regressions.mjs --filter experience-lore-entriespassed, including 101 selected entries from one default-budget book, roughly 200,000 tokens of literal lore on a large-context connection, explicitly picked outlets, disabled/deleted selections, ordinary budget preservation, oversized initial prompts and oversized JSON repairs.The updated selection regression fails against the previous automatic-budget implementation. With only the new route context check removed, the context regression fails because an oversized request reaches the provider and returns success.
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 world generation through the paired Pixelforge picker with a live provider, including a large selection and a small-context rejection. These checks are not claimed as completed. Local regressions use a synthetic HTTP provider and real route/storage code.
Docs and release impact
Unreleased changelog only; no version or user-guide changes. Pixelforge picker arithmetic and context-limit copy are handled in the package repository against staging.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.