Skip to content

feat(onboard): gate buildless managed workloads - #8261

Open
ericksoa wants to merge 15 commits into
mainfrom
feat/buildless-managed-activation-b3d
Open

feat(onboard): gate buildless managed workloads#8261
ericksoa wants to merge 15 commits into
mainfrom
feat/buildless-managed-activation-b3d

Conversation

@ericksoa

@ericksoa ericksoa commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an intentionally hidden experimental activation gate for buildless managed-image onboarding on the current Docker runtime. Normal onboarding remains on the existing Dockerfile path. Passing --temp-managed-runtime opts a new OpenClaw, Hermes, or Deep Agents Code sandbox into the all-agent managed-image and transactional startup-profile path without making that behavior a documented or supported default.

Existing sandboxes that already record managed-image workload authority retain that authority through rebuild and recovery without requiring the temporary flag again.

Related Issue

Refs #7744

Changes

  • adds the hidden --temp-managed-runtime onboarding flag without adding it to usage, examples, command documentation, or quickstarts
  • keeps ordinary stock onboarding and direct-create callers on the current Dockerfile behavior
  • resolves the trusted managed image, release catalog, and startup profile before destructive replacement only for the hidden opt-in or a recorded managed-workload rebuild
  • preserves provider-owned durable bootstrap authority through the runtime-provider contract and Docker recovery journal
  • exercises all three shipped agents through the gated buildless path
  • keeps protected multiarch and GPU/local-inference qualification attached to the experimental path
  • restores public documentation to current main so this PR makes no support claim

The same hidden gate can guard candidate Podman selection while the PR4 implementation is qualified. Removing or replacing the temporary gate and documenting support remains a later evidence-backed activation decision.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: the new opt-in is intentionally hidden and must not be advertised before support qualification
  • 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: pending exact-head CI and advisors
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: no-docs-needed
  • Evidence: public quickstarts, rebuild guidance, and command reference match current main; the hidden experimental flag is absent from usage, examples, and user-facing documentation
  • Agent: Codex Desktop

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit: not applicable; scripts/prepare-dgx-station-host.sh is unchanged
  • Station profile/scenario:
  • Result:
  • Supporting evidence:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run validate:pr passed after refreshing origin/main when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — 103 focused Shields/tunnel/command/gate/all-agent buildless tests, CLI typecheck, repository checks, test-conditional scan, and all changed-file hooks passed locally
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — pending exact-head CI and protected E2E
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Aaron Erickson aerickson@nvidia.com

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This change adds managed-image onboarding, transactional startup profiles, Docker bootstrap authority storage, managed rebuild mutation validation, buildless end-to-end coverage, and updated documentation. Legacy Dockerfile behavior remains available through --from.

Changes

Managed image lifecycle

Layer / File(s) Summary
Docker bootstrap authority
src/lib/onboard/managed-bootstrap/*, src/lib/onboard/runtime-provider/*, related tests
Docker now supports staged journal reuse, durable authority receipts, state-root wiring, and bootstrap contract validation.
Managed workload onboarding
src/lib/onboard/managed-workload/*, src/lib/onboard.ts, src/lib/onboard/sandbox-*, src/lib/onboard/types.ts
Onboarding resolves catalog images, applies startup profiles, launches managed or legacy workloads, and stores workload receipts.
Managed rebuild preparation and validation
src/lib/actions/sandbox/*rebuild*
Managed rebuilds prepare immutable handoffs, skip legacy image preparation, and validate provider-bound authority before deletion.
Buildless validation and risk coverage
test/helpers/managed-image-buildless-e2e.ts, test/onboard-managed-image-buildless-e2e.test.ts, test/pr-*.test.ts, tools/advisors/risk-plan.mts
Tests verify managed launches without Docker builds, fallback behavior, workload-source resolution, and protected-runtime requirements.
Managed-image documentation
docs/get-started/*, docs/manage-sandboxes/*, docs/reference/commands.mdx
Documentation describes catalog-selected images, startup profiles, managed rebuilds, and the legacy --from path.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Suggested labels: platform: container

Suggested reviewers: cv, jyaunches, senthilr-nv

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.73% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: enabling gated, buildless onboarding for managed workloads.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/buildless-managed-activation-b3d

Comment @coderabbitai help to get the list of available commands.

@github-code-quality

github-code-quality Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit da4fce1 in the feat/buildless-manag... branch remains at 96%, unchanged from commit 5fe2319 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit da4fce1 in the feat/buildless-manag... branch remains at 81%, unchanged from commit 5fe2319 in the main branch.

Show a code coverage summary of the most impacted files.
File main 5fe2319 feat/buildless-manag... da4fce1 +/-
src/lib/onboard...mage/catalog.ts 88% 64% -24%
src/lib/actions...orchestrator.ts 87% 67% -20%
src/lib/onboard...box-prebuild.ts 92% 74% -18%
src/lib/onboard...-transaction.ts 81% 66% -15%
src/lib/onboard...cker-journal.ts 84% 69% -15%
src/lib/onboard...strap/docker.ts 69% 60% -9%
src/lib/onboard...file-builder.ts 91% 83% -8%
src/lib/onboard...mage-runtime.ts 50% 46% -4%
src/lib/shields/index.ts 73% 77% +4%
src/lib/onboard...hority-store.ts 0% 87% +87%

Updated August 05, 2026 04:04 UTC

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / low confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: PR review advisor skipped: OpenShell inference configuration failed or the advisor credential is unavailable

Model lanes

  • GPT-5.6 Terra (primary): Skipped
  • Nemotron 3 Ultra (second opinion): Skipped

Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: cloud-inference, cloud-onboard, managed-image-multiarch-startup, managed-image-protected-runtime, security-posture, full-e2e, hermes-e2e, inference-routing, network-policy, onboard-repair, onboard-resume, rebuild-openclaw, state-backup-restore, onboard-managed-image-buildless-e2e

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/lib/actions/sandbox/rebuild-dcode-orchestrator.ts (1)

252-284: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Report the managed path failure with an accurate message.

The managed branch prepares no replacement, but a failure still reports "DCode replacement validation failed before sandbox deletion.". The operator sees a replacement-artifact message for a managed workload authority failure at the delete edge. Select the message from managedWorkloadRebuild.

🐛 Proposed message fix
         if (!valid) {
           scope.cleanup();
           return {
             ok: false,
-            message: "DCode replacement validation failed before sandbox deletion.",
+            message: managedWorkloadRebuild
+              ? "Managed DCode workload validation failed before sandbox deletion."
+              : "DCode replacement validation failed before sandbox deletion.",
           };
         }
🤖 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-dcode-orchestrator.ts` around lines 252 -
284, Update the failure message in the !valid branch of the
managedWorkloadRebuild/revalidateDcodeReplacementAtMutationEdge flow to select
an accurate message based on managedWorkloadRebuild, using a managed-workload
authority failure message for the managed path and retaining the existing
replacement validation message for the replacement path.
🧹 Nitpick comments (14)
tools/advisors/risk-plan.mts (2)

485-485: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Reuse the existing multiarch job constant.

Line 464 refers to the same job through PROTECTED_MANAGED_IMAGE_MULTIARCH_JOB_ID. Line 485 spells the identifier as a literal. Two spellings for one job id can drift silently, and the advisor guidance requires deriving inventories from a canonical source.

♻️ Proposed constant reuse
-    requiredJobs: [MANAGED_IMAGE_PROTECTED_RUNTIME_JOB_ID, "managed-image-multiarch-startup"],
+    requiredJobs: [
+      MANAGED_IMAGE_PROTECTED_RUNTIME_JOB_ID,
+      PROTECTED_MANAGED_IMAGE_MULTIARCH_JOB_ID,
+    ],

Based on path instructions for tools/{advisors,pr-review-advisor}/**: "Derive inventories and limits from a canonical source where possible; flag duplicated lists that can silently drift", and the coding guideline "Use existing repository vocabulary and one name per concept".

🤖 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 `@tools/advisors/risk-plan.mts` at line 485, Replace the literal
"managed-image-multiarch-startup" in the requiredJobs list with the existing
PROTECTED_MANAGED_IMAGE_MULTIARCH_JOB_ID constant used elsewhere in this
advisor, while leaving MANAGED_IMAGE_PROTECTED_RUNTIME_JOB_ID unchanged.

Sources: Coding guidelines, Path instructions


79-87: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Bound the rebuild prefix and note the workflow boundary.

Two points apply to this prefix list.

First, "src/lib/actions/sandbox/rebuild" has no separator or dot boundary. The other entries end with / or ., so they bind to a directory or a filename stem. This entry matches any future path whose basename merely starts with rebuild, and it therefore selects a tier-3 protected job for unrelated files.

Second, the sibling managed-image-multiarch family carries a comment at lines 471-474 that requires keeping its source boundary synchronized with the managed-image workflow path filter. This new set is a second hand-maintained copy of a workflow path filter with no equivalent note. Add the same synchronization note, or derive both boundaries from one source.

♻️ Proposed prefix boundary
 const MANAGED_IMAGE_PROTECTED_RUNTIME_INPUT_PREFIXES = [
   "scripts/checks/run-managed-image-openshell-e2e.",
-  "src/lib/actions/sandbox/rebuild",
+  "src/lib/actions/sandbox/rebuild-",
   "src/lib/onboard/managed-bootstrap/",

Based on path instructions for tools/{advisors,pr-review-advisor}/**: "Derive inventories and limits from a canonical source where possible; flag duplicated lists that can silently drift."

🤖 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 `@tools/advisors/risk-plan.mts` around lines 79 - 87, Bound the
"src/lib/actions/sandbox/rebuild" entry with the appropriate directory or
filename separator so it cannot match unrelated paths beginning with “rebuild”.
Add the workflow path-filter synchronization note used by the
managed-image-multiarch family, or refactor both lists to derive their
boundaries from a shared canonical source; update
MANAGED_IMAGE_PROTECTED_RUNTIME_INPUT_PREFIXES and the related workflow boundary
together.

Source: Path instructions

test/helpers/managed-image-buildless-e2e.ts (2)

80-92: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Align the workload payload type with the asserted fields.

The declared workload shape omits platform, sourceCohort, and encodedProfile. Lines 716-730 assert all three with toEqual. The interface no longer documents the receipt that this fixture validates. Add the missing optional fields.

♻️ Proposed type completion
     workload?: {
       schemaVersion?: number;
       kind?: string;
       reference?: string;
+      platform?: string;
       release?: string;
       sourceRevision?: string;
+      sourceCohort?: string;
       capabilityContractVersion?: number;
       startupProfileContractVersion?: number;
+      encodedProfile?: string;
       startupProfileSha256?: string;
       credentialProxyReplayRequired?: boolean;
       shared?: boolean;
     };
🤖 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 `@test/helpers/managed-image-buildless-e2e.ts` around lines 80 - 92, Update the
workload payload type in the managed image fixture to include optional platform,
sourceCohort, and encodedProfile fields, matching the fields asserted later in
the fixture while preserving the existing workload properties.

31-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Select the fixture platform by value.

MANAGED_IMAGE_PLATFORMS[0] currently matches the forced "x64" platform. If the array order changes, the fixture can select "linux/arm64" while runtime negotiation resolves "x64" to "linux/amd64", causing the registration assertion to fail. Set the fixture platform explicitly to "linux/amd64".

🤖 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 `@test/helpers/managed-image-buildless-e2e.ts` at line 31, Update
MANAGED_IMAGE_PLATFORM to explicitly use the "linux/amd64" platform value
instead of selecting MANAGED_IMAGE_PLATFORMS[0], so the fixture remains aligned
with the runtime’s x64 platform resolution regardless of array order.
test/pr-risk-plan.test.ts (1)

386-417: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a negative case for the protected-runtime prefixes.

This test proves detection for four in-scope paths. It does not prove that an out-of-scope path stays out of the family. The new prefixes in tools/advisors/risk-plan.mts are broad. "src/lib/actions/sandbox/rebuild" has no trailing separator, and "src/lib/onboard/workload/" covers a whole directory. Add one assertion that a near-miss path does not activate managed-image-protected-runtime.

🧪 Proposed false-positive assertion
     expect(riskPlanRequiredJobIds(activatedImplementation)).toEqual(
       expect.arrayContaining([
         "managed-image-multiarch-startup",
         "managed-image-protected-runtime",
       ]),
     );
+    const nearMiss = plan("src/lib/actions/sandbox/status-phase.ts");
+    expect(
+      nearMiss.families.some((family) => family.id === "managed-image-protected-runtime"),
+    ).toBe(false);

Based on path instructions for tools/{advisors,pr-review-advisor}/**: "Require focused tests for both detection and false-positive behavior."

🤖 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 `@test/pr-risk-plan.test.ts` around lines 386 - 417, Add a negative assertion
to the test covering the protected-runtime family: run plan with a near-miss
path such as “src/lib/actions/sandbox/rebuild” or an out-of-scope path under the
broad workload prefix, then verify the resulting families do not contain
“managed-image-protected-runtime”. Keep the existing positive detection and
required-job assertions unchanged.

Source: Path instructions

src/lib/onboard/managed-workload/onboard-orchestration.ts (2)

157-190: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Move the inference resolution inside the memoization.

preparedProfile is memoized, but lines 157-169 run resolveAgentInferenceApi and getSandboxInferenceConfig on every call. ensurePreparedProfile is called at least three times per onboarding run (pre-delete, post-delete, and receipt construction), so the resolution repeats without effect. Compute it only when the profile is not yet built.

♻️ Proposed refactor
-    const inferenceApi =
-      input.agentName === "langchain-deepagents-code"
-        ? "openai-completions"
-        : dependencies.resolveAgentInferenceApi(
-            input.agentName,
-            input.provider,
-            input.preferredInferenceApi,
-          );
-    const inference: SandboxInferenceConfig = dependencies.getSandboxInferenceConfig(
-      input.model,
-      input.provider,
-      inferenceApi,
-    );
-    preparedProfile ??= buildManagedStartupOnboardProfile({
+    if (preparedProfile) return preparedProfile;
+    const inferenceApi =
+      input.agentName === "langchain-deepagents-code"
+        ? "openai-completions"
+        : dependencies.resolveAgentInferenceApi(
+            input.agentName,
+            input.provider,
+            input.preferredInferenceApi,
+          );
+    const inference: SandboxInferenceConfig = dependencies.getSandboxInferenceConfig(
+      input.model,
+      input.provider,
+      inferenceApi,
+    );
+    preparedProfile = buildManagedStartupOnboardProfile({
🤖 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/onboard/managed-workload/onboard-orchestration.ts` around lines 157 -
190, Move the inference resolution block containing resolveAgentInferenceApi and
getSandboxInferenceConfig inside the preparedProfile ??= initialization in
ensurePreparedProfile. Ensure both calls execute only when the memoized profile
is first constructed, while preserving the existing profile fields and return
behavior for subsequent calls.

192-194: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the resolveCreateIntent identity seam or give it a current consumer.

resolveCreateIntent returns its argument unchanged, and prepareOnboardSandboxWorkloadLaunch calls it at line 281 only to pass the intent through. It is an extension point with no current requirement and no protecting test. Either delete it and pass input.plan.intent directly, or implement the managed-image intent adjustment it is intended to own.

As per coding guidelines: "Do not add configuration, fallback, migration, compatibility, or extension layers without a current requirement; identify the current consumer and protecting test."

🤖 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/onboard/managed-workload/onboard-orchestration.ts` around lines 192 -
194, Remove the unused resolveCreateIntent identity seam and update
prepareOnboardSandboxWorkloadLaunch to pass input.plan.intent directly,
eliminating the helper and its call without adding replacement extension logic.

Source: Coding guidelines

src/lib/onboard/sandbox-create-plan.test.ts (1)

88-88: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a case that passes a managed image reference as fromRef.

All three fixtures still use a Dockerfile path, so the tests only prove the previous behavior through the renamed field. The reason for the rename is that materializeSandboxCreatePlan must now emit an image reference verbatim without appending /Dockerfile. Add one case that passes a managed image reference and asserts createArgs contains --from followed by that exact reference.

As per path instructions: "Migration tests must prove the superseded path is unreachable or removed, not merely prove that the new path also works."

Also applies to: 260-260, 331-331

🤖 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/onboard/sandbox-create-plan.test.ts` at line 88, Extend the fixtures
in sandbox-create-plan tests to include a managed image reference as fromRef,
and assert materializeSandboxCreatePlan produces createArgs with --from followed
by the exact reference unchanged. Ensure the test demonstrates no /Dockerfile
suffix is appended, while preserving the existing Dockerfile-path cases.

Source: Path instructions

src/lib/onboard/machine/handlers/provider-inference.ts (1)

974-974: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the unused provider-inference estimate dependencies.

provider-inference.ts no longer calls assessHost or formatSandboxBuildEstimateNote. Remove both dependency members, their onboard.ts wiring, and the corresponding test fixture fields. Keep the estimate owned by fallbackBuildEstimate.

🤖 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/onboard/machine/handlers/provider-inference.ts` at line 974, Remove
the unused assessHost and formatSandboxBuildEstimateNote dependency members from
the provider-inference handler, along with their wiring in onboard.ts and
corresponding test fixture fields. Preserve estimate ownership through
fallbackBuildEstimate and remove only the obsolete dependency paths.

Source: Path instructions

src/lib/onboard/sandbox-create-plan.ts (1)

155-157: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Delete the unused prepareSandboxCreatePlan wrapper and its wrapper-specific tests.

src/lib/onboard.ts passes materializeSandboxCreatePlan directly to the managed workload orchestration path, and no production code calls prepareSandboxCreatePlan. Remove its test cases and sandbox-create-plan-extra-providers.test.ts; this also removes the duplicate ${buildCtx}/Dockerfile construction. Keep the shared intent and materialization exports.

🤖 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/onboard/sandbox-create-plan.ts` around lines 155 - 157, Remove the
unused prepareSandboxCreatePlan wrapper and its wrapper-specific tests,
including sandbox-create-plan-extra-providers.test.ts. Update related imports
and references so the managed workload path continues using
materializeSandboxCreatePlan directly, while preserving the shared intent and
materialization exports and eliminating duplicate ${buildCtx}/Dockerfile
construction.

Source: Path instructions

src/lib/actions/sandbox/rebuild-managed-workload-mutation-guard.test.ts (2)

20-22: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Drop the redundant mock teardown.

The cli Vitest project already enables restoreMocks, so vi.restoreAllMocks() in afterEach repeats project-level isolation. Remove the hook.

Based on learnings: "Vitest test files under src (e.g., *.test.ts) are executed by the cli Vitest project, which imports test/helpers/vitest-state-isolation.ts and enables clearMocks, restoreMocks, unstubEnvs, and unstubGlobals."

🤖 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-managed-workload-mutation-guard.test.ts`
around lines 20 - 22, Remove the redundant afterEach hook containing
vi.restoreAllMocks() from the test file; rely on the cli Vitest project's
existing restoreMocks configuration for mock teardown.

Source: Learnings


24-43: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover the fail-closed branches instead of stubbing the decision itself.

The first two tests stub managedWorkloadRebuildHandoffMatchesEntry, which is the exact comparison the guard exists to enforce. They prove only that the guard forwards a boolean. The behavior that protects the delete edge is untested:

  • registry.getSandbox returns null, so provider stays null and the guard must fail closed.
  • requireRuntimeProviderBundleForSandbox throws for an unrecognized openshellDriver, so the catch must fail closed.
  • The persisted receipt, contract, or profile differs from the handoff, so the real matcher must return false.

Add cases for the two branches above with the real matcher, and drive the third case through a persisted entry rather than a stub.

💚 Proposed additional cases
+  it("blocks deletion when the sandbox entry disappeared", () => {
+    vi.spyOn(registry, "getSandbox").mockReturnValue(null);
+
+    expect(revalidateManagedWorkloadRebuildBeforeDelete("alpha", handoff)).toEqual({
+      ok: false,
+      message: "Managed workload authority changed before sandbox deletion.",
+    });
+  });
+
+  it("blocks deletion when the recorded runtime provider is unknown", () => {
+    vi.spyOn(registry, "getSandbox").mockReturnValue({
+      ...entry,
+      openshellDriver: "not-a-provider",
+    } as SandboxEntry);
+
+    expect(revalidateManagedWorkloadRebuildBeforeDelete("alpha", handoff)).toEqual({
+      ok: false,
+      message: "Managed workload authority changed before sandbox deletion.",
+    });
+  });

As per path instructions: "Flag copied production algorithms, broad mocks that bypass the behavior under test, and conditionals that make a test pass without exercising its claim."

🤖 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-managed-workload-mutation-guard.test.ts`
around lines 24 - 43, Replace the boolean stubs in the tests around
revalidateManagedWorkloadRebuildBeforeDelete with real matcher coverage: add a
case where registry.getSandbox returns null and assert fail-closed rejection,
add a case where requireRuntimeProviderBundleForSandbox throws for an unknown
openshellDriver and assert the catch rejects, and add a mismatch case using a
persisted entry whose receipt, contract, or profile differs from handoff. Keep
the legacy undefined-handoff case unchanged.

Source: Path instructions

src/lib/actions/sandbox/rebuild-dcode-orchestrator.test.ts (1)

119-151: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extend managed coverage to the delete-edge branches.

This test covers prepareImage only. The same change adds managed branches to revalidateBeforeDelete and checkAtDeleteEdge, and checkAtDeleteEdge now permits a null preparedReplacement. Those branches guard sandbox deletion, and they are untested. Add cases that assert:

  • revalidateBeforeDelete returns the managed revalidation result and never reaches the "DCode replacement preflight was not retained." bail when managedWorkloadRebuild is true.
  • checkAtDeleteEdge returns { ok: false } when the managed revalidation resolves false, and returns a captured bail message when the managed revalidation calls bail.

As per path instructions: "Migration tests must prove the superseded path is unreachable or removed, not merely prove that the new path also works."

🤖 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-dcode-orchestrator.test.ts` around lines 119
- 151, Extend the managed-workload tests around revalidateBeforeDelete and
checkAtDeleteEdge to cover both delete-edge branches. Assert
revalidateBeforeDelete returns the managed revalidation result without invoking
the “DCode replacement preflight was not retained.” bail; assert
checkAtDeleteEdge returns { ok: false } when revalidation resolves false and
captures the bail message when revalidation invokes bail, including the null
preparedReplacement path.

Source: Path instructions

src/lib/actions/sandbox/agents/managed-workload-rebuild-profile.ts (1)

89-92: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Replace the as assertion with a validated narrowing.

inference.inferenceApi is asserted into the three-member union without a runtime check. If resolveManagedStartupInferenceRoute returns any other API string, the invalid value is frozen into the replacement profile and only fails later, after the rebuild has committed to the handoff. Narrow the value with an explicit check so the failure occurs while the old workload is still authoritative.

♻️ Proposed validated narrowing
+const MANAGED_STARTUP_INFERENCE_APIS = [
+  "openai-completions",
+  "openai-responses",
+  "anthropic-messages",
+] as const;
+type ManagedStartupInferenceApi = (typeof MANAGED_STARTUP_INFERENCE_APIS)[number];
+
+function requireManagedStartupInferenceApi(api: string): ManagedStartupInferenceApi {
+  if (!(MANAGED_STARTUP_INFERENCE_APIS as readonly string[]).includes(api)) {
+    throw new Error(`Unsupported managed startup inference API '${api}'.`);
+  }
+  return api as ManagedStartupInferenceApi;
+}
-        api: inference.inferenceApi as
-          | "openai-completions"
-          | "openai-responses"
-          | "anthropic-messages",
+        api: requireManagedStartupInferenceApi(inference.inferenceApi),
🤖 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/agents/managed-workload-rebuild-profile.ts` around
lines 89 - 92, In the replacement-profile construction around
resolveManagedStartupInferenceRoute, replace the inference.inferenceApi type
assertion with an explicit runtime validation against the supported
"openai-completions", "openai-responses", and "anthropic-messages" values.
Reject or propagate an error for any other value before constructing or
committing the replacement profile, while preserving the narrowed union for
valid APIs.
🤖 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/onboard/managed-bootstrap/docker-authority-store.ts`:
- Around line 87-102: Update recordPreparedAuthority() to load the existing
journal before generating a new receipt or calling journalStore.create(): return
the existing preparationReceipt when sameJournal-compatible prepared authority
data matches, and reject an existing identity with mismatched data. Preserve the
current durability verification for newly created journals, and add a retry test
using two distinct clocks with a fixture that rejects duplicate creation instead
of overwriting journals.

In `@src/lib/onboard/managed-bootstrap/docker-runtime.ts`:
- Around line 281-288: Update createDockerManagedBootstrapSurface so the
lifecycle adapter receives the canonical Docker journal store, using the same
stateRoot-derived store passed by createAuthorityStore. Ensure
createDockerLifecycle’s adapter creation includes the required journalStore (and
stateRoot where applicable), and add coverage for both activation and resume
recovery.

In `@test/helpers/managed-image-buildless-e2e.ts`:
- Line 582: Update the onboarding setup around NEMOCLAW_TEST_SECRET_CANARY so
the canary is consumed by a real startup-profile reader. Either add the
onboarding read path for this variable or replace it with the existing
environment variable consumed by the startup profile builder, ensuring the test
validates actual secret propagation rather than only injection.

In `@test/onboard-managed-image-buildless-e2e.test.ts`:
- Around line 11-12: Increase the timeout for the “launches every shipped agent
by immutable image and startup profile without Dockerfile work (`#7744`)” test
above the combined 180-second child budget, leaving sufficient margin for
fixture setup and teardown so each child’s spawnSync timeout is reported first.

In `@test/onboard-messaging.test.ts`:
- Around line 47-49: Restore NEMOCLAW_TEST_MANAGED_IMAGE_FALLBACK after each
test instead of leaving the raw process.env assignment in place. Update the
hooks in test/onboard-messaging.test.ts lines 47-49,
test/onboard-sandbox-build.test.ts lines 19-21, and
test/onboard-sandbox-recreation.test.ts lines 14-16 to use vi.stubEnv with
existing cleanup or explicitly restore/delete the prior value in afterEach.

---

Outside diff comments:
In `@src/lib/actions/sandbox/rebuild-dcode-orchestrator.ts`:
- Around line 252-284: Update the failure message in the !valid branch of the
managedWorkloadRebuild/revalidateDcodeReplacementAtMutationEdge flow to select
an accurate message based on managedWorkloadRebuild, using a managed-workload
authority failure message for the managed path and retaining the existing
replacement validation message for the replacement path.

---

Nitpick comments:
In `@src/lib/actions/sandbox/agents/managed-workload-rebuild-profile.ts`:
- Around line 89-92: In the replacement-profile construction around
resolveManagedStartupInferenceRoute, replace the inference.inferenceApi type
assertion with an explicit runtime validation against the supported
"openai-completions", "openai-responses", and "anthropic-messages" values.
Reject or propagate an error for any other value before constructing or
committing the replacement profile, while preserving the narrowed union for
valid APIs.

In `@src/lib/actions/sandbox/rebuild-dcode-orchestrator.test.ts`:
- Around line 119-151: Extend the managed-workload tests around
revalidateBeforeDelete and checkAtDeleteEdge to cover both delete-edge branches.
Assert revalidateBeforeDelete returns the managed revalidation result without
invoking the “DCode replacement preflight was not retained.” bail; assert
checkAtDeleteEdge returns { ok: false } when revalidation resolves false and
captures the bail message when revalidation invokes bail, including the null
preparedReplacement path.

In `@src/lib/actions/sandbox/rebuild-managed-workload-mutation-guard.test.ts`:
- Around line 20-22: Remove the redundant afterEach hook containing
vi.restoreAllMocks() from the test file; rely on the cli Vitest project's
existing restoreMocks configuration for mock teardown.
- Around line 24-43: Replace the boolean stubs in the tests around
revalidateManagedWorkloadRebuildBeforeDelete with real matcher coverage: add a
case where registry.getSandbox returns null and assert fail-closed rejection,
add a case where requireRuntimeProviderBundleForSandbox throws for an unknown
openshellDriver and assert the catch rejects, and add a mismatch case using a
persisted entry whose receipt, contract, or profile differs from handoff. Keep
the legacy undefined-handoff case unchanged.

In `@src/lib/onboard/machine/handlers/provider-inference.ts`:
- Line 974: Remove the unused assessHost and formatSandboxBuildEstimateNote
dependency members from the provider-inference handler, along with their wiring
in onboard.ts and corresponding test fixture fields. Preserve estimate ownership
through fallbackBuildEstimate and remove only the obsolete dependency paths.

In `@src/lib/onboard/managed-workload/onboard-orchestration.ts`:
- Around line 157-190: Move the inference resolution block containing
resolveAgentInferenceApi and getSandboxInferenceConfig inside the
preparedProfile ??= initialization in ensurePreparedProfile. Ensure both calls
execute only when the memoized profile is first constructed, while preserving
the existing profile fields and return behavior for subsequent calls.
- Around line 192-194: Remove the unused resolveCreateIntent identity seam and
update prepareOnboardSandboxWorkloadLaunch to pass input.plan.intent directly,
eliminating the helper and its call without adding replacement extension logic.

In `@src/lib/onboard/sandbox-create-plan.test.ts`:
- Line 88: Extend the fixtures in sandbox-create-plan tests to include a managed
image reference as fromRef, and assert materializeSandboxCreatePlan produces
createArgs with --from followed by the exact reference unchanged. Ensure the
test demonstrates no /Dockerfile suffix is appended, while preserving the
existing Dockerfile-path cases.

In `@src/lib/onboard/sandbox-create-plan.ts`:
- Around line 155-157: Remove the unused prepareSandboxCreatePlan wrapper and
its wrapper-specific tests, including
sandbox-create-plan-extra-providers.test.ts. Update related imports and
references so the managed workload path continues using
materializeSandboxCreatePlan directly, while preserving the shared intent and
materialization exports and eliminating duplicate ${buildCtx}/Dockerfile
construction.

In `@test/helpers/managed-image-buildless-e2e.ts`:
- Around line 80-92: Update the workload payload type in the managed image
fixture to include optional platform, sourceCohort, and encodedProfile fields,
matching the fields asserted later in the fixture while preserving the existing
workload properties.
- Line 31: Update MANAGED_IMAGE_PLATFORM to explicitly use the "linux/amd64"
platform value instead of selecting MANAGED_IMAGE_PLATFORMS[0], so the fixture
remains aligned with the runtime’s x64 platform resolution regardless of array
order.

In `@test/pr-risk-plan.test.ts`:
- Around line 386-417: Add a negative assertion to the test covering the
protected-runtime family: run plan with a near-miss path such as
“src/lib/actions/sandbox/rebuild” or an out-of-scope path under the broad
workload prefix, then verify the resulting families do not contain
“managed-image-protected-runtime”. Keep the existing positive detection and
required-job assertions unchanged.

In `@tools/advisors/risk-plan.mts`:
- Line 485: Replace the literal "managed-image-multiarch-startup" in the
requiredJobs list with the existing PROTECTED_MANAGED_IMAGE_MULTIARCH_JOB_ID
constant used elsewhere in this advisor, while leaving
MANAGED_IMAGE_PROTECTED_RUNTIME_JOB_ID unchanged.
- Around line 79-87: Bound the "src/lib/actions/sandbox/rebuild" entry with the
appropriate directory or filename separator so it cannot match unrelated paths
beginning with “rebuild”. Add the workflow path-filter synchronization note used
by the managed-image-multiarch family, or refactor both lists to derive their
boundaries from a shared canonical source; update
MANAGED_IMAGE_PROTECTED_RUNTIME_INPUT_PREFIXES and the related workflow boundary
together.
🪄 Autofix

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: dee4ce77-54b5-44d6-9770-890d82044252

📥 Commits

Reviewing files that changed from the base of the PR and between 0d1cb93 and 8672699.

📒 Files selected for processing (42)
  • docs/get-started/quickstart-hermes.mdx
  • docs/get-started/quickstart-langchain-deepagents-code.mdx
  • docs/get-started/quickstart.mdx
  • docs/manage-sandboxes/recover-rebuild-sandboxes.mdx
  • docs/reference/commands.mdx
  • src/lib/actions/sandbox/agents/managed-workload-rebuild-profile.ts
  • src/lib/actions/sandbox/rebuild-dcode-orchestrator.test.ts
  • src/lib/actions/sandbox/rebuild-dcode-orchestrator.ts
  • src/lib/actions/sandbox/rebuild-dcode-preflight.ts
  • src/lib/actions/sandbox/rebuild-gpu-opt-out.ts
  • src/lib/actions/sandbox/rebuild-managed-workload-mutation-guard.test.ts
  • src/lib/actions/sandbox/rebuild-pipeline.ts
  • src/lib/actions/sandbox/rebuild-preflight-guards.ts
  • src/lib/actions/sandbox/rebuild-preflight-phase.ts
  • src/lib/actions/sandbox/rebuild-preflight-target-phase.ts
  • src/lib/onboard.ts
  • src/lib/onboard/machine/handlers/provider-inference.ts
  • src/lib/onboard/managed-bootstrap/docker-authority-store.test.ts
  • src/lib/onboard/managed-bootstrap/docker-authority-store.ts
  • src/lib/onboard/managed-bootstrap/docker-runtime.ts
  • src/lib/onboard/managed-bootstrap/docker.ts
  • src/lib/onboard/managed-workload/onboard-orchestration.ts
  • src/lib/onboard/runtime-provider/contract.ts
  • src/lib/onboard/runtime-provider/docker.ts
  • src/lib/onboard/runtime-provider/registry.ts
  • src/lib/onboard/runtime-provider/runtime-provider-contract.test.ts
  • src/lib/onboard/sandbox-create-intent-types.ts
  • src/lib/onboard/sandbox-create-plan-materialization.ts
  • src/lib/onboard/sandbox-create-plan.test.ts
  • src/lib/onboard/sandbox-create-plan.ts
  • src/lib/onboard/sandbox-gpu-create-flow.test.ts
  • src/lib/onboard/types.ts
  • test/e2e/support/e2e-cross-runtime-compatibility.test.ts
  • test/helpers/managed-image-buildless-e2e.ts
  • test/helpers/onboard-script-mocks.cjs
  • test/onboard-managed-image-buildless-e2e.test.ts
  • test/onboard-messaging.test.ts
  • test/onboard-sandbox-build.test.ts
  • test/onboard-sandbox-recreation.test.ts
  • test/pr-e2e-gate.test.ts
  • test/pr-risk-plan.test.ts
  • tools/advisors/risk-plan.mts

Comment thread src/lib/onboard/managed-bootstrap/docker-authority-store.ts
Comment thread src/lib/onboard/managed-bootstrap/docker-runtime.ts
Comment thread test/helpers/managed-image-buildless-e2e.ts Outdated
Comment thread test/onboard-managed-image-buildless-e2e.test.ts Outdated
Comment thread test/onboard-messaging.test.ts
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@wscurran wscurran added area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow feature PR adds or expands user-visible functionality integration: dcode LangChain Deep Code integration behavior integration: hermes Hermes integration behavior integration: openclaw OpenClaw integration behavior labels Aug 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/lib/onboard/managed-bootstrap/docker-runtime.test.ts (1)

36-110: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Always remove the temporary state directory.

If setup or an assertion after Line 36 throws, Line 110 does not run. The test then leaves a temporary directory on the test host. Put the lifecycle setup and assertions in try / finally, or remove the directory from afterEach.

Based on learnings, only clean up resources Vitest does not manage, such as temporary directories and 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 `@src/lib/onboard/managed-bootstrap/docker-runtime.test.ts` around lines 36 -
110, Ensure the temporary directory created by stateRoot is removed regardless
of setup, lifecycle execution, or assertion failures. Wrap the lifecycle setup
and assertions in a try/finally block that always calls fs.rmSync for stateRoot,
or use an equivalent test cleanup hook; only add cleanup for this manually
managed filesystem resource.

Source: Learnings

🤖 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.

Outside diff comments:
In `@src/lib/onboard/managed-bootstrap/docker-runtime.test.ts`:
- Around line 36-110: Ensure the temporary directory created by stateRoot is
removed regardless of setup, lifecycle execution, or assertion failures. Wrap
the lifecycle setup and assertions in a try/finally block that always calls
fs.rmSync for stateRoot, or use an equivalent test cleanup hook; only add
cleanup for this manually managed filesystem resource.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: bd6bfd92-fcf4-4e4b-b650-f06fdd7a01f1

📥 Commits

Reviewing files that changed from the base of the PR and between f83d8db and 18de09f.

📒 Files selected for processing (36)
  • ci/source-shape-test-budget.json
  • scripts/checks/run-managed-image-openshell-e2e.ts
  • src/lib/actions/sandbox/agents/managed-workload-rebuild-profile.ts
  • src/lib/actions/sandbox/rebuild-dcode-orchestrator.test.ts
  • src/lib/actions/sandbox/rebuild-dcode-orchestrator.ts
  • src/lib/actions/sandbox/rebuild-managed-workload-mutation-guard.test.ts
  • src/lib/onboard.ts
  • src/lib/onboard/machine/core-flow-phases.test.ts
  • src/lib/onboard/machine/handlers/provider-inference-route-containment.test.ts
  • src/lib/onboard/machine/handlers/provider-inference.test-support.ts
  • src/lib/onboard/machine/handlers/provider-inference.ts
  • src/lib/onboard/managed-bootstrap/docker-authority-store.test.ts
  • src/lib/onboard/managed-bootstrap/docker-authority-store.ts
  • src/lib/onboard/managed-bootstrap/docker-runtime.test.ts
  • src/lib/onboard/managed-bootstrap/docker-runtime.ts
  • src/lib/onboard/managed-bootstrap/docker-test-fixture.ts
  • src/lib/onboard/managed-bootstrap/runtime-create.ts
  • src/lib/onboard/managed-workload/onboard-orchestration.ts
  • src/lib/onboard/sandbox-create-intent-types.ts
  • src/lib/onboard/sandbox-create-plan-extra-providers.test.ts
  • src/lib/onboard/sandbox-create-plan.test.ts
  • src/lib/onboard/sandbox-create-plan.ts
  • src/lib/onboard/sandbox-gpu-create-flow.test.ts
  • src/lib/onboard/sandbox-gpu-create-flow.ts
  • src/lib/onboard/sandbox-gpu-create-run-attempt.ts
  • test/helpers/managed-image-buildless-e2e.ts
  • test/onboard-managed-image-buildless-e2e.test.ts
  • test/onboard-messaging.test.ts
  • test/onboard-prepared-build-context.test.ts
  • test/onboard-sandbox-build.test.ts
  • test/onboard-sandbox-recreation.test.ts
  • test/onboard-terminal-dashboard.test.ts
  • test/pr-e2e-gate-signal-shards.test.ts
  • test/pr-risk-plan.test.ts
  • test/runtime-provider-source-shape.test.ts
  • tools/advisors/risk-plan.mts
💤 Files with no reviewable changes (7)
  • src/lib/onboard/sandbox-create-plan-extra-providers.test.ts
  • src/lib/onboard/machine/core-flow-phases.test.ts
  • src/lib/onboard/machine/handlers/provider-inference.test-support.ts
  • src/lib/onboard/sandbox-create-plan.ts
  • src/lib/onboard/machine/handlers/provider-inference.ts
  • src/lib/onboard/machine/handlers/provider-inference-route-containment.test.ts
  • src/lib/onboard.ts
🚧 Files skipped from review as they are similar to previous changes (10)
  • test/onboard-sandbox-recreation.test.ts
  • src/lib/onboard/sandbox-gpu-create-flow.test.ts
  • src/lib/onboard/managed-bootstrap/docker-runtime.ts
  • test/onboard-sandbox-build.test.ts
  • test/pr-risk-plan.test.ts
  • tools/advisors/risk-plan.mts
  • test/onboard-messaging.test.ts
  • src/lib/onboard/managed-bootstrap/docker-authority-store.ts
  • test/helpers/managed-image-buildless-e2e.ts
  • src/lib/onboard/managed-workload/onboard-orchestration.ts

@ericksoa ericksoa self-assigned this Aug 4, 2026
@copy-pr-bot

copy-pr-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@ericksoa ericksoa changed the title feat(onboard): activate buildless managed workloads feat(onboard): gate buildless managed workloads Aug 5, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Aug 5, 2026
23 tasks
ericksoa and others added 3 commits August 4, 2026 23:55
## Summary

Adds the dormant, provider-scoped Podman command/preflight/start-stop
boundary and proves it against a real rootless Podman 5 service with
Docker disabled. The provider remains absent from the production
registry: this PR does not activate or advertise Podman support.

Stacked on #8261. Part of #7744.

## Related Issue

Part of #7744.

## Changes

- Adds an immutable operation-scoped container-engine command contract
and a Podman adapter pinned to one qualified Unix-socket authority.
- Adds Linux amd64/arm64 rootless Podman 5 preflight, subordinate
UID/GID and cgroups v2 validation, and exact labeled-container
start/stop semantics.
- Adds an inert Podman runtime bundle with only host doctor and direct
CPU lifecycle capabilities; managed bootstrap, snapshots, recovery,
cleanup, GPU, local inference, and production selection remain
explicitly unsupported for later slices.
- Adds unit coverage across OpenClaw, Hermes, and Deep Agents Code while
keeping the production registry limited to qualified providers.
- Adds a credential-free Ubuntu 26.04 PR proof that disables and masks
Docker, guards every Docker CLI resolution, starts one exact rootless
Podman API socket, and proves all three agents preserve immutable
container identity across stop/start/restart.
- The abstraction is required so Podman and future MXC-style providers
can inject engine-specific operations without central Podman switches.
Directly changing existing Docker helpers would violate the
runtime-provider capability boundary; the registry/source-shape and
rootless workflow tests protect that seam.

## Type of Change

- [x] Code change (feature, bug fix, or refactor)
- [ ] 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:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: the Podman bundle is
deliberately absent from production selection and this PR exposes no
user-facing runtime option.
- [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: endpoint authority is
pinned before and after every command; Docker is disabled and guarded in
the live proof; the provider remains dormant pending later qualification
slices.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`
- Evidence: `.github/workflows/podman-cpu-proof.yaml`;
`src/lib/onboard/runtime-provider/podman.ts`; the bundle remains
non-selectable and no user-visible behavior is documented in this slice.
- Agent: Codex Desktop
<!-- docs-review-head-sha: a254cf1 -->
<!-- docs-review-agents-blob-sha: 3dd7c24 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run validate:pr` passed after refreshing `origin/main` when hooks
were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `60/60` focused Podman
adapter/provider/workflow/parity tests passed on the restacked head; the
advisor follow-up adds `10/10` focused tests and passes source-shape,
repository, and CLI pre-push gates on exact head `a254cf1cc306`.
- [x] Applicable broad gate passed — `prek run --files <complete slice>`
passed repository checks, semantic E2E phases, source-shape, test-size,
formatting, YAML, secret scan, and all other applicable hooks.
- [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)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>

---------

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Apurv Kumaria <akumaria@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow feature PR adds or expands user-visible functionality integration: dcode LangChain Deep Code integration behavior integration: hermes Hermes integration behavior integration: openclaw OpenClaw integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants