mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #1178] [Issue]: Long-Term Memory: recheck index freshness under the vault lock and honor recall cancellation #601
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#601
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?
Originally created by @Promansis on GitHub (Oct 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1178
Originally assigned to: @Promansis on GitHub.
Summary
Long-Term Memory makes recall-index freshness and quarantine decisions outside the vault lock, so concurrent stale callers can rebuild the same index twice and can quarantine a newly published index. Recall cancellation also fails to reach rebuild embedding work: a timed-out recall keeps rebuilding and holding the vault lock.
Affected package
long-term-memory(Long-Term Memory), package-owned server runtime. Findings A7 and the cancellation/lifecycle portion of A17.Expected behavior
AbortSignalthrough stale-index rebuilding, semantic upgrades, and embedding batches. Check cancellation before publishing results.Actual behavior
loadOrRebuildLongTermMemoryIndexesreads and checks freshness beforerebuildLongTermMemoryIndexesenterswithLtmVaultLock; there is no in-lock freshness recheck for the queued caller.retrieveLongTermMemoryreceives a signal but does not pass it to the index loader. Its rebuild and semantic-upgrade paths consequently receive no recall cancellation signal.Steps to reproduce
loadOrRebuildLongTermMemoryIndexescalls. Use a deterministic fixture barrier so both observe the old index/current notes before either rebuilds. Observe two rebuild embedding calls instead of one.withLongTermMemoryRuntimeTimeout(80, ...), forwarding its signal toruntime.recall. Queuestorage.listNotes, let the timeout fire, then release the embedding batch. Observe the missing rebuild signal, blocked reader, and post-timeout publication.Environment
2.4.6, source checkout227e3e12c87a55c40074413f1f32e57d732217da.1.3.34; Agents checkoutd5bd5c2a8b17503df2b4145869f5d5dade684217. The package-owned server/shared trees also match upstreamstagingat2336c3ca59f743f6c03afe9c574c0cdaab8ddc9f.v24.15.0, installedtsx4.23.13.Logs, screenshots, or video
Observed output from the disposable synthetic-data fixture:
Current-behavior characterization exited 0. Desired-invariant runs exited 1 with:
No private chat data, real providers, or models were used.
Additional context
Scope and ownership
staging; this issue does not require Engine source changes. Engine already forwards an abort signal to the registered LTM runtime.packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/{rebuild,retrieval,embedding-adapter,vault-lock}.ts.Validation plan
Proof above is characterization, not repaired behavior or release validation. Installed dependencies differ from the repository's pins; install locked dependencies in the implementation workspace before claiming repository gates. No implementation, real-provider, installed-package, or browser validation has been performed for this issue.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: