mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6844] [MERGED] fix(mari): review cards belong to their chat, and none get stuck #7353
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#7353
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/6844
Author: @kolacheee
Created: 9/29/2026
Status: ✅ Merged
Merged: 9/29/2026
Merged by: @kolacheee
Base:
staging← Head:fix/mari-review-cards📝 Commits (2)
d9f250cfix(mari): review cards belong to their chat, and none get stuck87045baMerge remote-tracking branch 'origin/staging' into fix/mari-review-cards📊 Changes
8 files changed (+392 additions, -11 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
docs/home/professor-mari.md(+6 -2)📝
packages/server/src/routes/chats.routes.ts(+3 -0)📝
packages/server/src/routes/professor-mari-workspace.routes.ts(+33 -2)📝
packages/server/src/services/mari-db/mari-db.service.ts(+73 -2)➕
packages/server/src/services/professor-mari/mari-session.ts(+27 -0)📝
packages/server/src/services/professor-mari/workspace-agent.service.ts(+19 -5)➕
scripts/regressions/mari/review-cards.regression.ts(+229 -0)📄 Description
Linked issue
Closes #6842
Why this change
A user on 2.4.6 worked with Professor Mari on character cards. Afterwards, "Review Mari's changes" cards stayed on screen for good: deleting the chat, deleting every Mari chat and starting a new one did not clear them. Their cards all read "Professor Mari · Edited · No field changes to show." Reproduced on staging, four causes combined:
What changed
mari-session.tsgives each Mari chat's run its own session id,professor-mari-workspace:<chatId>. Mari's app actions, her direct CLI calls and her shell'smaricommands all carry it.mariCLI in a terminal, and reviews from before this change.MariDbService.keepReviewsForChat. The changes stay applied and the cards go.planMutationfloor refuses any change to the__professor_mari__character row. It coverscharacter.update, rawmari db patchanddelete, and transforms, like the existing Permissions Mode floor.updatedAt,executeMutationreturns without writing. A null field and a missing field count as equal, since a replace row omits null columns such asembedding. Mari reads "No changes: every row already has these values…".reviewActionFailure(). A data folder Marinara cannot write to reads as "Marinara could not update this review's saved file (EACCES), so the card stays. Check that Marinara can write to its data folder."docs/home/professor-mari.mdgains the new rules. It also no longer claims that a card expires after 10 minutes (reviews are kept up to 14 days) or that new items skip the card.scripts/regressions/mari/review-cards.regression.ts, and oneCHANGELOG.mdentry.Validation
pnpm checkpasses locallyCONTRIBUTING.mdThe boxes are left for a human to tick. What the agent ran:
pnpm check: exit 0.node scripts/run-regressions.mjs: 444/444 passed.MariDbServiceon a file-native store:character.updateor raw patch writes nothing and makes no card, while a real change still does.keepReviewsForChatkeeps only that chat's review, with the change still applied.open-issuespass.coderabbit review --committed --base-commit <merge-base>): 8 files reviewed, no findings.Manual verification notes
Clicked through on a scratch install of this branch (not the live install). The reviews came from the
mariCLI, some with a chat's session id:Needs manual verification:
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)docs/home/professor-mari.mdandCHANGELOG.mdchanged. Translation follow-up: #6843.UI evidence (if applicable)
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.