Skip to content

deploy: show each target's current version in the create preview and bind it to the digest - #186

Open
teddashh wants to merge 1 commit into
mainfrom
feat/deploy-preview-current-version
Open

teddashh wants to merge 1 commit into
mainfrom
feat/deploy-preview-current-version

Conversation

@teddashh

Copy link
Copy Markdown
Collaborator

What changes

  • The deployment create preview lists each target's running OpenClaw version (current_version, null when the Hub has no observation).
  • current_version is part of preview_digest. If a target's version changes between preview and apply, the apply returns 412 DEPLOYMENT_PREVIEW_STALE, and the operator previews again instead of acting on a plan they did not review.
  • Preview schema_version moves 4 → 5 (the official client validates the new field).
  • The Web review shows 目前版本 → 目標版本. CLI deployment preview adds a CURRENT column. MCP passes the preview through unchanged.

No new tables and no new states: it reuses the existing preview digest. The version comes from the install observation the Hub already reads (RunningDirVersion).

Verification

  • New test: a target changes version after preview → apply returns DEPLOYMENT_PREVIEW_STALE; a fresh preview then applies. Removing current from DeploymentFacts turns this test red.
  • Web and CLI output tests.
  • Full gate (Go 1.27.4): FMT/VET/BUILD/WIN/DARWIN all 0, GOTEST=0 (56 packages ok), OPS 356/356, GATE_RESULT=green.

🤖 Generated with Claude Code

…bind it to the digest

The create preview now lists the OpenClaw version each target last reported
running (current_version, null when unobserved). The value is part of the
preview digest, so a machine that changes version between preview and apply
makes the apply return 412 DEPLOYMENT_PREVIEW_STALE instead of acting on a
plan the operator did not review. Preview schema_version moves to 5.

Web review and CLI preview show the current version per target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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