Skip to content

feat(replication): expose connection-truth liveness age in cluster_status (#431)#524

Merged
kriszyp merged 1 commit into
mainfrom
kris/w1-clusterstatus-truth
Jul 6, 2026
Merged

feat(replication): expose connection-truth liveness age in cluster_status (#431)#524
kriszyp merged 1 commit into
mainfrom
kris/w1-clusterstatus-truth

Conversation

@kriszyp

@kriszyp kriszyp commented Jul 6, 2026

Copy link
Copy Markdown
Member

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_status already reports the truth-derived connected override and lastConnectionError; liveness age was the missing piece. Operators — and the W1 watchdog-demotion soak (design on #431) — need to see how fresh the truth behind connected is: an actively-alive link vs one coasting toward the LIVENESS_STALE_MS window reads identically today.

Same asDate formatting 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

…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>
@kriszyp kriszyp marked this pull request as ready for review July 6, 2026 04:18
@kriszyp kriszyp requested a review from a team as a code owner July 6, 2026 04:18
@kriszyp kriszyp requested review from DavidCockerill and heskew July 6, 2026 04:18

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@claude

claude Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Reviewed; no blockers found.

@kriszyp kriszyp merged commit 795d5cd into main Jul 6, 2026
45 of 46 checks passed
@kriszyp kriszyp deleted the kris/w1-clusterstatus-truth branch July 6, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants