[PR #1884] [MERGED] fix(long-term-memory): read quoted scores and fail all-malformed pieces (1.5.11) #2014

Closed
opened 2026-11-07 16:38:45 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1884
Author: @Promansis
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @Promansis

Base: staging ← Head: fix(long-term-memory)/quoted-score-drops-piece


📝 Commits (3)

  • 6bbd14f fix(long-term-memory): read quoted scores and fail all-malformed pieces (#1881)
  • c78f1e1 chore(long-term-memory): release 1.5.11 (#1881)
  • d726bde Merge branch 'staging' into fix(long-term-memory)/quoted-score-drops-piece

📊 Changes

13 files changed (+152 additions, -84 deletions)

View changed files

➕ artifacts/long-term-memory-1.5.11.zip (+0 -0)
📝 catalog/catalog.json (+6 -6)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+6 -6)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+6 -6)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/long-term-memory/CHANGELOG.md (+4 -0)
📝 packages/long-term-memory/manifest.json (+3 -3)
📝 packages/long-term-memory/server.mjs (+38 -38)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/extraction/evidence-unit-extraction.ts (+21 -3)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-extraction-reliability.regression.ts (+49 -3)

📄 Description

Pull request

Linked issue

Closes #1881

Why this change

  • When the extraction model writes a memory's salience or confidence as quoted text ("0.5"), Long-Term Memory rejected that memory as malformed. Once a model starts quoting, it tends to do it on every memory, so the whole chat piece was lost.
  • That piece still reported succeeded with nothing kept, so the player never learned part of the chat was skipped and nothing offered a retry. Seen on 2026-10-29 in 1 of 124 extraction calls in a whole-chat measurement run.

What changed

  • evidence-unit-extraction.ts: ltmProviderEvidenceUnitSchema now reads a trimmed numeric string for confidence and salience as that number, then applies the existing 0-1 check. "", null and text such as "high" still fail. The stored-unit schema in notes.ts and the JSON schema sent to the model are unchanged.
  • A complete answer whose candidates were all dropped as malformed now throws the existing retryable ltm_model_output_unusable error instead of succeeding. An answer with no candidates (units: []) still succeeds.
  • tests/long-term-memory-extraction-reliability.regression.ts: quoted scores are kept; "high", "", "1.5" and null are still dropped for both fields; an all-malformed answer throws without a repair call; units: [] succeeds; one valid plus one malformed unit keeps the valid one.
  • Release 1.5.11: CHANGELOG, version, rebuilt server.mjs, manifest, archive and catalog entries (v2, v3 and the legacy alias) for long-term-memory only.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none; engine.min / engine.maxExclusive unchanged.
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: none. No stored format changes; a piece that was dropped before can now be retried.

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

Documentation impact

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

UI evidence (if applicable)

No UI change: a failed piece uses the existing Retry.

🤖 Generated with Claude Code


🔄 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/1884 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/quoted-score-drops-piece` --- ### 📝 Commits (3) - [`6bbd14f`](https://github.com/Pasta-Devs/Marinara-Agents/commit/6bbd14f22a05aef65976dcb05c11354c981e0856) fix(long-term-memory): read quoted scores and fail all-malformed pieces (#1881) - [`c78f1e1`](https://github.com/Pasta-Devs/Marinara-Agents/commit/c78f1e15b14d0e24e8f1867c1509114af4adeb8d) chore(long-term-memory): release 1.5.11 (#1881) - [`d726bde`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d726bdec8105856f8db974bb81fbd1db7e3bbb0d) Merge branch 'staging' into fix(long-term-memory)/quoted-score-drops-piece ### 📊 Changes **13 files changed** (+152 additions, -84 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.5.11.zip` (+0 -0) 📝 `catalog/catalog.json` (+6 -6) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+6 -6) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+6 -6) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/long-term-memory/CHANGELOG.md` (+4 -0) 📝 `packages/long-term-memory/manifest.json` (+3 -3) 📝 `packages/long-term-memory/server.mjs` (+38 -38) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/extraction/evidence-unit-extraction.ts` (+21 -3) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-extraction-reliability.regression.ts` (+49 -3) </details> ### 📄 Description # Pull request ## Linked issue Closes #1881 ## Why this change - When the extraction model writes a memory's `salience` or `confidence` as quoted text (`"0.5"`), Long-Term Memory rejected that memory as malformed. Once a model starts quoting, it tends to do it on every memory, so the whole chat piece was lost. - That piece still reported `succeeded` with nothing kept, so the player never learned part of the chat was skipped and nothing offered a retry. Seen on 2026-10-29 in 1 of 124 extraction calls in a whole-chat measurement run. ## What changed - `evidence-unit-extraction.ts`: `ltmProviderEvidenceUnitSchema` now reads a trimmed numeric string for `confidence` and `salience` as that number, then applies the existing 0-1 check. `""`, `null` and text such as `"high"` still fail. The stored-unit schema in `notes.ts` and the JSON schema sent to the model are unchanged. - A complete answer whose candidates were all dropped as malformed now throws the existing retryable `ltm_model_output_unusable` error instead of succeeding. An answer with no candidates (`units: []`) still succeeds. - `tests/long-term-memory-extraction-reliability.regression.ts`: quoted scores are kept; `"high"`, `""`, `"1.5"` and `null` are still dropped for both fields; an all-malformed answer throws without a repair call; `units: []` succeeds; one valid plus one malformed unit keeps the valid one. - Release 1.5.11: CHANGELOG, version, rebuilt `server.mjs`, manifest, archive and catalog entries (v2, v3 and the legacy alias) for `long-term-memory` only. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none; `engine.min` / `engine.maxExclusive` unchanged. - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: none. No stored format changes; a piece that was dropped before can now be retried. ## 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 - ## Documentation impact - [x] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) No UI change: a failed piece uses the existing Retry. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:38:45 +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#2014
No description provided.