fix: backfill sessions indexed before content hashing (#20)
build / test (push) Has been cancelled
build / image (push) Has been cancelled

The watermark means a sweep only ever revisits sessions updated since the last
run, so sessions indexed before content hashing existed would never pick up
reasoning. Also treats a missing stored hash as 'cannot prove current' rather
than 'unchanged'.

Adds 'knox ingest sessions --all' to ignore the watermark for a one-time
backfill.
This commit is contained in:
2026-11-04 19:41:41 -08:00
parent 84f30f293b
commit 8d3851e638
3 changed files with 19 additions and 7 deletions
+1 -1
View File
@@ -695,7 +695,7 @@ func (w *Watcher) ingestGit() {
// sweep is full every time; RecordObservation collapses unchanged sessions, so
// no watermark is needed and repeated runs are idempotent.
func (w *Watcher) ingestOpenCodeDB() {
if _, _, _, err := IngestSessionsNow(w.knoxDB); err != nil {
if _, _, _, err := IngestSessionsNow(w.knoxDB, false); err != nil {
log.Printf("[knox] opencode.db ingest error: %v", err)
}
}