[PR #961] [MERGED] fix(ltm): recover bounded candidates from truncated output #1211

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

📋 Pull Request Information

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

Base: staging ← Head: fix(ltm)/bounded-candidate-recovery


📝 Commits (3)

  • 28f5d1d fix(ltm): recover bounded candidates from truncated output (#946)
  • 0e19a68 fix(ltm): reuse incomplete batch status check (#946)
  • db4077f Merge branch 'staging' into fix(ltm)/bounded-candidate-recovery

📊 Changes

23 files changed (+663 additions, -254 deletions)

View changed files

➕ artifacts/long-term-memory-1.3.5.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -0)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -0)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -0)
📝 packages/long-term-memory/CHANGELOG.md (+7 -0)
📝 packages/long-term-memory/client.js (+17 -17)
📝 packages/long-term-memory/manifest.json (+5 -5)
📝 packages/long-term-memory/server.mjs (+58 -58)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/SourcesWorkspace.tsx (+14 -3)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json (+1 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/draft-store.ts (+1 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-extraction.ts (+224 -59)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-validation.ts (+4 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/interop.ts (+5 -3)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-processing.ts (+4 -2)
📝 packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts (+23 -11)
📝 scripts/build-feature-packages.mjs (+1 -1)

...and 3 more files

📄 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 #946

Why this change

  • Token-limited LTM extraction responses previously discarded otherwise valid candidates or treated truncated output as a hard failure. This change preserves the complete prefix as a retryable draft without treating incomplete extraction as current.

What changed

  • Updated long-term-memory to 1.3.5 with bounded recovery for length, max_tokens, and token_limit responses.
  • Provider schemas now omit server-owned identity/provenance fields; the server regenerates IDs, source hashes, and default evidence from the trusted source note.
  • Candidate overflow is retained as bounded diagnostics, persisted diagnostics are capped at 500, and incomplete drafts cannot auto-apply mutations or mark sources current.
  • Added extraction, route, schema, UI, lifecycle, artifact, manifest, changelog, and catalog regression coverage. Rebuilt client.js, server.mjs, the 1.3.5 artifact, and catalog sidecars.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: unchanged (>=2.4.1, current catalog lane routing)
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: package artifact rebuilt; installation, restart, backup, uninstall, and reinstall lifecycle checks passed

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 /home/damo/.config/opencode/marinara-agents-local/test-ltm.sh all with LIBGL_ALWAYS_SOFTWARE=1: passed.
  • Ran /home/damo/.config/opencode/marinara-agents-local/test-ci.sh, npm run check, catalog-lane, locale, catalog, release-note, and whitespace validation: passed.
  • Ran installation, offline restart, backup, uninstall, and reinstall lifecycle checks: passed.
  • Publication proof matched tested repository and Engine snapshots for commit 28f5d1dc0b145bb98f759a2236af19f3ca874ed6.

Documentation impact

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

UI evidence (if applicable)

  • Updated the LTM source workspace labels for incomplete and retryable extraction results; UI regression checks passed.

Summary by CodeRabbit

  • New Features

    • Recovers usable memory candidates from token-limited responses.
    • Presents incomplete extractions as retryable drafts without marking them current.
    • Reports candidates exceeding processing limits while retaining supported candidates.
    • Applies trusted source evidence automatically and generates memory identifiers and source hashes server-side.
    • Displays clear incomplete and retry-available statuses in the sources workspace.
  • Documentation

    • Updated the package to version 1.3.5 with corresponding release notes.

🔄 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/961 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/20/2026 **Status:** ✅ Merged **Merged:** 9/20/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(ltm)/bounded-candidate-recovery` --- ### 📝 Commits (3) - [`28f5d1d`](https://github.com/Pasta-Devs/Marinara-Agents/commit/28f5d1dc0b145bb98f759a2236af19f3ca874ed6) fix(ltm): recover bounded candidates from truncated output (#946) - [`0e19a68`](https://github.com/Pasta-Devs/Marinara-Agents/commit/0e19a68011c39b78e99d2e5dcb1248ee9bbe209c) fix(ltm): reuse incomplete batch status check (#946) - [`db4077f`](https://github.com/Pasta-Devs/Marinara-Agents/commit/db4077f1ae2692e445d0a2a7883307f3829c16f9) Merge branch 'staging' into fix(ltm)/bounded-candidate-recovery ### 📊 Changes **23 files changed** (+663 additions, -254 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.3.5.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -0) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -0) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -0) 📝 `packages/long-term-memory/CHANGELOG.md` (+7 -0) 📝 `packages/long-term-memory/client.js` (+17 -17) 📝 `packages/long-term-memory/manifest.json` (+5 -5) 📝 `packages/long-term-memory/server.mjs` (+58 -58) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/SourcesWorkspace.tsx` (+14 -3) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json` (+1 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/draft-store.ts` (+1 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-extraction.ts` (+224 -59) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-validation.ts` (+4 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/interop.ts` (+5 -3) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-processing.ts` (+4 -2) 📝 `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts` (+23 -11) 📝 `scripts/build-feature-packages.mjs` (+1 -1) _...and 3 more files_ </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 #946 ## Why this change - Token-limited LTM extraction responses previously discarded otherwise valid candidates or treated truncated output as a hard failure. This change preserves the complete prefix as a retryable draft without treating incomplete extraction as current. ## What changed - Updated `long-term-memory` to 1.3.5 with bounded recovery for `length`, `max_tokens`, and `token_limit` responses. - Provider schemas now omit server-owned identity/provenance fields; the server regenerates IDs, source hashes, and default evidence from the trusted source note. - Candidate overflow is retained as bounded diagnostics, persisted diagnostics are capped at 500, and incomplete drafts cannot auto-apply mutations or mark sources current. - Added extraction, route, schema, UI, lifecycle, artifact, manifest, changelog, and catalog regression coverage. Rebuilt `client.js`, `server.mjs`, the 1.3.5 artifact, and catalog sidecars. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: unchanged (`>=2.4.1`, current catalog lane routing) - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: package artifact rebuilt; installation, restart, backup, uninstall, and reinstall lifecycle checks passed ## 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 `/home/damo/.config/opencode/marinara-agents-local/test-ltm.sh all` with `LIBGL_ALWAYS_SOFTWARE=1`: passed. - Ran `/home/damo/.config/opencode/marinara-agents-local/test-ci.sh`, `npm run check`, catalog-lane, locale, catalog, release-note, and whitespace validation: passed. - Ran installation, offline restart, backup, uninstall, and reinstall lifecycle checks: passed. - Publication proof matched tested repository and Engine snapshots for commit `28f5d1dc0b145bb98f759a2236af19f3ca874ed6`. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) - Updated the LTM source workspace labels for incomplete and retryable extraction results; UI regression checks passed. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Recovers usable memory candidates from token-limited responses. - Presents incomplete extractions as retryable drafts without marking them current. - Reports candidates exceeding processing limits while retaining supported candidates. - Applies trusted source evidence automatically and generates memory identifiers and source hashes server-side. - Displays clear incomplete and retry-available statuses in the sources workspace. - **Documentation** - Updated the package to version 1.3.5 with corresponding release notes. <!-- 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: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#1211
No description provided.