threads authored on one node never reach another #41

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

The always-on replica (dhg.lol) has 8 threads; the laptop has 38 (30 active, 8 resolved). Part of that is expected, but a chunk is a design gap rather than a bug.

Findings

CreateThread writes no observation — it inserts into threads directly. Since gossip replicates only the observation log, authored threads are node-local by construction. They cannot arrive on another node, reconcile cannot rebuild them, and the spec's §5.3 ("threads authored by humans merged by cluster_key with LWW") has no transport behind it.

Breakdown of the laptop's 21 non-auto threads:

Property Count
have a cluster_key 10
no cluster_key 11

The 11 without a key cannot even be matched across nodes if transport existed.

What it costs

knox_thread_list, knox_thread_search and any "what was I working on" query return roughly half the picture on the always-on node — the node that exists specifically to answer when the laptop is off.

Options

  1. Emit an observation on thread create/update (source_id=thread, fingerprint = cluster_key), so authored threads ride the existing log + reconcile path. Fits the current design; needs backfill for existing rows.
  2. Add a /v1/threads sync endpoint and a peers table cursor — a second replication mechanism next to the log, which the design deliberately avoided.
  3. Accept it: document that authored threads are node-local.

Option 1 is the only one consistent with "the observation log is the single source of truth".

The always-on replica (dhg.lol) has **8** threads; the laptop has **38** (30 active, 8 resolved). Part of that is expected, but a chunk is a design gap rather than a bug. ## Findings `CreateThread` writes no observation — it inserts into `threads` directly. Since gossip replicates only the observation log, **authored threads are node-local by construction**. They cannot arrive on another node, reconcile cannot rebuild them, and the spec's §5.3 ("threads authored by humans merged by `cluster_key` with LWW") has no transport behind it. Breakdown of the laptop's 21 non-auto threads: | Property | Count | |---|---| | have a `cluster_key` | 10 | | **no `cluster_key`** | 11 | The 11 without a key cannot even be matched across nodes if transport existed. ## What it costs `knox_thread_list`, `knox_thread_search` and any "what was I working on" query return roughly half the picture on the always-on node — the node that exists specifically to answer when the laptop is off. ## Options 1. **Emit an observation on thread create/update** (`source_id=thread`, fingerprint = cluster_key), so authored threads ride the existing log + reconcile path. Fits the current design; needs backfill for existing rows. 2. Add a `/v1/threads` sync endpoint and a peers table cursor — a second replication mechanism next to the log, which the design deliberately avoided. 3. Accept it: document that authored threads are node-local. Option 1 is the only one consistent with "the observation log is the single source of truth".
david closed this issue 2026-11-05 08:47:54 +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#41