NemoClaw icon indicating copy to clipboard operation
NemoClaw copied to clipboard

Pi base image build omits NEMOCLAW_CORPORATE_CA_B64 although its Dockerfile declares and consumes it

Open udsy19 opened this issue 3 months ago • 0 comments

Investigation Summary

  • agents/pi/Dockerfile.base declares ARG NEMOCLAW_CORPORATE_CA_B64 and anchors the decoded certificates before its HTTPS package fetches, at lines 18, 22, 34, 71, and 107.
  • agentBaseImageBuildArgs in src/lib/agent/base-image.ts:62-67 returns the corporate CA build argument only for langchain-deepagents-code, so the Pi base build receives the empty default.
  • The empty argument reaches both build call sites: the forced rebuild in src/lib/agent/base-image.ts and the resolver local fallback in src/lib/sandbox-base-image.ts:399.
  • The Deep Agents Code half of this behavior was added by #8150 (Fixes #8119) on 2026-08-04. Pi added the same Dockerfile stages later in #9100 without the matching build argument.
  • Not confirmed by an image build. The evidence is the checked-in source plus a regression test that fails on main and passes after the one-line change. Pi is a release candidate, so I could not run nemoclaw onboard --agent pi without a qualification receipt.

Description

NemoClaw imports a host corporate proxy CA and bakes it into sandbox image trust (#6210). For an agent base image, NemoClaw passes the CA as the NEMOCLAW_CORPORATE_CA_B64 Docker build argument.

agents/pi/Dockerfile.base consumes that build argument in two stages:

  • The native-security-builder stage anchors the CA before it builds the native security packages.
  • The final stage anchors the CA before it downloads the Debian snapshot packages and runs npm ci for the Pi runtime.

agentBaseImageBuildArgs supplies the argument only for Deep Agents Code. A Pi base image build therefore always sees the empty ARG NEMOCLAW_CORPORATE_CA_B64= default, both when nemoclaw rebuild forces a local base build and when the resolver falls back to a local build.

Expected: a Pi local base image build receives the configured corporate CA, the same way a Deep Agents Code local base image build does.

Actual: the Pi base build receives an empty argument. Behind TLS inspection the anchoring block is skipped, so the base image carries no corporate CA and the HTTPS fetches in the same stages are not covered by that trust.

Severity note: Pi is a release candidate. CANDIDATE_MANAGED_IMAGE_AGENTS in src/lib/onboard/managed-image/contract.ts lists pi, and selection requires NEMOCLAW_CANDIDATE_AGENTS=1 plus a published qualification receipt. A general-availability user cannot reach this path today, so this is lower severity than #8119.

Reproduction Steps

Source-level reproduction, at commit 7d516f2ed:

  1. Read agents/pi/Dockerfile.base. Confirm ARG NEMOCLAW_CORPORATE_CA_B64 at lines 18, 22, and 71, and the if [ -n "${NEMOCLAW_CORPORATE_CA_B64:-}" ] blocks at lines 34 and 107.

  2. Read src/lib/agent/base-image.ts:62-67. Confirm that corporateCaBuildArgs() is returned only when agent.name === "langchain-deepagents-code".

  3. Confirm that agents/hermes/Dockerfile.base and the root Dockerfile.base declare no NEMOCLAW_CORPORATE_CA_B64, so Pi is the only base image with an unsupplied declaration:

    grep -l NEMOCLAW_CORPORATE_CA_B64 Dockerfile.base agents/*/Dockerfile.base
    
  4. Extend the owning test to cover Pi and run it:

    npx vitest run --project cli src/lib/agent/base-image.test.ts
    

    The Pi case fails with expected undefined to be type of 'string' for buildArgs.NEMOCLAW_CORPORATE_CA_B64.

Runtime reproduction for a maintainer with a Pi qualification receipt:

  1. Put a corporate proxy CA in the host trust store and set NEMOCLAW_CORPORATE_CA_BUNDLE.
  2. Remove any cached Pi base image.
  3. Run nemoclaw rebuild for a Pi sandbox so the base image builds locally.
  4. Inspect the built base image. /usr/local/share/nemoclaw/corporate-ca.pem is absent.

Environment

OS:            macOS 26.5.1
Hardware:      Apple silicon
Node.js:       v26.7.0
Docker:        28.0.1
NemoClaw:      source checkout at 7d516f2ed

Debug Output

Not applicable. This defect is in the build inputs that NemoClaw passes to docker build, and it was found by source inspection, not by a failed command. nemoclaw debug output would not contain the build-argument set. The reproducible evidence is the test result in the reproduction steps.

Logs

FAIL  |cli| src/lib/agent/base-image.test.ts > agent base image provisioning >
  passes the resolved corporate CA into local pi base image builds (#8119)
AssertionError: expected undefined to be type of 'string'

Expected: "string"
Received: "undefined"

Checklist

  • [x] I confirmed this bug is reproducible
  • [x] I searched existing issues and this is not a duplicate

udsy19 avatar Aug 18 '26 06:08 udsy19