Skip to content

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

Merged
Promansis merged 1 commit into
Pasta-Devs:stagingfrom
Promansis:fix(long-term-memory)/1227-reextract-retry-modes
Oct 6, 2026
Merged

Promansis merged 1 commit into
Pasta-Devs:stagingfrom
Promansis:fix(long-term-memory)/1227-reextract-retry-modes

Conversation

@Promansis

@Promansis Promansis commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

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.

…odes; show extraction and retry modes (Pasta-Devs#1227)

Re-extract now sends the current availability selection, and the route saves
it on the source note (after request validation, and only when it changed),
keeping the previous extraction mode so a narrower selection does not fail as
not enabled. Import results carry extractionMode, so "Imports as" shows the
extraction mode and lists every availability mode. "Retry failed" still
repeats the original attempt and now shows the modes it will use. Re-extract
buttons are disabled until availability settings load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Promansis Promansis self-assigned this Oct 6, 2026
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: Pasta-Devs/Marinara-Agents/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 7be4c2c3-7b15-432c-a8a6-08455cbbec01
📥 Commits

Reviewing files that changed from the base of the PR and between f140047 and 331f711.

⛔ Files ignored due to path filters (3)
  • artifacts/long-term-memory-1.4.7.zip is excluded by !**/*.zip, !artifacts/**
  • packages/long-term-memory/client.js is excluded by !packages/**/client.js
  • packages/long-term-memory/server.mjs is excluded by !packages/**/server.mjs
📒 Files selected for processing (17)
  • catalog/catalog.json
  • catalog/notes.json
  • catalog/v2/catalog.json
  • catalog/v2/notes.json
  • catalog/v3/catalog.json
  • catalog/v3/notes.json
  • packages/long-term-memory/CHANGELOG.md
  • packages/long-term-memory/manifest.json
  • packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/SourcesWorkspace.tsx
  • packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json
  • packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/interop.ts
  • packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts
  • packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-processing.ts
  • packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts
  • scripts/build-feature-packages.mjs
  • tests/long-term-memory-feedback-clarity-ui.regression.mjs
  • tests/long-term-memory-routes.regression.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Long-Term Memory 1.4.7 updates source re-extraction to accept availability modes, reports extraction and availability modes in import results, and retains the original modes for retries. The package manifest, catalogs, and release notes are updated.

Changes

Long-Term Memory mode handling

Layer / File(s) Summary
Extraction request and result behavior
packages/long-term-memory/src/engine/packages/shared/.../schema.ts, packages/long-term-memory/src/engine/packages/server/.../routes.ts, packages/long-term-memory/src/engine/packages/server/.../source-processing.ts, packages/long-term-memory/src/engine/packages/server/.../interop.ts, tests/long-term-memory-routes.regression.ts
The extraction request accepts an optional list of availability modes. The route validates supplied modes, saves changed modes before processing, and passes the selected extraction mode to source processing. Imported-source results include each item’s extraction mode. Regression tests cover mode updates and error cases.
Re-extraction controls and import results
packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/SourcesWorkspace.tsx, packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json, tests/long-term-memory-feedback-clarity-ui.regression.mjs
New re-extraction requests include effective availability modes when settings are ready. Retry contracts retain their original modes. Import results display extraction and availability modes, and retry results identify the modes used. Controls are disabled while availability settings are unavailable.
Version 1.4.7 release metadata
packages/long-term-memory/manifest.json, packages/long-term-memory/CHANGELOG.md, scripts/build-feature-packages.mjs, catalog/*/catalog.json, catalog/*/notes.json
The package version, file hashes, and artifact metadata are updated for version 1.4.7. Release notes describe the mode-handling changes. The 1.3.27 entries are removed from the catalog notes.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant SourcesWorkspace
  participant ExtractionRoute
  participant SourceNote
  participant SourceProcessing
  SourcesWorkspace->>ExtractionRoute: Send chatId, mode, and availability modes
  ExtractionRoute->>SourceNote: Validate and save supplied availability modes
  ExtractionRoute->>SourceProcessing: Process source with selected extraction mode
  SourceProcessing-->>SourcesWorkspace: Return import result with extractionMode
  SourcesWorkspace->>SourcesWorkspace: Display extraction and availability modes
Loading

Suggested reviewers: spicymarinara

Merge Risk: ⚪ Minimal · up to 331f7

No actionable issue remains from this review; the change is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 3 | ❌ 1 | ❓ 1

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 8 files. (9 skipped: 9… Write docstrings for the functions missing them to satisfy the coverage threshold.
Out of Scope Changes check ❓ Inconclusive The package changes, tests, release entry, and regenerated package and catalog data align with the PR’s stated Long-Term Memory 1.4.7 scope. The summaries also report removal of the Long-Term Memory 1… Provide evidence that removing the 1.3.27 catalog entry is part of the release-generation policy or otherwise required for this release, so its scope can be determined.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Long-Term Memory fix and its main changes: re-extraction uses current availability modes, and extraction and retry modes are shown.
Description check ✅ Passed The description covers the template’s key sections and provides detailed change, impact, and validation information. It also discloses that manual UI testing was not done and leaves documentation and …
Linked Issues check ✅ Passed Issue #1227 is closed, so it provides historical context only. No active directly linked issue remains, and no linked-issue coding requirements apply.
Full details: Out of Scope Changes check

Explanation

The package changes, tests, release entry, and regenerated package and catalog data align with the PR’s stated Long-Term Memory 1.4.7 scope. The summaries also report removal of the Long-Term Memory 1.3.27 notes entry from three catalogs. The available evidence does not establish why that historical entry was removed or whether catalog generation requires its removal.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 8 files. (9 skipped: 9 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/SourcesWorkspace.tsx

typescript-eslint does not support TS 7.0.
Please see https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/#running-side-by-side-with-typescript-6.0 to run typescript-eslint using the TS 6 API.
See also typescript-eslint/typescript-eslint#10940 for tracking typescript-eslint's support for TS >=7.1

Oops! Something went wrong! :(

ESLint: 10.11.0

Error: typescript-eslint does not support TS 7.0.
at Object. (/.eslint-tmp/node_modules/typescript-eslint/dist/index.js:52:11)
at Module._compile (node:internal/modules/cjs/loader:1830:14)
at Object..js (node:internal/modules/cjs/loader:1961:10)
at Module.load (node:internal/modules/cjs/loader:1553:32)
at Module._load (node:internal/modules/cjs/loader:1355:12)
at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
at loadCJSModuleWithModuleLoad (node:internal/modules/esm/translators:326:3)
at ModuleWrap. (node:internal/modules/esm/translators:231:7)
at ModuleJob.run (node:internal/modules/esm/module_job:437:25)
at async node:internal/modules/esm/loader:639:26

packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/interop.ts

ESLint skipped: the matched ESLint configuration already failed (config-incompatibility).

packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts

ESLint skipped: the matched ESLint configuration already failed (config-incompatibility).

  • 5 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added bugfix Bug fix docs packages Agent package sources and manifests artifacts Generated downloadable package artifacts catalog Official catalog and package schemas build Build scripts, snapshots, and validation labels Oct 6, 2026
@Promansis
Promansis marked this pull request as ready for review October 6, 2026 13:05
@Promansis
Promansis merged commit 533ae29 into Pasta-Devs:staging Oct 6, 2026
22 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

artifacts Generated downloadable package artifacts bugfix Bug fix build Build scripts, snapshots, and validation catalog Official catalog and package schemas docs packages Agent package sources and manifests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant