mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #1445] [MERGED] fix(long-term-memory): expire accepted receipt ids and invalidated drafts (1.4.48) #1465
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#1465
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/1445
Author: @Promansis
Created: 10/17/2026
Status: ✅ Merged
Merged: 10/17/2026
Merged by: @Promansis
Base:
staging← Head:fix(long-term-memory)/1443-retention-followups📝 Commits (4)
1e89422fix(long-term-memory): expire accepted receipt ids and invalidated drafts (#1443)e97f5c9Merge upstream/staging into fix(long-term-memory)/1443-retention-followups; release long-term-memory 1.4.48fb929fefix(long-term-memory): stop checking the unused usageRetentionDays against the audit window (#1443)af916a6Merge branch 'staging' into fix(long-term-memory)/1443-retention-followups📊 Changes
17 files changed (+169 additions, -142 deletions)
View changed files
➕
artifacts/long-term-memory-1.4.48.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(+6 -0)📝
packages/long-term-memory/client.js(+1 -1)📝
packages/long-term-memory/manifest.json(+5 -5)📝
packages/long-term-memory/server.mjs(+39 -39)📝
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/default-config.ts(+1 -0)📝
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/retention.ts(+16 -31)📝
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/storage.ts(+0 -17)📝
packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts(+2 -1)📝
scripts/build-feature-packages.mjs(+1 -1)📝
tests/long-term-memory-storage.regression.ts(+56 -5)📄 Description
Linked issue
Closes #1443
Why this change
#1404 (1.4.42) stopped writing per-memory usage counters and started deleting finished drafts. Three things were left:
usage.jsongains one id per injected reply and is read and rewritten under the vault lock on every one of those replies. A copy of a real vault held 810 ids (about 55 KB) after about 2.5 weeks. The ids only stop the same prepared prompt from being recorded twice, and Engine ignores the result (long-term-memory-runtime.ts:138-148at 2039583ca only logs a failure).What changed
retention.ts, step 2:usage.chatsloop is replaced with: ifusage.chatshas any entries, set it to{}. TheusageChatsPrunedresult field is removed; nothing read it.acceptedReceiptsentries expire afterACCEPTED_RECEIPT_RETENTION_MS(one day, besideRETENTION_INTERVAL_MS) instead ofreceiptRetentionDays. Retention runs at most daily, so an id lives one to two days. The duplicate check inusage.tsis unchanged.receiptRetentionDays, because each holds that chat's last recall.retention.ts, step 6:invalidatedjoins the statuses deleted afterauditWindowDays(30 days by default). Invalidation setsupdatedAt, so the window counts from the invalidation. Pending drafts are still kept. The set is renamedEXPIRING_DRAFT_STATUSES, because "finished" no longer describes it.storage.ts: permanent delete no longer reads or rewritesusage.json.usageRetentionDaysstays in the settings schema and defaults, with a comment, so older settings files and backups still parse. It is no longer checked againstauditWindowDays(CodeRabbit repair,fb929fe80), so an audit window over 180 days no longer fails validation unless that unused setting is raised too.long-term-memory1.4.48: CHANGELOG entry, version, manifest, rebuiltserver.mjs, artifact and catalog entries. The branch was merged withupstream/staging(1.4.47, #1444) at land, with no source conflicts.Diff: source +25/−48 lines (including the CHANGELOG), tests +56/−5 lines, before the release merge.
Not in this PR: the per-chat receipt files and their 180-day window. There is one small file per chat, and it holds that chat's last recall.
Package and security impact
long-term-memoryusage.jsononce, without old counters and with only the last day's accepted ids. It also deletes invalidated drafts older than the audit window. Nothing else in the vault changes.Validation
node scripts/validate-catalog.mjspasses locallygit diff --checkpasses locallyCONTRIBUTING.mdManual verification notes
These checks were run by the coding agent, not by a person. Engine checkout
2039583ca, Nodev24.15.0.tests/long-term-memory-storage.regression.ts, beside the #1404 retention cases:usage.jsonbyte-for-byte unchanged.usage.json.1e894227f, these passed:test-ltm.sh storage,index-keys,runtime,routesandroutes-drafts.{ auditWindowDays: 365 }with every used retention period at 365 failed to parse before the repair and parses after it. A receipt period shorter than the window is still rejected. The probe was deleted.fb929fe80(after merging 1.4.47 and the repair), these all passed:test-fast.sh(npm run check,git diff --check) andtypecheck-packages long-term-memory.test-catalog-lanes,validate-package-locales,validate-catalogandcatalog-release-notes.test-ltm.sh storage,index-keys,runtime,routesandroutes-drafts, plusbranch-recall.test-ltm.sh installationfor the 1.4.48 artifact. Hosted CI runs the full Long-Term Memory regression list.Documentation impact
UI evidence (if applicable)
None. Nothing changes on screen.
🤖 Generated with Claude Code
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.