mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #1526] [MERGED] fix(long-term-memory): rebuild the recall index in one background job after draft apply and extraction (1.4.67) #1529
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#1529
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1526
Author: @Promansis
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @Promansis
Base:
staging← Head:fix(long-term-memory)/debounced-rebuild📝 Commits (2)
bd1633ffix(long-term-memory): rebuild the recall index in one background job after draft apply and extraction (#1523)6f3473cchore(long-term-memory): release 1.4.67 (#1523)📊 Changes
25 files changed (+1050 additions, -257 deletions)
View changed files
📝
.github/workflows/ltm-browser.yml(+1 -1)➕
artifacts/long-term-memory-1.4.67.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/docs/ARCHITECTURE.md(+17 -1)📝
packages/long-term-memory/manifest.json(+3 -3)📝
packages/long-term-memory/server.mjs(+40 -40)📝
packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/review/ReviewQueue.tsx(+1 -1)📝
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/drafts/reconciliation.ts(+8 -26)📝
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/extraction/source-processing.ts(+3 -11)📝
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/maintenance/maintenance.ts(+8 -1)📝
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/persistence/vault-lock.ts(+11 -0)➕
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/recall/rebuild-job.ts(+148 -0)📝
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/recall/rebuild.ts(+195 -94)📝
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/recall/retrieval.ts(+4 -2)...and 5 more files
📄 Description
Pull request
Linked issue
Closes #1523. This PR does the background index rebuild. Moving the debug log onto its own lock, the issue's on-hold second part, needs a new design decision and will get its own issue.
Why this change
What changed
long-term-memory: draft apply and source extraction schedule one background rebuild per vault: 1 s after the last change, at most 10 s after the first. The rebuild holds the vault lock only to read the notes and to publish. It publishes only when nothing changed while it embedded; otherwise it runs again and reuses the vectors it already has.tests/long-term-memory-rebuild-job.regression.ts, wired intoltm-browser.yml. The runtime and extraction-graph suites now drive the scheduled rebuild with fake timers.long-term-memory1.4.67 on staging77acb942b, with the CHANGELOG entry, version, manifest, rebuiltserver.mjs, artifact and catalog entries.client.jsis unchanged (the client change is a type only).Package and security impact
long-term-memoryrecall.jsonfrom a background job. Lock order and the publish check are in the validation notes.indexRebuild: { status: "pending" }, so Review no longer shows "the index rebuild failed" for a suggestion. A background failure shows in the index status and the server log.Validation
node scripts/validate-catalog.mjspasses locallygit diff --checkpasses locallyCONTRIBUTING.mdManual verification notes
tests/long-term-memory-rebuild-job.regression.tsfails onstaging(ten draft applies in one quiet period must rebuild the index once, 10 calls instead of 1) and passes with the fix. Seven deliberate breaks each make it fail: job inside the caller's lock, no cap, no follow-up, no revision check, no deadlock guard, failure rejecting the job, no vector reuse. Five more, from review, each fail their own check: a reader waiting for every re-run, an upgrade retrying with its old source, a locked rebuild not aborting an upgrade, a failed state without a build, a schedule after deactivation.long-term-memory-runtime,-extraction-graphand-routesregressions pass. Typecheck, lint, the package build and every Long-Term Memory regression suite pass on the release head.Documentation impact
packages/long-term-memory/docs/ARCHITECTURE.mddescribes the background rebuild and the embedding-source behaviour.UI evidence (if applicable)
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.