mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #5745] [MERGED] feat(mari): show the phrase Professor Mari understood as the request or permission to act #6914
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#6914
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/5745
Author: @kolacheee
Created: 9/2/2026
Status: ✅ Merged
Merged: 9/2/2026
Merged by: @kolacheee
Base:
staging← Head:feat/5740-mari-understood-request📝 Commits (5)
7f50a17feat(mari): show the phrase Mari understood as permission to act (#5740)24c4c37fix(mari): ground the understood-request record in observed outcomes (#5740)3ef7278fix(client): give the held-for-approval marker its own line (#5740)aa3bb84fix(mari): address CodeRabbit round 1 on the understood-request record (#5740)0269629fix(mari): take the understood-request phrase only from mutating frames (#5740)📊 Changes
9 files changed (+534 additions, -12 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
e2e/core-flows.e2e.ts(+2 -0)📝
packages/client/src/components/chat/HomeProfessorMariChat.tsx(+77 -10)📝
packages/client/src/components/panels/SettingsPanel.tsx(+18 -1)📝
packages/client/src/lib/support-diagnostics.ts(+46 -0)📝
packages/client/src/localization/locales/en.json(+10 -1)📝
packages/server/src/services/professor-mari/workspace-agent.service.ts(+109 -0)📝
packages/shared/src/types/professor-mari-workspace.ts(+32 -0)➕
scripts/regressions/mari-understood-request.regression.ts(+238 -0)📄 Description
Linked issue
Closes #5740.
Why this change
Mari's permission behavior has been a long arc of conflicting reports (#4813 → #4838 → #5721 → #5725), and investigating them showed that many reporters didn't realize their own wording implied a change request. Nothing recorded what Mari took as the authorizing instruction, so every report started as transcript archaeology. With beta testers about to exercise Permissions Mode, the maintainer needs reports to carry this signal so user error and real Mari issues can be told apart at a glance.
What changed
Mari's protocol gains an optional, purely diagnostic
understoodRequestfield: when a response carries mutating commands, she copies the exact words she is treating as the request or permission — from the user's message, or from the memory/instruction that directed the change. Hard constraint carried from #5721: the server stores and displays the value and never validates, matches, or gates on it — a missing or wrong quote never blocks anything, and the regression sweeps both Mari server files to assert no conditional branches on the field.The three design questions were answered on the issue by the maintainer and are implemented accordingly:
Two things the record carries beyond the phrase, both added on maintainer direction during review:
held/interruptedand is upgraded toapplied/failedonly from the command batch's own results. Without this, a Plan-mode round (whose mutating commands the #5725 floor refuses by design) would have pasted into diagnostics asexecuted— manufacturing a Plan-escape P0 that never happened, in the one line built to prevent exactly that misread.<mari_understood_request_record>, framed explicitly as a record and not an instruction. Asking her "why did you treat that as permission?" now gets an answer grounded in the actual record instead of a from-memory reconstruction. Inclusion-only — the regression's enumerated-conditional sweep pins that no branch on the field can ever gate a command.Surfaces:
MariWorkspaceStatus.latestUnderstoodRequest(how the client learns it), the transcript line, and Support Diagnostics — the copy handler best-effort-fetches workspace status and the report gains aMari last acted on:line distinguishing unreachable / none recorded this session / the quoted phrase with mode, held-or-executed, command list, and timestamp. That line is the load-bearing part: reporters paste diagnostics into Discord, so triage reads the trigger phrase directly from the report.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm lint, all three builds, the locale checker, and the e2e type lane are green locally;format:checkfails repo-wide on this Windows checkout (pre-existing autocrlf CRLF; touched files were run through Prettier directly).mari-understood-requestpasses: functional parse tests (extraction, trim, 2000-char cap, absence, non-string), the never-enforce sweep, one-record retention pins, client truncate/expand pins, en.json keys, and the diagnostics line — differentially verified to FAIL with the extraction stubbed out. Sibling Mari lanes,prompt.regression, andopen-issuesstay green.latestUnderstoodRequestform at all); and the transcript line gainedbreak-wordsplusaria-expanded/state-aware tooltip.Mari last acted on:line with the same phrase. A chat with no mutating round yet should copy "none recorded this session". Then ask Mari why she made the change — she should quote the recorded phrase back rather than improvising.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)CHANGELOG updated under [Unreleased] → Added. No user-facing docs under
docs/touched (docs-i18n debt stays batched per the standing call).UI evidence (if applicable)
The "Acting on" line under Mari's replies and the new
Mari last acted on:diagnostics line are the visible additions.Summary by CodeRabbit
New Features
Bug Fixes
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.