mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #7949] fix(mari): structured tool errors should name the action, the value and its shape #4366
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#4366
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/7949
Originally assigned to: @ylli-selmani on GitHub.
Summary
Mari's structured tools (
app_dataand the workspace commands) are designed so a model can repair its owncall from the error text — that text is the documentation a small model reads at the moment it is wrong.
Several messages name a value but not its location or shape, and the namespace fallbacks withhold both the
received action and the valid set, so a near-miss looks like a wrong surface and the model either repeats the
call or abandons
app_dataformari db/ shell.Observed: a model called
character.createwithout a top-levelnameand gotcharacter name is required: pass it as "name". It reasoned "the error message says pass it as name whichsuggests it's a top-level field" and retried; another run nested it as
data.character.name.Expected behavior
Every error a model is expected to self-correct from states four things in one fixed order:
<action>: <what is wrong> (<what arrived>). <where it goes / accepted shape>.An unknown action echoes whatwas sent, suggests the nearest valid name, and lists the valid set for that namespace.
Actual behavior
character name is required: pass it as "name"(mari-db.service.ts:1114, one template behind ~70 callsites) — no location, no shape, no echo of what arrived.
Unsupported <namespace> app_data action.fallbacks (:3154,:3332,:4396,:4485,:4573,:4783,:4924,:5517) — no received name, no valid list, although the switch above is that list.app_data action is required: pass it as "action" or "type"(:2801) — advertisestype, which theapp_datatool schema does not accept; the retry fails schema validation before reaching this message.character.moveToFolder needs folderId or folderName(:3115) — reads top-level args only while theneighbouring card actions read
data, and the message does not say so, so a model applying the rightgeneral rule fails permanently.
"role" must be one of …(:1874) is the best of the family: field, set and received value, but no actionand no location.
Steps to reproduce
in the first message.
character.create; the error namesnamebut not that it is top-level.app_datawithaction: "character.gets"and compare the message it returns with the valid actionsthe switch actually accepts.
Environment
staging32499a440) with the Professor Mari skills branch on topLogs, screenshots, or video
Request logs and the full audit are kept privately; the five messages above are quoted from the current tree.
Additional context
file:line, misread, rewrite and risk:.tmp/mari-tool-errors/AUDIT.md(private). Two adjacent findings are not message defects and are filed separately if at all: numeric args
fail silently (
firstNumber/normalizeLimitclamp without a word), andapply: "no"is treated astrueby
appDataCreateApplywhilefirstBooleanreads it as false.mari-db/tool-error.tshelper (
needArg/unknownAction/badEnum/describeReceived), text-only: no dispatch, validation orsandbox change.
@ylli-selmani commented on GitHub (Oct 21, 2026):
I'm doing it