mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
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#6492
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/4776
Author: @kolacheee
Created: 8/8/2026
Status: ✅ Merged
Merged: 8/8/2026
Merged by: @kolacheee
Base:
staging← Head:feat/4767-mari-output-limits📝 Commits (4)
ed2e2a4feat(mari): field-aware, navigable app_data reads (#4767)c98594cfix(mari): guarantee the #4767 read bound; harden elision and paths8cad2efMerge branch 'staging' into feat/4767-mari-output-limits6e8c705fix(mari): harden #4767 field path resolution against inherited keys📊 Changes
4 files changed (+455 additions, -16 deletions)
View changed files
📝
packages/server/src/services/mari-db/mari-db.service.ts(+234 -15)📝
packages/server/src/services/professor-mari/workspace-agent.service.ts(+50 -1)📝
packages/shared/src/types/professor-mari-workspace.ts(+17 -0)📝
scripts/regressions/open-issues.regression.ts(+154 -0)📄 Description
Linked issue
Closes #4767
Why this change
When the Home workspace assistant reads live app data (
app_data { action: "character.get" }and the other.getreads), the result used to be sliced at a fixed 32k-character output cap with a raw string cut. On a heavy card — many long alternate greetings, a big lorebook body — that meant the read was truncated mid-JSON, silently, sometimes droppingname/descriptionentirely, with no structured signal that anything was cut and no way for Mari to recover the lost content.What changed
Single-object reads are now bounded structurally and stay fully navigable, instead of raw-sliced:
.getresult is over budget, whole oversized fields (long strings and large arrays, as a unit) are elided largest-first and replaced with a short placeholder that names the field's path and length. Identity fields (id,name) are never elided;descriptionis elided only as a last resort. The object stays valid JSON.truncationmetadata and rendered as an explicit note, so a bounded read never looks like a silent slice.app_data { field: "<path>", offset }, paging a long value across windows — so a single response stays under the cap while every byte remains reachable.Applied centrally in
MariDbService.executeActionand scoped to object reads (.get); already-summarizedlist/searcharrays and mutations pass through untouched. Option C from the issue (a user-configurable limit setting) was intentionally not included, to keep this a focused server-only change — happy to add it as a stacked PR if wanted.A follow-up (its own issue) is still worth doing: the workspace loop never calls
fitMessagesToContext, so command output accumulates across rounds against the model window — a distinct, unreported context-budget concern this PR does not touch.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Automated checks already run by the author (green) — not a substitute for the human pass below:
pnpm check(TypeScript + ESLint + build) green.pnpm regression:issuesgreen — the new#4767pin lives inopen-issues.regression.tsnext to the #4673 lorebook drill-down pin and asserts: a heavy card'sgetpreserves name/description and reports the oversized field with its true length; the elided value reassembles exactly acrossfield=windows; a 4000-tag card stays bounded (never inflated past the cap); a description-dominated card elides the description but keeps the name and recovers it viafield=; an unknownfield=path is flagged; a small read is untouched.pnpm regression:prompt,regression:professor-mari-shell-sandbox,regression:professor-mari-wikigreen.Still needs a human pass in the app (behavior is only fully observable through the workspace assistant):
field=and quote content from the far end of it.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)The
app_datatool description and the newfield/offsetargs are model-facing prompt text, not user docs — nothing underdocs/references them.Summary by CodeRabbit
New Features
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.