mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #8375] [Feature]: Professor Mari: smaller write results and a cache-stable system prompt #8300
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#8300
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?
Originally created by @ylli-selmani on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8375
Originally assigned to: @ylli-selmani on GitHub.
What problem does this solve?
On a small-context model (12b, 16k), Professor Mari runs out of room partway through a task. The permanent prompt is large (~55k chars, ~13.8k tokens), but the faster drain is how much each tool turn adds. In one measured run (Gemma 4 31b), each turn added about 12k chars:
changedFieldsOnly(workspace-agent.service.ts) compares fields only one level deep, so a description-onlycharacter.updatereturns the wholedata.extensionsobject (where onboarding lives) whenever anything inside it changed. Mari hit the 32,000-char result cut this way. A create's result also echoes the card she just wrote.currentTime(to the millisecond), the connection line and thedecisionAuthoringJSON in its environment block, before the skill index. Prompt caches match from the start, so everything after the first changing line is paid again on every new chat.Proposed solution
changedFieldsOnlydiff nested objects all the way down (arrays compared whole), and check thatreadBackcarries status and the changed fields, not whole rows.currentTime, connection,decisionAuthoring) to the very end of the system message, withdecisionAuthoringdescribed in words instead of raw JSON. The full time stays.Alternatives considered
currentTimeto the date. That would be slightly more cache-stable, but she'd lose time-of-day awareness. Moving the line to the end is enough.Additional context
The measurements come from captured request logs on an older staging head. A fresh static count on current staging goes into the PR. A live before/after on Gemma 31b and a 12b follows once the implementation is in.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: