[PR #1239] [MERGED] fix(long-term-memory): 1.4.7 — re-extract uses current availability modes; show extraction and retry modes (#1227) #1359

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

📋 Pull Request Information

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

Base: staging ← Head: fix(long-term-memory)/1227-reextract-retry-modes


📝 Commits (1)

  • 331f711 fix(long-term-memory): 1.4.7 — re-extract uses current availability modes; show extraction and retry modes (#1227)

📊 Changes

20 files changed (+225 additions, -111 deletions)

View changed files

➕ artifacts/long-term-memory-1.4.7.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/long-term-memory/CHANGELOG.md (+4 -0)
📝 packages/long-term-memory/client.js (+28 -28)
📝 packages/long-term-memory/manifest.json (+5 -5)
📝 packages/long-term-memory/server.mjs (+25 -25)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/SourcesWorkspace.tsx (+36 -9)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json (+2 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/interop.ts (+1 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts (+18 -1)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-processing.ts (+2 -0)
📝 packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts (+2 -0)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-feedback-clarity-ui.regression.mjs (+11 -0)
📝 tests/long-term-memory-routes.regression.ts (+48 -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 #1227

(#1227 was closed as not planned; the maintainer asked for the fix anyway.)

Why this change

  • Re-extract ignored the current availability selection. It posted only chatId/mode, and the extract route reused the modes saved earlier on the source note, so changing "Make memories available in" had no effect on re-extract.
  • "Retry failed" repeated the original attempt without saying which modes it would use.
  • "Imports as" showed the wrong mode. It rendered the first availability mode (note.modes[0]), not the mode the source was actually extracted as.

What changed

  • Re-extract: sends the current availability selection. POST /notes/:id/extract accepts an optional modes (1–8) and saves it on the source note, as a fresh import does.
    • The save happens only after the chat and model checks, and only when the set actually changed.
    • With no explicit mode, the previous extraction mode is kept, so a narrower selection doesn't fail with ltm_mode_not_enabled.
    • An explicit mode outside the new selection is still rejected with 400, before anything is saved.
    • Re-extract buttons stay disabled until the availability settings have loaded.
  • Import results: each result now carries extractionMode. The row says "Imports as {extraction mode}" and adds "Available in {modes}".
  • Retry failed: keeps its repeat-the-same-attempt behavior and now shows "Retries with {modes}".
  • Release: LTM 1.4.7, with a CHANGELOG.md entry and the builder version constant bumped. client.js, server.mjs, the catalogs and artifacts/long-term-memory-1.4.7.zip were regenerated with scripts/build-feature-packages.mjs, not edited by hand.

Package and security impact

  • Affected package IDs: long-term-memory (1.4.6 → 1.4.7)
  • Engine compatibility impact: none; the engine range is unchanged.
  • New or changed permissions/entrypoints: none. The existing extract route accepts one new optional, strictly validated body field (modes).
  • Restart, storage, update, or uninstall impact: re-extract can now change a source note's saved modes, through the same storage.updateNote path import already uses. No schema migration is needed: the new extractionMode result field is response-only and is not persisted in the session task state.

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

Automated runs on 331f711, with MARINARA_AGENTS_ROOT set to the worktree and MARINARA_ENGINE_ROOT set to a local Engine checkout:

  • All exit 0:
    • the builder (build-feature-packages.mjs long-term-memory), which left the tree unchanged, so the committed outputs reproduce
    • validate-package-locales, validate-catalog, catalog-release-notes, test-catalog-lanes
    • Prettier --check on the changed sources
    • the LTM regressions routes, routes-imports, routes-notes, conversation-summary-import, source-task, installation (reports 1.4.7), and feedback-clarity-ui
  • New route coverage:
    • re-extract saves modes
    • switching to a selection without the previous extraction mode succeeds and keeps that mode
    • an explicit mode outside the selection returns 400, and a missing chat returns 404; both leave the saved modes and the note version unchanged
  • Not run locally: ESLint and typecheck:packages, which hosted CI covers; the browser and lifecycle LTM regressions; and manual testing in the Engine UI. The UI test only checks the source code, so the new labels and disabled states have not been seen rendered.

Documentation impact

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

UI evidence (if applicable)

None yet. The new labels ("Imports as", "Available in", "Retries with") have not been seen in a browser.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Source re-extraction uses the currently selected availability modes and saves them to the source.
    • Import results show each item’s extraction mode and all modes where its memory is available. Retry results identify the modes used.
  • Bug Fixes
    • Re-extraction is unavailable until availability settings are ready.
    • Invalid mode selections are rejected without changing saved source settings.

🔄 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/1239 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/6/2026 **Status:** ✅ Merged **Merged:** 10/6/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/1227-reextract-retry-modes` --- ### 📝 Commits (1) - [`331f711`](https://github.com/Pasta-Devs/Marinara-Agents/commit/331f71103f6670a4bd0d3a2eeddd0be32e67431f) fix(long-term-memory): 1.4.7 — re-extract uses current availability modes; show extraction and retry modes (#1227) ### 📊 Changes **20 files changed** (+225 additions, -111 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.4.7.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/long-term-memory/CHANGELOG.md` (+4 -0) 📝 `packages/long-term-memory/client.js` (+28 -28) 📝 `packages/long-term-memory/manifest.json` (+5 -5) 📝 `packages/long-term-memory/server.mjs` (+25 -25) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/SourcesWorkspace.tsx` (+36 -9) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json` (+2 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/interop.ts` (+1 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts` (+18 -1) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-processing.ts` (+2 -0) 📝 `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts` (+2 -0) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-feedback-clarity-ui.regression.mjs` (+11 -0) 📝 `tests/long-term-memory-routes.regression.ts` (+48 -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 #1227 (#1227 was closed as not planned; the maintainer asked for the fix anyway.) ## Why this change - **Re-extract ignored the current availability selection.** It posted only `chatId`/`mode`, and the extract route reused the modes saved earlier on the source note, so changing "Make memories available in" had no effect on re-extract. - **"Retry failed" repeated the original attempt without saying which modes it would use.** - **"Imports as" showed the wrong mode.** It rendered the first availability mode (`note.modes[0]`), not the mode the source was actually extracted as. ## What changed - **Re-extract:** sends the current availability selection. `POST /notes/:id/extract` accepts an optional `modes` (1–8) and saves it on the source note, as a fresh import does. - The save happens only after the chat and model checks, and only when the set actually changed. - With no explicit mode, the previous extraction mode is kept, so a narrower selection doesn't fail with `ltm_mode_not_enabled`. - An explicit mode outside the new selection is still rejected with 400, before anything is saved. - Re-extract buttons stay disabled until the availability settings have loaded. - **Import results:** each result now carries `extractionMode`. The row says "Imports as {extraction mode}" and adds "Available in {modes}". - **Retry failed:** keeps its repeat-the-same-attempt behavior and now shows "Retries with {modes}". - **Release:** LTM 1.4.7, with a `CHANGELOG.md` entry and the builder version constant bumped. `client.js`, `server.mjs`, the catalogs and `artifacts/long-term-memory-1.4.7.zip` were regenerated with `scripts/build-feature-packages.mjs`, not edited by hand. ## Package and security impact - Affected package IDs: `long-term-memory` (1.4.6 → 1.4.7) - Engine compatibility impact: none; the `engine` range is unchanged. - New or changed permissions/entrypoints: none. The existing extract route accepts one new optional, strictly validated body field (`modes`). - Restart, storage, update, or uninstall impact: re-extract can now change a source note's saved `modes`, through the same `storage.updateNote` path import already uses. No schema migration is needed: the new `extractionMode` result field is response-only and is not persisted in the session task state. ## 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 Automated runs on `331f711`, with `MARINARA_AGENTS_ROOT` set to the worktree and `MARINARA_ENGINE_ROOT` set to a local Engine checkout: - All exit 0: - the builder (`build-feature-packages.mjs long-term-memory`), which left the tree unchanged, so the committed outputs reproduce - `validate-package-locales`, `validate-catalog`, `catalog-release-notes`, `test-catalog-lanes` - Prettier `--check` on the changed sources - the LTM regressions `routes`, `routes-imports`, `routes-notes`, `conversation-summary-import`, `source-task`, `installation` (reports 1.4.7), and `feedback-clarity-ui` - New route coverage: - re-extract saves `modes` - switching to a selection without the previous extraction mode succeeds and keeps that mode - an explicit mode outside the selection returns 400, and a missing chat returns 404; both leave the saved modes and the note version unchanged - Not run locally: ESLint and `typecheck:packages`, which hosted CI covers; the browser and lifecycle LTM regressions; and manual testing in the Engine UI. The UI test only checks the source code, so the new labels and disabled states have not been seen rendered. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) None yet. The new labels ("Imports as", "Available in", "Retries with") have not been seen in a browser. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Source re-extraction uses the currently selected availability modes and saves them to the source. * Import results show each item’s extraction mode and all modes where its memory is available. Retry results identify the modes used. * **Bug Fixes** * Re-extraction is unavailable until availability settings are ready. * Invalid mode selections are rejected without changing saved source settings. <!-- 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:09:40 +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#1359
No description provided.