Skip to content

feat(memory): Add preference supersession - #670

Merged
dcramer merged 2 commits into
mainfrom
dcramer/feat/memory-supersession
Jun 29, 2026
Merged

dcramer merged 2 commits into
mainfrom
dcramer/feat/memory-supersession

Conversation

@dcramer

@dcramer dcramer commented Jun 29, 2026

Copy link
Copy Markdown
Member

Add conservative supersession for requester preference memories.

Memory writes now ask the memory agent whether a new personal preference clearly replaces active old preferences in the same scope and subject. Duplicate and idempotency checks still run first, and supersession only applies to non-expired personal preference replacements. Superseded rows stay in place with supersededAtMs / supersededById, while old derived embeddings are removed in the same transaction.

This wires the same behavior through explicit memory tool writes and passive completed-session processing, keeps list/search/remove tool contexts narrower than create writes, and updates the storage contract plus storage/eval coverage.

Refs GH-658

Add conservative requester-preference supersession to the memory store. Duplicate and idempotency checks still run first, and only active personal preference replacements can hide old rows.

Wire the memory agent as the supersession decider for explicit and passive writes, add storage and eval coverage, and update the storage contract.

Refs GH-658

Co-Authored-By: GPT-5 Codex <[email protected]>
@vercel

vercel Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Jun 29, 2026 2:55am

Request Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 17aec16. Configure here.

Comment thread packages/junior-memory/src/store.ts Resolved
Select supersession candidates from related scoped preferences instead of the newest active rows. This keeps older mutable preference targets eligible when unrelated newer memories exist.

Refs GH-658

Co-Authored-By: GPT-5 Codex <[email protected]>
@dcramer
dcramer marked this pull request as ready for review June 29, 2026 03:05
@dcramer
dcramer merged commit 6dab3f2 into main Jun 29, 2026
16 checks passed
@dcramer
dcramer deleted the dcramer/feat/memory-supersession branch June 29, 2026 03:13

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 18b8f568 Deployed Jun 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant