mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 14:41:35 +00:00
* fix(memory): keep canonical rows when same-file legacy memory tables diverge * fix(memory): keep canonical-owned sources' chunk sets coherent during legacy import * fix(memory): import legacy chunks when canonical source has no chunks The same-file legacy migration excluded a legacy chunk from import whenever the canonical index already had a source row for its (path, source). That stranded a file whose canonical source was registered but had no chunks yet (indexing interrupted before chunks were written, or embedding pending/failed): the legacy chunks were its only searchable content, and the matching source hash stops sync from re-indexing, so the file went silently unsearchable. Re-key the chunk-coherence exclusion on canonical chunk ownership instead: snapshot the (path, source) pairs that already have canonical chunks before the import and skip legacy chunks only for those. A source with a canonical row but no chunks now imports its legacy chunks. The snapshot is taken pre-insert because the exclusion predicate reads the chunks table the import writes to. Add regressions: legacy chunks import for a chunk-less canonical source while a chunk-owning source still drops its stale legacy chunk; and restore abort coverage for the meta and chunks copy assertions (previously only files was exercised). * fix(memory): harden same-file legacy conflict recovery * fix(memory): rebuild ambiguous partial legacy sources * fix(memory): reconcile migrated derived indexes * fix(memory): close migrated index ownership gaps * test(memory): align migration expectations * test(tooling): match routed test order * test(memory): exercise vector reload cleanup * test(memory): prove real vector reload cleanup * fix(memory): make migrated indexes converge --------- Co-authored-by: Serhii Leniv <leniv.tech@gmail.com> Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>