daemon status exposes no per-peer sync health (last-sync/staleness) #15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
daemon status [--json]exposes only local, session-scoped counters — there is no per-peer/per-member sync health (last-successful-sync time, last error, staleness). A node cannot locally tell that it has diverged from a peer.Repro
On machine A,
daemon status --jsonreported healthy counters (entries_merged: 35,closures_run: 154,uptime_s: 9518) and 67 entries — with no indication of peer state. Concurrently machine B reported its daemonStalewithsync session failed: transport: connection lost. From A's status alone, the degraded link and possible A→B divergence were invisible.Expected
daemon statusshould include, per theory and per member:last_sync_oktimestamp (andlast_sync_error+ message),stale/healthyflag derived from the sync interval,so either side can detect "I have not successfully synced with peer X since T".
Note
entries_mergedresets per daemon session, so it is not a convergence signal; a per-peer high-water mark would be.Impact
When the QUIC/relay path drops, both agents believe they are fine while silently diverging; the only current recourse is comparing fingerprints out-of-band.
Env
elephant v0.1.2 (HEAD
4d58f06), macOS. FLF two-machine (Arm 2) Rootclaim run.The skeptic-side run provides two additional implementation-level observations for this issue:
rc-liveoutbound sessions repeatedly failed withtransport: connection lost, but the cadence was also obscured by unrelated peer timeouts: withELEPHANT_SYNC_INTERVAL=30, attempts for this theory were about 94-96 seconds apart. The scheduler/head-of-line aspect is tracked separately in #18.A remote merge did occur during the run (the local journal advanced from 26 to 48 entries), but status still had no record of the successful peer/session. The current refresh path cannot account for it:
note_syncedsends only the theory id overRefreshTx, droppingapplied, whileentries_mergedis incremented only by the HTTPmerge_and_closepath. Therefore neither successful remote imports nor their entry count can appear in status today.Suggested status fields per
(theory, peer):last_attempt_at,last_success_at, and stage-specificlast_errorSuccesses should also produce a structured session log; currently only failures are visible, so the inbound convergence event cannot be reconstructed from daemon logs alone.