From a37a08572238162503cd8d8536b4260ee49fc868 Mon Sep 17 00:00:00 2001 From: Luther Monson Date: Sun, 20 Sep 2026 14:53:07 -0700 Subject: [PATCH] fix: level-triggered reconcile so previews converge across the cluster MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The drain/queue fan-out is edge-triggered on the switchboard:gen counter: a node only re-walks switchboard:index when gen advances past its own last_gen, and once it records itself current at a generation it never re-walks. gen is a separate gossip key from the content it guards, so a lost or not-yet-replicated increment leaves a node "current" at a generation whose teardown it never materialized — the torn-down preview stays served with its database and .toml override on disk, every health check green (switchboard#24, and the gen-vs-key-content propagation race). The index itself has an acknowledged lost-update window on top of that. The symptom on the live cluster: override .toml counts drifting between nodes and orphaned overrides lingering as 404s. Add a level-triggered reconcile pass in the daemon that converges this node's on-disk previews to the KV desired state directly, independent of gen: - Prune: classify each preview directory from its OWN switchboard:preview: