-
Notifications
You must be signed in to change notification settings - Fork 2.9k
manage_adr data loss on INCREMENTAL re-index (regression of #516) #1190
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingpriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.stability/performanceServer crashes, OOM, hangs, high CPU/memoryServer crashes, OOM, hangs, high CPU/memoryux/behaviorDisplay bugs, docs, adoption UXDisplay bugs, docs, adoption UX
Milestone
Description
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.stability/performanceServer crashes, OOM, hangs, high CPU/memoryServer crashes, OOM, hangs, high CPU/memoryux/behaviorDisplay bugs, docs, adoption UXDisplay bugs, docs, adoption UX
Summary
manage_adrcontent is silently destroyed by an incremental re-index. This is a regression of the fix for #516: that fix preserves the ADR across the full re-index path, but the incremental path (taken whenever a prior DB + file hashes exist, i.e. after any edit) branches before the ADR snapshot and rebuilds the DB with no ADR capture.Because the background watcher triggers an incremental re-index within ~5–60s of any git change, an ADR cannot survive normal development.
Reproduction (v0.9.0, darwin-arm64, official release binary)
Self-contained script: https://github.com/ (available on request) — it inits a temp git repo, indexes, stores an ADR, appends one line, re-indexes, and shows
no_adr.Likely cause
The full-reindex path snapshots the ADR before deleting the DB (the #516 fix,
pipeline.c:1137-1152). The incremental route branches earlier (pipeline.c:1125);dump_and_persistinpipeline_incremental.cunlinks and rebuilds the DB with no equivalent ADR snapshot/restore (grep -i adr pipeline_incremental.creturns nothing).Suggested fix
Mirror the #516 snapshot/restore into the incremental
dump_and_persistpath (or hoist the ADR snapshot above the full/incremental branch so both routes are covered).Impact
Silent, unrecoverable data loss of user-authored architecture notes during ordinary editing. Suggest either fixing the persistence or, until fixed, documenting that
manage_adris not durable.