[PR #215] [MERGED] fix(long-term-memory): retry llama grammar failures #863

Closed
opened 2026-10-20 17:31:44 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/215
Author: @Promansis
Created: 8/3/2026
Status: ✅ Merged
Merged: 8/3/2026
Merged by: @Promansis

Base: staging ← Head: fix/214-llamacpp-grammar-fallback


📝 Commits (2)

  • 7509485 fix(long-term-memory): retry llama grammar failures
  • 836e9c0 test(long-term-memory): strengthen grammar fallback coverage

📊 Changes

9 files changed (+67 additions, -29 deletions)

View changed files

➕ artifacts/long-term-memory-1.1.2.zip (+0 -0)
📝 catalog/catalog.json (+7 -7)
📝 catalog/v2/catalog.json (+7 -7)
📝 catalog/v3/catalog.json (+7 -7)
📝 packages/long-term-memory/manifest.json (+3 -3)
📝 packages/long-term-memory/server.mjs (+1 -1)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-extraction.ts (+6 -3)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-routes.regression.ts (+35 -0)

📄 Description

Pull request

Important

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

Linked issue

Closes #214

Why this change

  • llama.cpp OpenAI-compatible endpoints can reject Long-Term Memory's JSON-schema grammar while initializing samplers. The package previously surfaced that HTTP 400 instead of using its existing non-structured-output fallback.

What changed

  • Classified llama.cpp grammar sampler/parse failures as unsupported response-format errors and retried extraction without responseFormat.
  • Added a Long-Term Memory route regression for the reported error and verified the retry omits responseFormat.
  • Rebuilt long-term-memory@1.1.2: manifest, server payload, archive, and v2/v3/legacy catalog entries.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: no range change; remains >=2.3.5 <4.0.0.
  • New or changed permissions/entrypoints: none.
  • Restart, storage, update, or uninstall impact: normal package update to 1.1.2; no storage or uninstall behavior changes.

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

  • Ran node scripts/build-feature-packages.mjs long-term-memory.
  • Ran node scripts/test-catalog-lanes.mjs, node scripts/validate-catalog.mjs, and git diff --check successfully.
  • Ran long-term-memory-extraction-graph.regression.ts successfully through the Engine server toolchain.
  • The full routes regression currently stops at an earlier existing scope assertion before this new case; live llama.cpp verification remains pending.

Documentation impact

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

UI evidence (if applicable)

  • Not applicable; no UI changes.

Summary by CodeRabbit

  • Bug Fixes

    • Improved structured-response extraction by retrying without response formatting when grammar or sampler initialization fails.
    • Expanded fallback handling for additional response-format errors.
  • Tests

    • Added regression coverage confirming successful retries after one-time grammar initialization failures.
  • Updates

    • Released Long-Term Memory version 1.1.2 with refreshed package metadata and distribution information.

🔄 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/215 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 8/3/2026 **Status:** ✅ Merged **Merged:** 8/3/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix/214-llamacpp-grammar-fallback` --- ### 📝 Commits (2) - [`7509485`](https://github.com/Pasta-Devs/Marinara-Agents/commit/750948573f97b5ebaaf5da9e915eb3db0272ed49) fix(long-term-memory): retry llama grammar failures - [`836e9c0`](https://github.com/Pasta-Devs/Marinara-Agents/commit/836e9c0e9052c3b9054cb42f11df656dff3191f3) test(long-term-memory): strengthen grammar fallback coverage ### 📊 Changes **9 files changed** (+67 additions, -29 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.1.2.zip` (+0 -0) 📝 `catalog/catalog.json` (+7 -7) 📝 `catalog/v2/catalog.json` (+7 -7) 📝 `catalog/v3/catalog.json` (+7 -7) 📝 `packages/long-term-memory/manifest.json` (+3 -3) 📝 `packages/long-term-memory/server.mjs` (+1 -1) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-extraction.ts` (+6 -3) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-routes.regression.ts` (+35 -0) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #214 ## Why this change - llama.cpp OpenAI-compatible endpoints can reject Long-Term Memory's JSON-schema grammar while initializing samplers. The package previously surfaced that HTTP 400 instead of using its existing non-structured-output fallback. ## What changed - Classified llama.cpp grammar sampler/parse failures as unsupported response-format errors and retried extraction without `responseFormat`. - Added a Long-Term Memory route regression for the reported error and verified the retry omits `responseFormat`. - Rebuilt `long-term-memory@1.1.2`: manifest, server payload, archive, and v2/v3/legacy catalog entries. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: no range change; remains `>=2.3.5 <4.0.0`. - New or changed permissions/entrypoints: none. - Restart, storage, update, or uninstall impact: normal package update to `1.1.2`; no storage or uninstall behavior changes. ## Validation - [x] `node scripts/validate-catalog.mjs` passes locally - [x] `git diff --check` passes locally - [x] Rebuilt every affected manifest, payload, artifact, and catalog entry - [x] Installed or updated the affected package through Marinara Engine - [x] Checked supported modes, restart behavior, and uninstall cleanup - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Ran `node scripts/build-feature-packages.mjs long-term-memory`. - Ran `node scripts/test-catalog-lanes.mjs`, `node scripts/validate-catalog.mjs`, and `git diff --check` successfully. - Ran `long-term-memory-extraction-graph.regression.ts` successfully through the Engine server toolchain. - The full routes regression currently stops at an earlier existing scope assertion before this new case; live llama.cpp verification remains pending. ## Documentation impact - [x] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) - Not applicable; no UI changes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved structured-response extraction by retrying without response formatting when grammar or sampler initialization fails. * Expanded fallback handling for additional response-format errors. * **Tests** * Added regression coverage confirming successful retries after one-time grammar initialization failures. * **Updates** * Released Long-Term Memory version 1.1.2 with refreshed package metadata and distribution information. <!-- 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-20 17:31:44 +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#863
No description provided.