Repository navigation
feat(memory): reconcile duplicate and conflicting writes - #6981
Merged
chinawch007 merged 3 commits intoNov 18, 2026
Merged
Conversation
Reuse current assertions with incremental user evidence, preserve protected modes, and reject exact deleted or corrected assertions. Include Host concurrency and restart coverage and document the remaining PR2 scope. Generated-by: Codex
Route single and batch management writes through bounded candidate snapshots, auxiliary semantic classification and scope-checked atomic commits. Preserve user authority, target identities and assertion provenance, retain unresolved conflicts, and enforce deletion suppression. Add pending queries, migration/index maintenance, SDK and client receipt integration, and Host/state regression coverage. Document fixed budgets, retrieval fixture results and validation limits in the English and Chinese PR2 technical reports. Generated-by: Codex
Generated-by: Codex
chinawch007
force-pushed
the
feat/ordinary-memory-pr2
branch
from
November 18, 2026 00:35
2c9666b to
408503e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Memory writes need to distinguish additional evidence from a new assertion, and prevent conflicting or previously deleted content from becoming effective under a new ID. This implements the PR2 write-reconciliation stage of the ordinary-memory migration.
For example, a confirmed “Postgres”/“PostgreSQL” equivalence adds evidence to the existing assertion. A conflicting automatic write against a user-protected assertion remains pending instead of becoming a second effective fact.
Refs #6959
Verification
Recorded focused checks:
memory::tests: 4 passed, using a real Host with a controlled provider fixture for semantic calls, concurrent deletion/reclassification, authority rejection, restart and isolation.git diff --check: passed.Additional strict Native Clippy failed in unchanged driver, driver cleanup, notifications, history projection and scheduler code; dependency-inclusive Clippy also reported a provider-protocol warning. Full
just check, cross-platform runners and production-model sampling were not run. Controlled provider judgments verify integration, not production semantic accuracy. The regression tests were not rerun against the base revision to establish a before/after failure comparison.Migration and matching limits
Migration
0046_memory_resolution.sqlbuilds an FTS5 trigram index for existing assertions and adds relation/provenance storage. Suppression retains matching content; deletion is not physical erasure.Retrieval uses separate bounded budgets for ordinary, protected/pending and restricted candidates. The lexical fixture retrieves 5/6 examples; a translation without shared substrings is missed. This does not guarantee global semantic uniqueness or zero false merges/suppression. Recall integration, pinned projections/import handling, conversation extraction/authorization parsing and automatic triggers belong to subsequent PRs.
AI use
Tool(s) and scope: OpenAI Codex contributed implementation, regression tests and validation. Both implementation commits carry
Generated-by: Codex; retain this trailer in the squash commit.Checklist
The first item remains unchecked because no base-revision failure comparison was run. The second refers to the focused checks listed above, not a successful full-repository check or Native strict Clippy run.
Does this PR entail a change in behavior?