[PR #6847] [MERGED] fix(mari): retire old reviews of Mari's own card on load #7352

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6847
Author: @kolacheee
Created: 9/29/2026
Status: ✅ Merged
Merged: 9/29/2026
Merged by: @kolacheee

Base: staging ← Head: fix/mari-legacy-card-reviews


📝 Commits (1)

  • 68e5169 fix(mari): retire old reviews of Mari's own card on load

📊 Changes

3 files changed (+66 additions, -3 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 packages/server/src/services/mari-db/mari-db.service.ts (+29 -2)
📝 scripts/regressions/mari/review-cards.regression.ts (+35 -1)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #6842

Why this change

#6844 scoped new review cards to their chat and stopped Mari editing her own built-in card. The reporter's cards were saved before that, so they name no chat and still show in every Mari chat. Every one of them is an edit to Professor Mari's own card, which startup rewrites, so none can ever be restored. Keep was their only way out.

Their retest ran build a10ee75c5, one commit before #6844 merged as f74c5f138, so it did not include that fix.

What changed

  • MariDbService.ensurePendingHydrated now retires every pending review whose changes all target the __professor_mari__ character row. This happens once, when saved reviews are loaded at startup.
  • A review whose file cannot be retired keeps its card, and Keep then reports why, as #6844 made it do.
  • The over-limit cleanup that follows now counts only the reviews still pending.
  • scripts/regressions/mari/review-cards.regression.ts: builds an old-style review of Mari's card on disk, then starts a fresh service. The review and its file are gone, while an ordinary review stays.
  • CHANGELOG.md: one entry.

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

The boxes are left for a human to tick. What the agent ran:

  • pnpm check: exit 0.
  • node scripts/run-regressions.mjs: 445/445 passed.
  • The new case was mutation-checked: with the retirement removed, it fails with "an old review of Mari's own card is retired on load".
  • Local CodeRabbit (coderabbit review --committed --base-commit <merge-base>): 3 files reviewed, no findings.

Manual verification notes

  • Manually verify on an install that has old "Professor Mari · Edited" cards: update to this build and restart. The cards are gone, and other characters' cards remain.
  • If one stays, press Keep. The toast now names the cause, such as a data folder Marinara cannot write to.

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.md only. The guide already says Mari cannot edit her own card.

UI evidence (if applicable)

Not applicable: the change removes stale cards on load.

Summary by CodeRabbit

  • Bug Fixes
    • Pending review cards containing only edits to Professor Mari’s built-in character card are now cleared when the service starts. These edits cannot be restored.
    • Other pending review cards remain available for review.

🔄 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/6847 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 9/29/2026 **Status:** ✅ Merged **Merged:** 9/29/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `fix/mari-legacy-card-reviews` --- ### 📝 Commits (1) - [`68e5169`](https://github.com/Pasta-Devs/Marinara-Engine/commit/68e5169c3819d2ca93d986cecafc99187f8287bd) fix(mari): retire old reviews of Mari's own card on load ### 📊 Changes **3 files changed** (+66 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `packages/server/src/services/mari-db/mari-db.service.ts` (+29 -2) 📝 `scripts/regressions/mari/review-cards.regression.ts` (+35 -1) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #6842 ## Why this change #6844 scoped new review cards to their chat and stopped Mari editing her own built-in card. The reporter's cards were saved before that, so they name no chat and still show in every Mari chat. Every one of them is an edit to Professor Mari's own card, which startup rewrites, so none can ever be restored. Keep was their only way out. Their retest ran build `a10ee75c5`, one commit before #6844 merged as `f74c5f138`, so it did not include that fix. ## What changed - `MariDbService.ensurePendingHydrated` now retires every pending review whose changes all target the `__professor_mari__` character row. This happens once, when saved reviews are loaded at startup. - A review whose file cannot be retired keeps its card, and Keep then reports why, as #6844 made it do. - The over-limit cleanup that follows now counts only the reviews still pending. - `scripts/regressions/mari/review-cards.regression.ts`: builds an old-style review of Mari's card on disk, then starts a fresh service. The review and its file are gone, while an ordinary review stays. - `CHANGELOG.md`: one entry. ## 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` The boxes are left for a human to tick. What the agent ran: - `pnpm check`: exit 0. - `node scripts/run-regressions.mjs`: 445/445 passed. - The new case was mutation-checked: with the retirement removed, it fails with "an old review of Mari's own card is retired on load". - Local CodeRabbit (`coderabbit review --committed --base-commit <merge-base>`): 3 files reviewed, no findings. ### Manual verification notes - Manually verify on an install that has old "Professor Mari · Edited" cards: update to this build and restart. The cards are gone, and other characters' cards remain. - If one stays, press **Keep**. The toast now names the cause, such as a data folder Marinara cannot write to. ## 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.md` only. The guide already says Mari cannot edit her own card. ## UI evidence (if applicable) Not applicable: the change removes stale cards on load. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Pending review cards containing only edits to Professor Mari’s built-in character card are now cleared when the service starts. These edits cannot be restored. * Other pending review cards remain available for review. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:18:55 +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#7352
No description provided.