feat(api): add shared node-state stream foundation #746

Merged
admin merged 2 commits from feat/741-shared-state-stream into dev 2026-10-28 14:38:32 +00:00
Owner

Summary

First implementation slice for #741. Adds an authenticated WatchSharedState server stream with typed snapshots for node, peers, workers, paired browsers, and joined-pool state. The server subscribes before sending the initial baseline, assigns a monotonically increasing per-stream revision, and coalesces notifier bursts by sending only changed authoritative state. Existing daemon notification paths share the notifier so independent clients each receive updates; the Node overview now consumes the shared stream for worker and joined-pool state.

The response reuses secret-safe API state types. API keys, provider credentials, and node tokens are not included. The new RPC is explicitly classified as read-only in the MCP RPC-kind table.

Scope boundary

This is not completion of #741. Settings, model profiles and inventory, files, pool membership/invitations, and conversations are not yet migrated to this stream. The wider paired-browser revocation behavior and the remaining client migrations also need follow-up work. Reconnect starts from a fresh baseline; this PR does not add a durable replay log/cursor.

Verification

  • make cover — passed, every statement covered (including the real-image pass)
  • make lint — passed (go vet and staticcheck)
  • go build ./apps/sisyphusd — passed
  • Renderer npm run typecheck — passed
  • Renderer npm test — 234 passed
  • git diff --check — passed

/cc @rvnminers-A-and-N

## Summary First implementation slice for #741. Adds an authenticated `WatchSharedState` server stream with typed snapshots for node, peers, workers, paired browsers, and joined-pool state. The server subscribes before sending the initial baseline, assigns a monotonically increasing per-stream revision, and coalesces notifier bursts by sending only changed authoritative state. Existing daemon notification paths share the notifier so independent clients each receive updates; the Node overview now consumes the shared stream for worker and joined-pool state. The response reuses secret-safe API state types. API keys, provider credentials, and node tokens are not included. The new RPC is explicitly classified as read-only in the MCP RPC-kind table. ## Scope boundary This is not completion of #741. Settings, model profiles and inventory, files, pool membership/invitations, and conversations are not yet migrated to this stream. The wider paired-browser revocation behavior and the remaining client migrations also need follow-up work. Reconnect starts from a fresh baseline; this PR does not add a durable replay log/cursor. ## Verification - `make cover` — passed, every statement covered (including the real-image pass) - `make lint` — passed (`go vet` and `staticcheck`) - `go build ./apps/sisyphusd` — passed - Renderer `npm run typecheck` — passed - Renderer `npm test` — 234 passed - `git diff --check` — passed /cc @rvnminers-A-and-N
Author
Owner

The updated head 2078349 now has every required CI check green, including make cover at 100%, real-image tests, desktop E2E, test suite, CodeQL, and Linux/Windows/macOS packaging. The enum normalization also fixes the two real-Electron regressions noted below. Austin, the branch is ready for your review; I will keep it unmerged until the daemon review is complete.\n\n/cc @rvnminers-A-and-N

The updated head `2078349` now has every required CI check green, including `make cover` at 100%, real-image tests, desktop E2E, test suite, CodeQL, and Linux/Windows/macOS packaging. The enum normalization also fixes the two real-Electron regressions noted below. Austin, the branch is ready for your review; I will keep it unmerged until the daemon review is complete.\n\n/cc @rvnminers-A-and-N
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Sisyphus/Sisyphus#746