[PR #938] [MERGED] fix(ltm): harden provider fallbacks and output viability #1201

Closed
opened 2026-10-21 05:05:23 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/938
Author: @Promansis
Created: 9/19/2026
Status: ✅ Merged
Merged: 9/19/2026
Merged by: @Promansis

Base: staging ← Head: feature/ltm-provider-fallback-viability


📝 Commits (3)

  • 5ad7d22 fix(ltm): harden provider fallbacks and output viability
  • 8d37ef1 Merge remote-tracking branch 'upstream/staging' into feature/ltm-provider-fallback-viability
  • 5baa2f9 fix(ltm): tighten provider fallback diagnostics

📊 Changes

3 files changed (+226 additions, -17 deletions)

View changed files

📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-extraction.ts (+120 -17)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/package-runtime.ts (+8 -0)
📝 tests/long-term-memory-extraction-reliability.regression.ts (+98 -0)

📄 Description

Linked issue

Closes #935

Why this change

Long-Term Memory extraction needed independently bounded provider compatibility fallbacks and a fail-fast output viability floor for fitted model budgets.

What changed

  • Long-term-memory server extraction fallback handling
  • Structured provider error classification and terminal quota handling
  • Preflight output viability diagnostics and synthetic regression coverage

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: Uses existing package runtime language-model contract; no manifest or Engine API changes.
  • New or changed permissions/entrypoints: None
  • Restart, storage, update, or uninstall impact: None

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Focused extraction reliability regression passed.
  • Source task regression passed.
  • npm run check passed with existing lint warnings and no errors.
  • Package typecheck, security, catalog, locale, lane, release-note, and whitespace checks passed.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

UI evidence (if applicable)

Not applicable.

Summary by CodeRabbit

  • Bug Fixes

    • Improved long-term memory extraction reliability when providers reject unsupported options.
    • Prevented unnecessary fallback attempts for unrelated provider errors, including authentication, quota, rate-limit, timeout, and service availability failures.
    • Added validation to stop extraction early when available context cannot support a viable response.
    • Improved error reporting for language model failures and insufficient output budgets.
  • Tests

    • Added regression coverage for provider failures, fallback behavior, and budget validation.

🔄 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-Agents/pull/938 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/19/2026 **Status:** ✅ Merged **Merged:** 9/19/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `feature/ltm-provider-fallback-viability` --- ### 📝 Commits (3) - [`5ad7d22`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5ad7d22093f02f5626fed5357da276e1f0aae6af) fix(ltm): harden provider fallbacks and output viability - [`8d37ef1`](https://github.com/Pasta-Devs/Marinara-Agents/commit/8d37ef180706f2ebc2b9111c36b608a7ca1279a0) Merge remote-tracking branch 'upstream/staging' into feature/ltm-provider-fallback-viability - [`5baa2f9`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5baa2f98160fc840ab0af3b23e6862a0ef13f272) fix(ltm): tighten provider fallback diagnostics ### 📊 Changes **3 files changed** (+226 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-extraction.ts` (+120 -17) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/package-runtime.ts` (+8 -0) 📝 `tests/long-term-memory-extraction-reliability.regression.ts` (+98 -0) </details> ### 📄 Description ## Linked issue Closes #935 ## Why this change Long-Term Memory extraction needed independently bounded provider compatibility fallbacks and a fail-fast output viability floor for fitted model budgets. ## What changed - Long-term-memory server extraction fallback handling - Structured provider error classification and terminal quota handling - Preflight output viability diagnostics and synthetic regression coverage ## Package and security impact - Affected package IDs: long-term-memory - Engine compatibility impact: Uses existing package runtime language-model contract; no manifest or Engine API changes. - New or changed permissions/entrypoints: None - Restart, storage, update, or uninstall impact: None ## Validation - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Focused extraction reliability regression passed. - Source task regression passed. - `npm run check` passed with existing lint warnings and no errors. - Package typecheck, security, catalog, locale, lane, release-note, and whitespace checks passed. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) Not applicable. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved long-term memory extraction reliability when providers reject unsupported options. * Prevented unnecessary fallback attempts for unrelated provider errors, including authentication, quota, rate-limit, timeout, and service availability failures. * Added validation to stop extraction early when available context cannot support a viable response. * Improved error reporting for language model failures and insufficient output budgets. * **Tests** * Added regression coverage for provider failures, fallback behavior, and budget validation. <!-- 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-21 05:05:23 +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-Agents#1201
No description provided.