Skip to content

feat: refresh runner bases through claw pull (#128)#176

Merged
mostlydev merged 2 commits intomasterfrom
issue-128-runner-refresh-command
Apr 27, 2026
Merged

feat: refresh runner bases through claw pull (#128)#176
mostlydev merged 2 commits intomasterfrom
issue-128-runner-refresh-command

Conversation

@mostlydev
Copy link
Copy Markdown
Owner

Summary

Built-in local runner aliases (openclaw:latest, nanobot:latest, nanoclaw-orchestrator:latest, microclaw:latest, nullclaw:latest, picoclaw:latest) now refresh through claw pull with docker build --pull --no-cache against the inline BaseImage() recipe, rather than being silently materialized by claw build on first use. Operator surface stays at four verbs.

  • claw pull refreshes pinned infra + registry images + runner bases used by build: services
  • claw pull --no-runners preserves the fast pinned-infra-only path
  • claw pull <pod-or-clawfile-path> works for pods and single Clawfiles
  • claw build consumes an already-refreshed alias, rewrites FROM <alias>:latestFROM <alias>:v<version> in Dockerfile.generated, and stamps three provenance labels (claw.runner.built-against, claw.runner.image-id, claw.runner.recipe-sha)
  • claw up reads the image-id label and prints a soft drift hint when the local alias has moved on; it does not auto-rebuild
  • Refresh is transactional: build into a temp tag and only retag <alias>:latest after build/inspect/probe succeed
  • RefreshResult.PreviousRef lets the upgrade message report the prior version honestly
  • New sibling interfaces RunnerBaseProvider and (optional) RunnerVersionProber on BaseImageProvider; picoclaw opts out of the probe and uses a built-YYYYMMDD-<imageid12> fallback tag

ADR-024 documents the trust argument for keeping runner bases local-built rather than mostlydev-republished. Plan in docs/plans/2026-04-09-128-runner-update-from-upstream.md. Doc sweep covers README, quickstart, cli/clawfile/what-is-clawdapus guides, changelog (Unreleased), examples/quickstart README, AGENTS.md, and both SKILL.md mirrors.

This supersedes #131, which was a docs-only draft on a stale branch.

Test plan

  • go vet ./...
  • go test ./...
  • go test -tags integration ./...
  • go build -o bin/claw ./cmd/claw
  • go generate ./cmd/claw/...
  • Manual smoke: claw pull, claw pull --no-runners, claw pull <pod>, claw pull <clawfile> against examples/quickstart
  • Verify Dockerfile.generated has rewritten FROM + three labels after build
  • Verify drift hint fires when <alias>:latest image-id differs from a built service image's claw.runner.image-id

Closes #128

Built-in local runner aliases (openclaw:latest, nanobot:latest,
nanoclaw-orchestrator:latest, microclaw:latest, nullclaw:latest,
picoclaw:latest) now refresh through `claw pull` with
`docker build --pull --no-cache` against the inline BaseImage()
recipe, rather than being silently materialized by `claw build`
on first use.

Operator surface stays at four verbs. `claw pull --no-runners`
preserves the fast pinned-infra-only path. `claw build` consumes
an already-refreshed runner alias, rewrites
`FROM <alias>:latest` to `FROM <alias>:v<version>` in
Dockerfile.generated, and stamps three provenance labels
(claw.runner.built-against, claw.runner.image-id,
claw.runner.recipe-sha). `claw up` reads the image-id label and
prints a soft drift hint when the local alias has moved on; it
does not auto-rebuild.

Refresh is transactional: build into a temp tag and only retag
`<alias>:latest` after build, inspect, and version probe succeed,
so a failed refresh leaves the previously usable alias intact.
RefreshResult carries PreviousRef so the upgrade message reports
the prior version honestly. Drivers expose RunnerAlias() and an
optional RunnerVersionProbe() through new sibling interfaces on
BaseImageProvider; picoclaw opts out of the probe and uses a
build-date+image-id fallback tag.

Closes #128
@mostlydev mostlydev merged commit 31446a7 into master Apr 27, 2026
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.

Make runner updates intuitive and deterministic

1 participant