Repository navigation
Conversation
One-pass processing reads at most five related memories per query. With alias recall on, alias-only successors were appended after every direct hit and then cut with the direct hits, so five direct hits hid a memory reachable only through its historical wording, even when that wording matched the observation exactly, and the duplicate went uncaught. With a limit, keep the first `limit` direct hits and then up to `limit` alias-matched successors outside them, in alias order. Behaviour without a limit and with alias recall off is unchanged.
hidb4ai
left a comment
There was a problem hiding this comment.
No blocking findings at 02e12bf. The separate alias allowance fixes the crowd-out while retaining snapshot/version checks and the existing display and input budgets. No new tables, migrations, or public interfaces. Real SQLite and OceanBase runs with the configured LLM confirmed that creation rechecks receive five direct hits plus the alias successor, with persisted readback after reopening. This validates visibility, not a guarantee that the model will merge or deduplicate.
hireview001
left a comment
There was a problem hiding this comment.
- Resolve merge conflicts with the target branch.
|
The affected modules are Core. @hidb4ai, please coordinate follow-up. Core: @hidb4ai @frf12 @Fengzdadi @beatenevo. Please coordinate the review of the affected changes. |
hidb4ai
left a comment
There was a problem hiding this comment.
The change is sound against its original alias-recall baseline, but current master has intentionally withdrawn that feature in #2935 (a194e66), including its configuration and unpublished 000 migration. Merging 02e12bf with current master now conflicts in atomic_memory_processing.py and both migration guides. Please reconcile this PR with that product decision and the current baseline before merging; the earlier approval does not validate a reintroduction or a resolved merge.
Current-head focused tests and a real configured-LLM/SQLite processing-and-reopen flow pass. The live model chose a different recall query, so the five-direct-plus-alias crowd-out case is established by the deterministic regression, not by that live run. No new defect was found in the bounded selection algorithm itself.
Which issue or RFC does this PR close?
No issue. Follow-up to #2674 (alias recall) and #2729/#2775 (one-pass processing), found in an audit of the one-pass processing mode.
Rationale for this change
One-pass processing reads at most
ONE_PASS_MEMORIES_PER_QUERY(5) related memories per query. Withatomic_memory_alias_recallon,_combine_related_ranksappends alias-only successors after every direct hit, and_recall_related_itemsthen cut the combined list to 5. Alias ranks carry no score, so they always sorted last: once a query had five direct hits, a merged memory reachable only through its historical wording was never shown to the model, even when that wording matched the observation exactly, and the duplicate was not caught. Per-candidate mode passes no limit and was unaffected.What changes are included in this PR?
limitdirect hits in rank order, then up tolimitalias-matched successors outside them, in the alias query's stable identity order. A memory hit directly beyond the limit and also through an alias counts in the alias part. The revision/state-version agreement check is unchanged.operations_input_over_budget, measured on the rendered message) are unchanged and still fall back to per-candidate processing when exceeded.Are there any user-facing changes?
Yes. One-pass processing can now compare a new observation with a merged memory through its historical wording when the query also has five or more direct hits. No API or persisted format changes.
How was this change tested?
test_memory_reachable_only_through_its_historical_wording_is_shown_beside_closer_hitsintests/e2e/test_atomic_memory_one_pass.py(SQLite, FTS, one-pass): fails with the runtime change reverted (the merged memory is not shown), passes with it.pytest tests/e2e/test_atomic_memory_one_pass.py tests/e2e/test_atomic_memory_alias_recall.py tests/e2e/test_atomic_memory_alias_edges.py tests/e2e/test_atomic_memory_alias_rebuild.py tests/test_atomic_memory_alias_upgrade.py: 59 passed.make check: passed.make unit-test(offline): 13 failed, 120 errors, limited to tests that runuv syncand need network or are environment-specific; the same failures occur without this change.AI usage statement
This change was written with Claude Code (Claude Opus 5.5).