Repository navigation
Description
Problem
nemoclaw onboard resolves and pins the sandbox base image before sandbox creation so the staged Dockerfile builds from the exact base image NemoClaw just fetched. That protects users from stale floating :latest behavior, but it can also add avoidable registry and Docker work on repeat onboard/rebuild flows where the same base image is already present and already resolved locally.
For warm systems, base image resolution should be fast and mostly local. Repeated onboard runs should not pay unnecessary remote pull/digest checks unless the requested base image, NemoClaw source version, platform/ABI requirement, or operator override has changed.
This is separate from cold-cache install UX. #3990 tracks fresh WSL2 installs where large downloads are unavoidable but should show progress and overlap where safe. This issue focuses on warm-cache behavior and base-image resolution policy.
Scope
Cache and prefetch sandbox base image resolution where it is safe to do so, while preserving digest pinning and avoiding stale-base regressions.
Candidate areas:
- Cache the resolved sandbox base image ref/digest in NemoClaw state with enough key material to know when it is still valid.
- Key the cache by architecture/platform, base image name/tag or explicit override, NemoClaw source/release identity, and whether OpenShell sandbox ABI compatibility required a local fallback image.
- Prefer local Docker metadata (
docker image inspect/RepoDigests) for warm-cache validation before attempting remote pulls. - Respect explicit overrides such as
NEMOCLAW_SANDBOX_BASE_IMAGE_REF. - Provide a force-refresh path for
--fresh, an env var, or another explicit operator control if needed. - Optionally prefetch/resolve the likely base image earlier once agent/platform requirements are known, but only under clear cancellation/failure handling.
- Preserve clear offline behavior when a cached base image is usable and clear diagnostics when it is not.
Expected Behavior
On a warm system with the same NemoClaw version and sandbox base already available, repeat onboard/rebuild should reuse the cached local base-image resolution quickly.
If the cache is stale, unsafe, missing, or incompatible with the current platform/ABI requirement, NemoClaw should fall back to the current safe pull-and-resolve behavior.
Operators should be able to force a refresh when they need to verify or update the base image.
Related Work
- Parent performance investigation: perf: investigate and reduce networking latency during onboard and validation #2001
- Parallel onboard orchestration: perf(onboard): parallelize safe onboard waits with cancellation handling #3775
- Profiling traces: perf(onboard): operationalize profiling traces for latency diagnosis #3769
- Performance budget and CI signal: perf(onboard): define onboard performance budget and CI regression signal #3776
- Cold-cache install progress and serial image/model downloads: [WSL2][Install] fresh install + onboard takes 25-30 min with no progress feedback; sandbox image and Ollama model download run serially #3990
- Release-pinned base image refs: Publish release-pinned sandbox base image refs #4052
This issue should coordinate with #4052 but not duplicate it. #4052 is about deterministic release-associated base refs. This issue is about avoiding repeat remote resolution/pull work when the selected base ref is already known and locally available.
Acceptance Criteria
- Warm repeat onboard/rebuild can reuse a locally cached resolved sandbox base image ref/digest when the cache key still matches the current run.
- Cache validation includes platform/architecture and OpenShell sandbox ABI compatibility requirements.
- Explicit base image overrides are respected and do not get replaced by stale cached defaults.
- A force-refresh path bypasses the cache and performs the current safe pull-and-resolve flow.
- Offline warm-cache behavior is clear: usable cached bases work, unusable/missing cached bases fail with actionable guidance.
- Trace output or logs distinguish cache hit, local validation, remote pull/resolve, and local fallback build paths.
- Tests cover cache hit, cache miss, override, force refresh, stale key, ABI-required fallback, offline usable cache, and offline missing cache.
- perf: investigate and reduce networking latency during onboard and validation #2001 or perf(onboard): define onboard performance budget and CI regression signal #3776 is updated with implementation notes or trace evidence if this materially changes onboard timing.
Non-goals
- Changing release tagging or release digest publication policy. See Publish release-pinned sandbox base image refs #4052.
- Eliminating the first-time base image download.
- Parallelizing sandbox-base and model pulls. See [WSL2][Install] fresh install + onboard takes 25-30 min with no progress feedback; sandbox image and Ollama model download run serially #3990 and perf(onboard): parallelize safe onboard waits with cancellation handling #3775.
- Optimizing Dockerfile layer cache behavior after the base image has been selected.
- Changing custom
--fromcontext staging or.dockerignorehandling.
Activity
cv commentedon Jul 3, 2026
Acceptance evidence for the warm base-image resolution work is recorded on #3776: #3776 (comment)
That note distinguishes deterministic no-pull/cache-path evidence from wall-clock benchmarking and links this work to replacement PR #6254. Current targeted lifecycle evidence is being tracked on the PR; hosted-runner timings will be reported as regression evidence rather than an isolated warm/cold A/B claim.
cv commentedon Jul 4, 2026
Final acceptance evidence: #3776 (comment) records the exact-final-head hosted run and timings. Both Hermes rebuild scenarios passed on PR #6254 head
6f19fa26a; the note explicitly treats those times as regression evidence rather than a controlled warm/cold A/B measurement.perf(cli): reuse validated sandbox base images (NVIDIA#6254)
perf(cli): reuse validated sandbox base images (NVIDIA#6254)