mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #7999] [Issue]: Mari tools: an unreadable apply on a create writes, and bad numeric args are silently replaced #7512
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#7512
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 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7999
Originally assigned to: @ylli-selmani on GitHub.
Summary
Two of Professor Mari's structured-tool arguments are coerced without a word. If a create gets an
applyvalue itcannot read, the create writes. A numeric argument that is not a number, or is out of range, gets replaced by
the default or the limit. In both cases the call "succeeds", so a model never finds out it was misread. These are
behaviour bugs, not wording, so they were split out of #7949.
Expected behavior
applythat is neither a boolean nor a recognised string (true/false/yes/no/1/0/on/off),it refuses and names the accepted values, as
badEnumalready does for other enums. Leavingapplyout stillcreates, which is the documented default.
limit/offset("ten") is refused, naming the key and the range. When an out-of-rangevalue gets clamped, the result says so (e.g.
limit clamped to 2000), so a truncated page cannot pass for acomplete one.
Actual behavior
appDataCreateApply(packages/server/src/services/mari-db/mari-db.service.ts) isfirstBoolean(source, ["apply"]) !== false.firstBooleanonly reads booleans and a fixed set of strings,and returns
undefinedfor anything else, including the number0,"preview"and"dry-run". Soapply: 0orapply: "dry-run"on any of the 14 create sites (character.create,persona.create,instruction.remember, folder creates,lorebook.create/createEntry,theme.create,personal_extension.create, agent/tool creates,preset.addSection/addGroup/addChoiceBlock) writes.Updates and deletes are not affected: they use
=== true, so an unreadable value previews.workspace-agent.service.ts,numberArgreturns the fallback for a non-finite value and clampseverything else to
[min, max]without a message.readwithlimit: 5000returns 2,000 lines and says(truncated), but never mentions that the limit was lowered.normalizeLimit/normalizeOffsetinmari-db.service.tsdo the same for list reads (limit: "ten"→ default page,limit: 9999→ the max).Steps to reproduce
app_datawith{"action":"theme.create","data":{"name":"Probe","css":"body{}"},"apply":0}, thentheme.list. The theme exists."apply":"dry-run". It is created again.app_data{"action":"character.list","limit":"ten"}. The default page comes back, with no word aboutlimit.Environment
staging32499a440) +feat/mari-builtin-skillsLogs, screenshots, or video
Found by reading the source during the #7949 audit. No live model has been seen sending
apply: 0yet; steps1–3 are the direct repro.
Additional context
apply: "no"is treated as true") was wrong:firstBooleanreads"no"asfalse. Only values it cannot read at all fall through to "write".
firstBoolean's callers, not infirstBooleanitself, because other fields rely on itsundefined.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: