auto-thread derivation is not reproducible: 17 stored vs 6 rebuilt #42

Open
opened 2026-11-05 08:36:53 +00:00 by david · 0 comments
Owner

The gossip spec ($6 reconcile) says derived state is rebuilt from the observation log, so two nodes with identical logs should hold identical threads. They don't.

Experiment

On a copy of the laptop index, wiped threads and thread_observations, then re-ran knox thread auto:

Run Threads created
default recency (7 days) 6
recency widened to 2 years 6
stored on the laptop 17

So the recency window is not the cause (widening it changes nothing). The cause is that the threader is incremental: it creates a thread when a cluster crosses the bar at that moment, and the thread then persists even after the cluster ages out or dissolves. A cold rebuild only sees clusters above the bar today.

Why it matters

  • Reconcile cannot reproduce the thread set, so convergence guarantees for threads are weaker than the spec claims.
  • A node that joins later starts with a strictly smaller thread list and never catches up.

Candidate fixes

  • Persist the cluster evidence that justified creation (member fingerprints + scores) so a rebuild can replay the decision rather than re-evaluate a stale window.
  • Or treat threads as not derived: they become authored artifacts (see the companion issue on replication), and reconcile stops pretending to rebuild them.

Worth deciding which, because the current documentation promises the first and the code does the second.

The gossip spec ($6 reconcile) says derived state is rebuilt from the observation log, so two nodes with identical logs should hold identical threads. They don't. ## Experiment On a copy of the laptop index, wiped `threads` and `thread_observations`, then re-ran `knox thread auto`: | Run | Threads created | |---|---| | default recency (7 days) | **6** | | recency widened to 2 years | **6** | | stored on the laptop | **17** | So the recency window is *not* the cause (widening it changes nothing). The cause is that the threader is **incremental**: it creates a thread when a cluster crosses the bar *at that moment*, and the thread then persists even after the cluster ages out or dissolves. A cold rebuild only sees clusters above the bar today. ## Why it matters - Reconcile cannot reproduce the thread set, so convergence guarantees for threads are weaker than the spec claims. - A node that joins later starts with a strictly smaller thread list and never catches up. ## Candidate fixes - Persist the cluster evidence that justified creation (member fingerprints + scores) so a rebuild can replay the decision rather than re-evaluate a stale window. - Or treat threads as *not* derived: they become authored artifacts (see the companion issue on replication), and reconcile stops pretending to rebuild them. Worth deciding which, because the current documentation promises the first and the code does the second.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: david/knox#42