Skip to content

feat: sidecar committed height surfaced on SeiNode status (spec 007, PLT-1220) - #549

Closed
bdchatham wants to merge 1 commit into
mainfrom
devin/1789084567-plt-1220-committed-height
Closed

feat: sidecar committed height surfaced on SeiNode status (spec 007, PLT-1220)#549
bdchatham wants to merge 1 commit into
mainfrom
devin/1789084567-plt-1220-committed-height

Conversation

@bdchatham

Copy link
Copy Markdown
Collaborator

Summary

First of three spec-007 PRs (PLT-1220). Puts a real block-production signal on the wire so PLT-1221 can gate SeiNetwork Ready on it instead of on pods being Running.

Sidecar / contractStatusResponse gains an optional field:

StatusResponse:
  status: Initializing | Ready
  committedHeight?: int64   # omitted when unreadable; absence != 0

Engine.Status(ctx) fills it from a new Engine.CommittedHeight func(ctx) (int64, error) hook, wired in serve.go to rpc.NewStatusClient("", nil).LatestHeight (CometBFT /status, 500ms timeout). Nil hook or an error leaves the field off the response, so an older sidecar image and a down seid both read as unreadable rather than as a fleet-wide height of zero. sidecarapi/client regenerated via go generate.

Controllertask.SidecarClient gains Status(ctx). NodeResolver.ResolvePlan now calls observeCommittedHeight next to the existing probeSidecarHealth on Running nodes:

// SeiNodeStatus
CommittedHeight         *int64       // last readable height
CommittedHeightReadTime *metav1.Time // when it was read; unchanged on a failed read

A failed read (or a sidecar that omits the field) leaves both untouched, so the read time ages — that is how the network controller in PLT-1221 tells "unreadable" (stale read time) from "stalled" (fresh read time, flat height), per spec R2.

Deploy note: image-first, as usual for sidecar contract changes — the new controller tolerates the old image (field absent → no stamp).

Verified: make manifests generate, make test (all three modules), make lint adds nothing over main, gofmt clean.

Link to Devin session: https://app.devin.ai/sessions/5ea4c524ec89449bb913b4e4c93f8084
Open in Devin Desktop: https://app.devin.ai/desktop/session/5ea4c524ec89449bb913b4e4c93f8084?variant=devin
Requested by: @bdchatham

… (PLT-1220)

The sidecar's /v0/status carries committedHeight, read from the co-located
CometBFT /status at request time and omitted when unreadable. The node
controller reads it alongside the SidecarReady probe on Running nodes and
stamps status.committedHeight / committedHeightReadTime; a failed read
leaves the prior reading in place so its read time ages into stale.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@cursor

cursor Bot commented Sep 11, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Cross-component API and CRD status contract with subtle freshness semantics that downstream readiness logic will depend on; backward compatible but requires sidecar rollout for the signal to appear.

Overview
Adds a block-production signal from seid through the sidecar into SeiNode status, so later work can gate network readiness on committed height instead of pod phase alone.

The sidecar /v0/status response now optionally includes committedHeight (from CometBFT via a new Engine.CommittedHeight hook in serve.go). The field is omitted when unreadable—RPC down, missing hook, or older images—so absence is not treated as height zero. Engine.Status takes a context and the HTTP handler passes request context through.

On the controller, SidecarClient grows Status(ctx). While a node is Running, ResolvePlan calls observeCommittedHeight alongside the existing health probe, writing status.committedHeight and status.committedHeightReadTime. Failed reads or omitted fields leave prior values unchanged so an aging read time marks “unreadable” vs a fresh read with a flat height marking “stalled.” CRD/manifests, OpenAPI, generated client, and test mocks are updated accordingly.

Reviewed by Cursor Bugbot for commit d42fb72. Bugbot is set up for automated code reviews on this repo. Configure here.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Punting on spec 007 for now per Brandon; closing.

@seidroid

seidroid Bot commented Sep 11, 2026

Copy link
Copy Markdown

This review did not complete. It reached no verdict, so there is no review of this change to act on.

This review produced no decision that could be read mechanically.

the run deadline expired before the turn replied

The agent's own reply is not published: a reply this driver cannot attribute to its own turn is one it must not repeat here. This run's log names the session that produced it.

Read this run for the rest: https://github.com/sei-protocol/sei-k8s-controller/actions/runs/34544697512

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.

1 participant