Repository navigation
fix: preserve consolidation provenance and version heads - #1545
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough
Merge Risk:
|
Read memories through collectAll and carry recurrence onto evolved consolidation memories, as main does. Deduplicate consolidation output by a key built from the concept and the full contents of its selected observations instead of by source and session ids. Two concepts that share observations now each publish their insight, an observation recompressed in place produces a new version, and an identical rerun or concurrent run is still published once.
Keep consolidation deduplication settled across reruns: - Key each memory by concept, from the evidence the prompt uses, so compression bookkeeping no longer changes it, and carry the keys of every concept onto a same-title successor. - Fall back to the source and session id comparison for memories published before keys existed. - Skip a lineage with more than one same-title latest head. - Leave agent-owned memories alone, and match the project exactly in a scoped run. - Take the mem:remember lock when mem::forget deletes a memory, so it cannot race a consolidation publication.
… heads The pre-publication source check now compares the same evidence fields the key hashes, so a compression retry that only updates bookkeeping during generation no longer discards the result. A legacy head that matches by source and session ids is stamped with the current key once instead of blocking every later run, so a later evidence change publishes a new version.
Concurrent consolidation runs could publish duplicate memories or evolve a stale version, while a failed successor write could leave the previous version hidden. Recheck current source evidence and memory heads under the existing ordered source/publication locks, then store the successor before demoting its predecessor.
This provides coordination within one worker and recovery from interrupted writes, not a distributed multi-row transaction. It complements #1506's pre-model optimization and overlap matching; those contributor changes are not included here.
Validation: required build, skill generation/check and documentation sync/check passed; full suite 3,288 passed, 4 skipped. Regression tests cover concurrent runs, source mutation, both source locks, project/session identity, lost acknowledgements, rollback failures, version repair and timeout cleanup. A clean installed npm archive with native iii 0.22.1 passed concurrent REST publication, evolution with new evidence, and durable deduplication after restart using a local deterministic model fixture. The installed CLI remained unchanged and test ports closed.
Summary by CodeRabbit