Skip to content

feat: add control-plane host updates and release hardening - #44

Merged
EitanWong merged 8 commits into
mainfrom
feat/43-host-update-control-plane
Aug 4, 2026
Merged

feat: add control-plane host updates and release hardening#44
EitanWong merged 8 commits into
mainfrom
feat/43-host-update-control-plane

Conversation

@EitanWong

Copy link
Copy Markdown
Owner

Closes #43

Control-plane driven managed host updates: artifact route, service update with health wait and rollback, host-update adapter, host.update capability advertisement, HTTP/1.1 long-timeout downloads, PE32+ release build gate, and a concise English-default README with zh-CN mirror.

A live Windows triage exposed a 4-round-trip retry loop: the Agent could
not know a valid powershell task payload upfront (open payload schema,
payload_example omitted workspace_root and powershell_command), and each
denial reported only one missing field at a time.

- contracts: adapter profiles now declare workspace_root_required and
  complete payload examples (all adapters; powershell pins the bare
  powershell.exe allowlist + powershell_command Windows quirk)
- hostrunner: DenialExplanation gains hint; workspace_required,
  missing_capability, command_not_allowlisted and workspace denials now
  tell the Agent exactly which field to add
- regression tests for both; mcp/tools.json regenerated; QUALITY_MATRIX
  updated
Architecture-level update capability so enrolled Windows hosts can be
updated remotely and reliably without touching connection stability:

- gateway: GET /v1/sessions/{id}/artifacts/host-update serves the
  configured connector under the endpoint lease (no new credential type),
  digest header, no-store, audited
- host: rdev-host service update stages digest-keyed releases, switches
  SCM binary path atomically (never overwriting the running image), waits
  for the replacement to run and auto-rolls-back on boot failure; detached
  updater survives the service stop; UPDATE_RESULT.json marker
- hostrunner: host-update adapter (lease-authed download, SHA-256 verify,
  idempotent up-to-date short-circuit, workspace exemption, host.update
  capability with hint)
- control plane: endpoint host_version/host_commit reported on join so
  operators verify updates from session status
- docs: UPDATE_RUNBOOK with cutover/rollback/corner cases
RegistrationCapabilities omitted host.update, so gateway capability routing
could never deliver a host-update task to a Windows endpoint even when the
session ceiling granted it. Advertise it on Windows and pin the registration
in the hostcmd tests.
The host-update adapter is exempt from the workspace_root preflight, but
acquireWorkspaceLock still ran with an empty repo root on hosts with a
configured lock store, denying every update with workspace_invalid. Skip
the lock when there is no workspace to serialize.
…imeout

The artifact download used http.DefaultClient, which negotiates HTTP/2 and
honors environment proxies; against the production reverse proxy this
repeatedly stalled mid-download, so the host never completed the update and
replayed the offered task forever. Mirror the web-handoff bootstrap path
(HTTP/1.1, no proxy) that is verified in production, with a 5-minute window
for slow operator links.
…t recovery

A one-off inline build produced an ELF binary named rdev-host.exe because
GOOS did not apply; Windows could not start it, so service update rolled
back forever and the connector service was left stopped on the canary host.
scripts/build-release.sh now builds all three binaries deterministically and
fails the build when rdev-host.exe is not a PE32+ image. UPDATE_RUNBOOK
documents the observed pitfall and the one-command service recovery path.
Position the project as agent-native remote development: a controlled,
policy-bound, auditable channel between AI agents and their Mac/Windows/Linux
hosts. Drop the verbose role-based walkthrough; keep quick start, security
model, and doc links. Chinese translation at README.zh-CN.md.
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@EitanWong, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 44 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c59cf8da-3fe0-44af-ad82-1bf806e6a3ee

📥 Commits

Reviewing files that changed from the base of the PR and between 2254329 and 269a87c.

📒 Files selected for processing (25)
  • README.md
  • README.zh-CN.md
  • docs/development/QUALITY_MATRIX.md
  • docs/operations/UPDATE_RUNBOOK.md
  • internal/contracts/engineering_task.go
  • internal/contracts/engineering_task_test.go
  • internal/controlplane/session.go
  • internal/controlplane/store.go
  • internal/gateway/memory.go
  • internal/hostcmd/capabilities.go
  • internal/hostcmd/hostcmd.go
  • internal/hostcmd/hostcmd_test.go
  • internal/hostcmd/managed_service_windows.go
  • internal/hostrunner/host_update.go
  • internal/hostrunner/host_update_other.go
  • internal/hostrunner/host_update_test.go
  • internal/hostrunner/host_update_windows.go
  • internal/hostrunner/runner.go
  • internal/hostrunner/runner_test.go
  • internal/hostrunner/runtime.go
  • internal/httpapi/host_update.go
  • internal/httpapi/host_update_test.go
  • internal/httpapi/server.go
  • mcp/tools.json
  • scripts/build-release.sh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@EitanWong
EitanWong merged commit 116f9d4 into main Aug 4, 2026
11 of 13 checks passed
@EitanWong
EitanWong deleted the feat/43-host-update-control-plane branch August 4, 2026 09:15
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.

Control-plane driven managed host updates and release hardening

1 participant