fix: sessions indexed before content hashing never gain new content #20

Closed
opened 2026-11-05 03:41:54 +00:00 by david · 0 comments
Owner

Follow-up to #18/#19.

The sweep watermark only revisits sessions whose time_updated is newer than the last run, so sessions indexed before content hashing existed are never revisited. Combined with treating a missing stored hash as "unchanged", newly captured reasoning would never reach them.

Change

  • A missing stored hash now means "cannot prove the indexed content is current" rather than "unchanged".
  • knox ingest sessions --all ignores the watermark for a one-time backfill.

Result on the real index

Backfill ran in 20.6 s. Sessions whose stored content already matched are skipped by the observation layer (no rewrite, no hash) — that is correct, not a gap: their content is already current, and the next real change writes a hashed observation.

Warm sweep after backfill: 59 ms.

Follow-up to #18/#19. The sweep watermark only revisits sessions whose `time_updated` is newer than the last run, so sessions indexed **before** content hashing existed are never revisited. Combined with treating a missing stored hash as "unchanged", newly captured reasoning would never reach them. ## Change - A missing stored hash now means "cannot prove the indexed content is current" rather than "unchanged". - `knox ingest sessions --all` ignores the watermark for a one-time backfill. ## Result on the real index Backfill ran in 20.6 s. Sessions whose stored content already matched are skipped by the observation layer (no rewrite, no hash) — that is correct, not a gap: their content is already current, and the next real change writes a hashed observation. Warm sweep after backfill: **59 ms**.
david closed this issue 2026-11-05 03:42:04 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: david/knox#20