vestige/crates
Michael Kurras 5324c9690b fix(consolidation): add VESTIGE_AUTO_CONSOLIDATE_MERGE opt-out + honor protected pins (#142)
The background consolidation cycle's auto_dedup_consolidation pass silently
concat-merged near-duplicate memories (cosine >= 0.85) into [MERGED] blocks and
hard-deleted the originals, with no opt-out and while ignoring `dedup protect`
pins — so a pinned memory could be absorbed/deleted unattended.

- Gate the pass behind VESTIGE_AUTO_CONSOLIDATE_MERGE (default on; set
  0/false/off/no to disable), parsed like the sibling VESTIGE_BACKFILL_AUTOFIRE,
  at the function top so every consolidation caller is covered consistently.
- Exclude protected (pinned) nodes from merge clusters at both loops, so a
  protected node is never an anchor nor a member — never absorbed, never deleted.
  protected_node_ids() is fetched once before the reader-lock window (lock-safe).
- Tests: default-unchanged regression, flag-off suppression, full protection
  matrix, liveness, and an explicit #142 regression guard.
- Docs: CONFIGURATION.md env-var row + CHANGELOG entry.

Default behavior is unchanged. TOCTOU: the protected set is snapshotted once per
pass (consistent with the function's existing point-in-time idiom). Out of scope
(follow-up): a reversible audit trail for merges that still happen when enabled,
and the [MERGED] concat-bloat itself.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 12:21:13 +02:00
..
vestige-core fix(consolidation): add VESTIGE_AUTO_CONSOLIDATE_MERGE opt-out + honor protected pins (#142) 2026-07-08 12:21:13 +02:00
vestige-mcp fix(backend): resolve 10 bugs from the final full-codebase audit (#141) 2026-07-02 16:05:40 -05:00