fix(audit): reconciliation pulls every site node with a per-(site, node) cursor (AUD-1, WP4 task 4.8)

This commit is contained in:
Joseph Doherty
2026-12-03 10:08:20 -05:00
parent c15bd210f7
commit 4070f7efca
10 changed files with 514 additions and 60 deletions
@@ -120,6 +120,13 @@ reconnect — pulls "all tracking rows changed since cursor X" from each site.
Gaps left by lost telemetry self-heal. Central converges to the site; the site
never depends on central.
**Every node is pulled, each with its own cursor (AUD-1, 2026-12).** On a site
pair without LocalDb replication each node's operation-tracking store is its
own, so the pass pulls every configured node (`PullFromEndpointAsync`, no
NodeA→NodeB failover) and keys the cursor below per **(site, node endpoint)**;
the pinned latch stays per site (pinned when any node is). Before, NodeA was
pulled whenever it answered, so a standby NodeA's empty store hid NodeB's rows.
The per-site cursor is a **composite `(UpdatedAtUtc, TrackedOperationId)`
keyset**, not a single timestamp. Each pull asks for rows strictly greater than
the cursor pair and advances it to the maximum row seen; a burst of more rows