feat: refresh runner bases through claw pull (#128)#176
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Built-in local runner aliases (
openclaw:latest,nanobot:latest,nanoclaw-orchestrator:latest,microclaw:latest,nullclaw:latest,picoclaw:latest) now refresh throughclaw pullwithdocker build --pull --no-cacheagainst the inlineBaseImage()recipe, rather than being silently materialized byclaw buildon first use. Operator surface stays at four verbs.claw pullrefreshes pinned infra + registry images + runner bases used bybuild:servicesclaw pull --no-runnerspreserves the fast pinned-infra-only pathclaw pull <pod-or-clawfile-path>works for pods and single Clawfilesclaw buildconsumes an already-refreshed alias, rewritesFROM <alias>:latest→FROM <alias>:v<version>inDockerfile.generated, and stamps three provenance labels (claw.runner.built-against,claw.runner.image-id,claw.runner.recipe-sha)claw upreads the image-id label and prints a soft drift hint when the local alias has moved on; it does not auto-rebuild<alias>:latestafter build/inspect/probe succeedRefreshResult.PreviousReflets the upgrade message report the prior version honestlyRunnerBaseProviderand (optional)RunnerVersionProberonBaseImageProvider; picoclaw opts out of the probe and uses abuilt-YYYYMMDD-<imageid12>fallback tagADR-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/clawgo generate ./cmd/claw/...claw pull,claw pull --no-runners,claw pull <pod>,claw pull <clawfile>againstexamples/quickstartDockerfile.generatedhas rewritten FROM + three labels after build<alias>:latestimage-id differs from a built service image'sclaw.runner.image-idCloses #128