Gossip protocol for cross-machine knowledge sharing #1

Closed
opened 2026-08-29 10:40:50 +00:00 by david · 1 comment
Owner

Design a gossip protocol so knox nodes (one per machine) can exchange the append-only observation log and converge on a shared knowledge index.

Design doc: docs/gossip-protocol.md.

Key findings from determinism audit:

  • Path-based fingerprints (git/log/obsidian) → same fact gets different IDs cross-node
  • Wall-clock as fact time (collected_at/last_seen/time.Now() fallbacks)
  • TF-IDF tie-break nondeterminism (map iteration in sort.Slice)
  • AUTOINCREMENT observation/thread IDs → duplicate auto-threads on merge

Milestones:

  1. M1: determinism fixes (canonical fingerprints, HLC, TF-IDF stable sort, locator IDs)
  2. M2: composite PK (node_id, hcl) + knox reconcile
  3. M3: peer protocol (HTTP pull/push, cursors, echo suppression)
  4. M4: ops surface (knox gossip status/diff)
Design a gossip protocol so knox nodes (one per machine) can exchange the append-only observation log and converge on a shared knowledge index. Design doc: `docs/gossip-protocol.md`. Key findings from determinism audit: - Path-based fingerprints (git/log/obsidian) → same fact gets different IDs cross-node - Wall-clock as fact time (`collected_at`/`last_seen`/`time.Now()` fallbacks) - TF-IDF tie-break nondeterminism (map iteration in sort.Slice) - AUTOINCREMENT observation/thread IDs → duplicate auto-threads on merge Milestones: 1. M1: determinism fixes (canonical fingerprints, HLC, TF-IDF stable sort, locator IDs) 2. M2: composite PK (node_id, hcl) + `knox reconcile` 3. M3: peer protocol (HTTP pull/push, cursors, echo suppression) 4. M4: ops surface (`knox gossip` status/diff)
david referenced this issue from a commit 2026-08-29 11:53:32 +00:00
david referenced this issue from a commit 2026-08-29 12:08:50 +00:00
Author
Owner

All four milestones implemented and pushed.

  • M1 2c0f8fa — determinism fixes (canonical fingerprints, HLC + node_id, TF-IDF tie-break, locator ordering)
  • M2 aa0dec6 — composite locator index + idempotent thread cluster_key + knox reconcile
  • M3 8c05409 — peer HTTP protocol (ping/log/batch), anti-entropy sweep, echo suppression, integration tests
  • M4 48e9c39 — knox gossip status/diff/sync, /v1/diff endpoint, server-before-seed, tombstone reporting

Verified e2e with two live daemons: gossip diff previewed 1655 peer-only fingerprints; gossip sync pulled them and converged the second node to 1655 observations.

All four milestones implemented and pushed. - M1 `2c0f8fa` — determinism fixes (canonical fingerprints, HLC + node_id, TF-IDF tie-break, locator ordering) - M2 `aa0dec6` — composite locator index + idempotent thread cluster_key + `knox reconcile` - M3 `8c05409` — peer HTTP protocol (ping/log/batch), anti-entropy sweep, echo suppression, integration tests - M4 `48e9c39` — `knox gossip status/diff/sync`, `/v1/diff` endpoint, server-before-seed, tombstone reporting Verified e2e with two live daemons: `gossip diff` previewed 1655 peer-only fingerprints; `gossip sync` pulled them and converged the second node to 1655 observations.
david closed this issue 2026-08-29 12:09:05 +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#1