[PR #4838] [MERGED] fix(server): key Professor Mari's read-only guardrail on intent, not grammar (#4813 follow-up) #6511

Closed
opened 2026-10-23 04:11:08 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4838
Author: @kolacheee
Created: 8/10/2026
Status: ✅ Merged
Merged: 8/10/2026
Merged by: @kolacheee

Base: staging ← Head: fix/4813-mari-howto-guardrail


📝 Commits (1)

  • 64a7d0a fix(server): keep Professor Mari from acting on "how do I" questions (#4813)

📊 Changes

2 files changed (+7 additions, -2 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/server/src/services/professor-mari/workspace-agent.service.ts (+6 -2)

📄 Description

Linked issue

Follow-up to #4816 (the read-only guardrail that resolved #4813) after a user report that Mari still performed a change when asked only how to make it — see #4813 for the original report and reproduction. #4813 is closed; maintainers may prefer to reopen it or open a fresh tracking issue for this residual behavior — happy to do either.

Why this change

When a user asked "How do I make my character Gundorfson have the appearance of 'willy funny little guy'?", Professor Mari set the appearance instead of answering. That is the exact class of over-eager mutation #4816 set out to stop: a "how do I…" question asks for the method, not for Mari to perform the change — even when the question names the desired end state.

The #4816 guardrail was live but too weak against that "how do I make X have Y" phrasing, where the imperative verb ("make"/"set") is the goal the user is asking how to reach, not an instruction to act now.

A prior review of the first cut of this fix flagged the opposite risk: wording that ended "an explicit instruction … not a question" would make Mari under-act on genuinely polite requests phrased as questions ("Can you set X to Y?"). This PR keys the distinction on intent, not grammar, so both directions are correct.

What changed

  • Rewrote the "Default to read-only" guardrail so a "how do I… / how can I… / is it possible to…" question is answered (or offered), never performed — even when it names the change as its goal.
  • Re-keyed the act / don't-act distinction on intent rather than sentence form: a message that tells Mari to make the named change is an instruction and is carried out — including a polite question form ("can you set X to Y", "could you change X to Y") — while a request for the method is answered. Guarded against stalling on a plainly-worded request just because it ends in a question mark.
  • Added two contrasting worked examples in the prompt: the how-to case (answer + offer, no change) and the direct-request case (a character.update with apply:true, which Marinara saves behind its in-chat Keep/Restore review).
  • CHANGELOG updated.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

This change is prompt-only (Professor Mari's system prompt) and cannot be exercised by an automated regression — it is a model-behavior change. pnpm check and the professor-mari-prompt-context regression pass locally, but the behavior needs a manual pass against a live model:

  • Manually verify in the app: ask Mari "How do I make Gundorfson's appearance 'willy funny little guy'?" → she should explain the steps and offer, making no change.
  • Manually verify in the app: ask Mari "Can you set Gundorfson's appearance to 'willy funny little guy'?" → she should make the change and surface the Keep/Restore card, not merely offer.
  • Manually verify in the app: a bare imperative "Set Gundorfson's appearance to X" → still acts, as before (no regression).

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

CHANGELOG updated; no other docs affected (prompt-only, no user-facing doc surface changes).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/4838 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 8/10/2026 **Status:** ✅ Merged **Merged:** 8/10/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `fix/4813-mari-howto-guardrail` --- ### 📝 Commits (1) - [`64a7d0a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/64a7d0aae08049e8da7a41997820b82f6feb315e) fix(server): keep Professor Mari from acting on "how do I" questions (#4813) ### 📊 Changes **2 files changed** (+7 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/server/src/services/professor-mari/workspace-agent.service.ts` (+6 -2) </details> ### 📄 Description ## Linked issue Follow-up to #4816 (the read-only guardrail that resolved #4813) after a user report that Mari still *performed* a change when asked only **how** to make it — see #4813 for the original report and reproduction. #4813 is closed; maintainers may prefer to reopen it or open a fresh tracking issue for this residual behavior — happy to do either. ## Why this change When a user asked **"How do I make my character Gundorfson have the appearance of 'willy funny little guy'?"**, Professor Mari *set* the appearance instead of answering. That is the exact class of over-eager mutation #4816 set out to stop: a "how do I…" question asks for the **method**, not for Mari to perform the change — even when the question names the desired end state. The #4816 guardrail was live but too weak against that "how do I make X have Y" phrasing, where the imperative verb ("make"/"set") is the *goal the user is asking how to reach*, not an instruction to act now. A prior review of the first cut of this fix flagged the opposite risk: wording that ended "an explicit instruction … not a question" would make Mari **under**-act on genuinely polite requests phrased as questions ("Can you set X to Y?"). This PR keys the distinction on **intent, not grammar**, so both directions are correct. ## What changed - Rewrote the "Default to read-only" guardrail so a **"how do I… / how can I… / is it possible to…"** question is answered (or offered), never performed — even when it names the change as its goal. - Re-keyed the act / don't-act distinction on **intent rather than sentence form**: a message that tells Mari to make the named change is an instruction and is carried out — **including a polite question form** ("can you set X to Y", "could you change X to Y") — while a request for the *method* is answered. Guarded against stalling on a plainly-worded request just because it ends in a question mark. - Added two contrasting worked examples in the prompt: the how-to case (answer + offer, **no** change) and the direct-request case (a `character.update` with `apply:true`, which Marinara saves behind its in-chat Keep/Restore review). - CHANGELOG updated. ## Validation - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes This change is **prompt-only** (Professor Mari's system prompt) and cannot be exercised by an automated regression — it is a model-behavior change. `pnpm check` and the `professor-mari-prompt-context` regression pass locally, but the behavior needs a manual pass against a live model: - **Manually verify in the app:** ask Mari *"How do I make Gundorfson's appearance 'willy funny little guy'?"* → she should **explain the steps and offer**, making **no** change. - **Manually verify in the app:** ask Mari *"Can you set Gundorfson's appearance to 'willy funny little guy'?"* → she should **make the change** and surface the Keep/Restore card, not merely offer. - **Manually verify in the app:** a bare imperative *"Set Gundorfson's appearance to X"* → still acts, as before (no regression). ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) CHANGELOG updated; no other docs affected (prompt-only, no user-facing doc surface changes). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:11:08 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6511
No description provided.