mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #5727] [MERGED] fix(mari): one confirmation per edit — remove the post-#4838 authorization gate; surface plans on local custom connections #6905
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#6905
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/5727
Author: @kolacheee
Created: 9/1/2026
Status: ✅ Merged
Merged: 9/1/2026
Merged by: @kolacheee
Base:
staging← Head:fix/5721-mari-reasoning-and-edit-flow📝 Commits (3)
aef524bfix(mari): remove the post-#4838 authorization gate; disable hidden reasoning on custom providers (#5721)5b6725dfix(mari): scope the reasoning disable to local endpoints; retire the gate's e2e suite (#5721 review round)caa1048Merge branch 'staging' into fix/5721-mari-reasoning-and-edit-flow📊 Changes
9 files changed (+164 additions, -936 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
e2e/core-flows.e2e.ts(+0 -87)📝
packages/server/src/middleware/ip-allowlist.ts(+19 -0)📝
packages/server/src/services/llm/providers/openai.provider.ts(+2 -11)📝
packages/server/src/services/professor-mari/workspace-agent.service.ts(+32 -397)📝
packages/shared/src/types/chat.ts(+0 -4)📝
scripts/regressions/issue-sweep-5380-5434.regression.ts(+4 -52)➕
scripts/regressions/mari-edit-flow-revert.regression.ts(+87 -0)📝
scripts/regressions/prompt.regression.ts(+18 -385)📄 Description
Linked issue
Closes #5721.
Why this change
Two Professor Mari problems from the same user report, both diagnosed in the issue. Problem B: the server-side authorization gate added after #4838 required every mutating command to quote a verbatim excerpt of the user's message that explicitly named the change. Intent-phrased requests ("rework her personality to be more cynical") failed it, so Mari's first, correct attempt was discarded with "Mutation blocked before execution", the user had to type an approval, and Mari regenerated the identical edit — which then passed through the Keep/Restore review card, a second confirmation. Two generations and two confirmations for one edit, with the first generation's tokens wasted. The gate was an overcorrection driven by complaints from users who didn't realize their own words implied a change request; with the memory system shipped (#4851), per-user preference is the right lever, not a blanket gate. Problem A: on custom connections with reasoning enabled, Mari's brainstorming plans and questions stayed inside the model's hidden reasoning — the
disableHiddenReasoningguard that protects her JSON protocol deliberately excluded custom providers, which is exactly the reporter's local-Unsloth setup.What changed
workspaceMutationAuthorizationIssuevalidator, its intent-regex battery, the JSONauthorizationfield (prompt schema, rule, examples, parsing, echo), the approval-fingerprint message extras, and all threading. An intent-authorized edit now lands directly in the existing Keep/Restore review card: one generation, one confirmation. Kept deliberately: #4838's intent-not-grammar prompt guidance (the behavioral contract), Mari's own ask-first deferral (awaitingAuthorization+ the Accept chips, including the output-limit continuation), and ordinary command validation.isLocalInferenceBaseUrlhelper extracted fromOpenAIProvider.isLocalInferenceEndpoint. Scoped to local deliberately: for generic custom providers the provider layer sendsreasoning_effort: "none"ungated, and strict remote gateways 400 on it — so remote custom connections keep the previous send-nothing behavior. A local endpoint that still chokes can opt out by disabling the reasoning-effort parameter on the connection.prompt.regression's gate suite is replaced with parse-tolerance pins (a model still emitting the retiredauthorizationfield parses harmlessly;awaitingAuthorizationstill round-trips); the orphaned gate e2e test is deleted (its premise is exactly what this PR removes) and two now-vacuous negative assertions in sibling tests are trimmed (their real assertions stay — they now double as parse-tolerance e2e coverage); the #5435 sweep pin of the old carve-out is updated; and a newmari-edit-flow-revertregression pins the full contract.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm lint, the server and client production builds, 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-edit-flow-revert(new),prompt.regression, andissue-sweep-5380-5434all pass; the new regression was differentially verified to FAIL against the pre-change tree.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] → Fixed (two entries). No user-facing docs under
docs/touched.UI evidence (if applicable)
Behavioral change only — the visible difference is the absence of the "Mutation blocked" round-trip and Mari's plans appearing in her reply on local custom connections.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.