[PR #7140] [MERGED] fix(mari): clear stale request errors on retry #7497

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7140
Author: @SpicyMarinara
Created: 10/5/2026
Status: ✅ Merged
Merged: 10/5/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/professor-mari-recovery-7126


📝 Commits (4)

  • 7b4ea71 docs: track Professor Mari error recovery fix
  • 2f8cd84 fix(mari): clear stale request errors when retrying
  • e135c7b Merge remote-tracking branch 'origin/staging' into fix/professor-mari-recovery-7126
  • 73d07f7 Merge branch 'staging' into fix/professor-mari-recovery-7126

📊 Changes

3 files changed (+122 additions, -0 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 packages/server/src/services/professor-mari/workspace-agent.service.ts (+1 -0)
➕ scripts/regressions/mari-error-recovery.regression.ts (+119 -0)

📄 Description

Linked issue

Closes #7126

Why this change

Professor Mari saved a failed provider request in the workspace status but only cleared it on reset. A successful later reply therefore kept showing the old error, including the reported GLM 5.3 reasoning error, until the server restarted.

What changed

Clear the previous error when a validated new Professor Mari request starts. Newly occurring failures remain visible; rejected preflight, cancellation and superseded requests retain their existing behavior. Provider reasoning settings are unchanged.

Validation

Validated local head e135c7b74e34dc4a3d6a10574c3e23cc09b78604:

  • pnpm install and pnpm check passed.
  • The new mari-error-recovery regression failed before the one-line fix with the exact stale GLM error and passed afterward. It covers retry-in-progress, successful response persistence, new failures, rejected preflight, cancellation and late superseded errors.
  • Existing mari-completion-frames and mari-background-stream regressions passed.
  • All seven desktop @smoke cases passed across focused runs.
  • Real-server browser recovery proof passed after staging integration: a controlled OpenAI-compatible endpoint returned the reported HTTP 400, then a UI retry produced a successful reply and removed the stale error without a server restart.
  • Docker built and ran. Health, frontend and multiplayer guest assets returned HTTP 200; production startup/reload passed in desktop Chromium, mobile Chromium and mobile WebKit (3/3).
  • Local CodeRabbit completed with zero findings; independent source and integration review found no issues.

Manual verification notes

  • Manually verify recovery after correcting your actual GLM endpoint or connection settings. Automated proof used a controlled upstream, not a live GLM account.

Docs and release impact

Unreleased changelog entry. No version, storage, provider-parameter or installation changes.

UI evidence

Error and recovery browser proof · Evidence source

Summary by CodeRabbit

  • Bug Fixes
    • Professor Mari now clears an earlier request error when a valid retry starts, including after a successful response. Errors from superseded requests no longer replace the status of the current request.

🔄 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/7140 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/5/2026 **Status:** ✅ Merged **Merged:** 10/5/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/professor-mari-recovery-7126` --- ### 📝 Commits (4) - [`7b4ea71`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7b4ea715ec9bc579ed52d2d01c35580e047cc39b) docs: track Professor Mari error recovery fix - [`2f8cd84`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2f8cd842355d60eefd1aa7b3bd5ede1515cb2a62) fix(mari): clear stale request errors when retrying - [`e135c7b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e135c7b74e34dc4a3d6a10574c3e23cc09b78604) Merge remote-tracking branch 'origin/staging' into fix/professor-mari-recovery-7126 - [`73d07f7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/73d07f7f60fcc39602f31bbeef8294c99887c20b) Merge branch 'staging' into fix/professor-mari-recovery-7126 ### 📊 Changes **3 files changed** (+122 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `packages/server/src/services/professor-mari/workspace-agent.service.ts` (+1 -0) ➕ `scripts/regressions/mari-error-recovery.regression.ts` (+119 -0) </details> ### 📄 Description ## Linked issue Closes #7126 ## Why this change Professor Mari saved a failed provider request in the workspace status but only cleared it on reset. A successful later reply therefore kept showing the old error, including the reported GLM 5.3 reasoning error, until the server restarted. ## What changed Clear the previous error when a validated new Professor Mari request starts. Newly occurring failures remain visible; rejected preflight, cancellation and superseded requests retain their existing behavior. Provider reasoning settings are unchanged. ## Validation Validated local head `e135c7b74e34dc4a3d6a10574c3e23cc09b78604`: - `pnpm install` and `pnpm check` passed. - The new `mari-error-recovery` regression failed before the one-line fix with the exact stale GLM error and passed afterward. It covers retry-in-progress, successful response persistence, new failures, rejected preflight, cancellation and late superseded errors. - Existing `mari-completion-frames` and `mari-background-stream` regressions passed. - All seven desktop `@smoke` cases passed across focused runs. - Real-server browser recovery proof passed after staging integration: a controlled OpenAI-compatible endpoint returned the reported HTTP 400, then a UI retry produced a successful reply and removed the stale error without a server restart. - Docker built and ran. Health, frontend and multiplayer guest assets returned HTTP 200; production startup/reload passed in desktop Chromium, mobile Chromium and mobile WebKit (3/3). - Local CodeRabbit completed with zero findings; independent source and integration review found no issues. ### Manual verification notes - [ ] Manually verify recovery after correcting your actual GLM endpoint or connection settings. Automated proof used a controlled upstream, not a live GLM account. ## Docs and release impact Unreleased changelog entry. No version, storage, provider-parameter or installation changes. ## UI evidence [Error and recovery browser proof](https://gist.githack.com/SpicyMarinara/81de9f8afc0da97ff0d94a70f1b7a39d/raw/0c0b2ad0dea8582c7619256b237756da8b0409db/gallery.html) · [Evidence source](https://gist.github.com/SpicyMarinara/81de9f8afc0da97ff0d94a70f1b7a39d) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Professor Mari now clears an earlier request error when a valid retry starts, including after a successful response. Errors from superseded requests no longer replace the status of the current request. <!-- 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:20:22 +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#7497
No description provided.