feat(replication): expose connection-truth liveness age in cluster_status (#431)#524
Merged
Conversation
…atus (#431) cluster_status already reports the shared-memory connection truth (connected override + lastConnectionError, from #445). Add the missing piece: lastLiveness, the wall-clock of the link's last proof-of-life (handshake/pong/receive stamp). Operators — and the W1 watchdog-demotion soak — need to see how fresh the truth behind `connected` is, distinguishing an actively-alive link from one nearing the staleness window. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request updates the replication/clusterStatus.ts file to surface the last proof-of-life timestamp (lastLiveness) on the socket object when reading connection truth. This allows operators and watchdogs to assess the freshness of the connection state. There are no review comments, and I have no additional feedback to provide.
12 tasks
Contributor
|
Reviewed; no blockers found. |
dawsontoth
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
One-field addition to
cluster_status(W1 / #431, W8 Tier-1 overlap):socket.lastLiveness— the wall-clock of the link's last proof-of-life (handshake/pong/receive stamp from the shared-memory truth slots #445 added).cluster_statusalready reports the truth-derivedconnectedoverride andlastConnectionError; liveness age was the missing piece. Operators — and the W1 watchdog-demotion soak (design on #431) — need to see how fresh the truth behindconnectedis: an actively-alive link vs one coasting toward theLIVENESS_STALE_MSwindow reads identically today.Same
asDateformatting as the neighboring fields; a never-alive link omits the field (asDate(0)→undefined), matching house style.Notes
Part of #430 · W1 #431 · follows #445.
🤖 Generated with Claude Code