Skip to content

fix(images): use the Debian snapshot for pinned zlib packages (Refs #14465) - #14913

Open
deepujain wants to merge 3 commits into
mainfrom
fix/14465-archived-zlib-input
Open

deepujain wants to merge 3 commits into
mainfrom
fix/14465-archived-zlib-input

Conversation

@deepujain

@deepujain deepujain commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

The arm64 native-security builder can produce zlib1g again. The Debian mirror returned HTTP 404 for the pinned arm64 package, so managed image builds stopped before agent startup. The amd64 download still worked.

Reason

The builder compares its patched library with Debian’s original binary to check that applications can still load it. Debian’s August 10, 2025 trixie snapshot retains the original packages for both architectures.

Related issues

Refs #14465, whose managed image builds depend on this package. Hermes backup and restore are unchanged.

Changes

Fetch the original zlib1g packages from the snapshot. The package version, architecture-specific checksums, write-error backport, and ABI checks stay the same. The Pi qualification receipts and their expected hashes now identify the images built with this download location.

Verification

Both snapshot downloads matched the repository pins and the package indexes authenticated by Debian’s signed release. A cold docker buildx build --no-cache --platform linux/arm64 --target native-security-builder -f Dockerfile.base . passed the write-error and ABI checks and produced the arm64 package. The managed-image build published Pi sandbox images for both linux/amd64 and linux/arm64. Both committed receipts match the published contracts byte for byte. The committed pair records source 8f35784f7 and cohort ghrun-45954843884-1. The managed-image build for PR commit 57bcbfb428 produced separate amd64 and arm64 contracts for cohort ghrun-46096864250-1.

An offline test runs the builder for amd64 and arm64 and checks that it unpacks the same snapshot package it verified. On arm64, the builder stopped before unpacking or producing a package when the fixture supplied the wrong checksum, package name, or version. The amd64 stage and managed-agent startup were not run locally. The diff contains no secrets.

Review notes

An independent read-only review of scripts/security/build-native-security-packages.sh in NVIDIA/NemoClaw at 8f35784f795552c3f44579448f667284610e6885 checked the image callers, Debian package provenance, existing hashes, and build evidence. A second independent review at 2f37f66067a5b7f0dd1ce6a11e9c116f0027bdae checked the complete diff, including the builder, both receipts and their expected hashes. Neither review found a code blocker. The builder change does not add a zlib security patch. Human security review is pending.


Signed-off-by: Deepak Jain deepujain@gmail.com

Summary by CodeRabbit

  • Chores
    • Updated Linux PI agent qualification records for amd64 and arm64 with new image and release metadata.
    • The zlib package build now retrieves its source from a fixed Debian snapshot, with architecture-specific checksum verification retained.
  • Tests
    • Added checks for successful zlib package builds on amd64 and arm64, including cases that reject mismatched source hashes, package names, or versions.

The Debian mirror no longer serves the pinned arm64 zlib1g package, so
managed image builds stop before agent startup. Fetch both architectures
from the trixie release snapshot. The packages match the existing hashes;
the backport and ABI checks stay unchanged.

Refs #14465.

Signed-off-by: Deepak Jain <deepujain@gmail.com>
@deepujain deepujain self-assigned this Nov 27, 2026
@copy-pr-bot

copy-pr-bot Bot commented Nov 27, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The zlib package builder now uses a dated Debian snapshot, with tests for both supported architectures and invalid package inputs. The Pi qualification records and candidate authority contain updated image digests and source metadata.

Changes: Pi image qualification

Layer / File(s) Summary
Pin and test zlib package input
scripts/security/build-native-security-packages.sh, test/install/native-security-packages.test.ts
The builder retrieves zlib from a dated Debian snapshot. Tests cover amd64 and arm64 builds and reject incorrect source hashes, package names, or versions.
Update Pi qualification metadata
ci/pi-agent-qualification-v1-linux-amd64.json, ci/pi-agent-qualification-v1-linux-arm64.json, src/lib/agent/candidate-authority.ts
The qualification records and candidate authority use updated image digests. The records also contain updated source revision, release, and cohort values.

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Bug fix

Possibly related PRs

  • NVIDIA/NemoClaw#9100: Adds Pi image sources and qualification checks, which share build and qualification contracts with these updates.
  • NVIDIA/NemoClaw#9212: Adds Pi candidate authority and qualification binding, which use the same receipt-matching contract.

Suggested labels: bug-fix

Suggested reviewers: prekshivyas, apurvvkumaria, cv

Merge Risk: Minimal · up to 57bcb

The change pins the zlib source to a dated Debian snapshot and refreshes the Pi qualification digests. No concrete defect was found, so the merge risk is minimal. Human security review is still pending, as the author notes.

Security architecture risk: Minimal · up to 57bcb

The new download location must supply the same verified package, and the updated Pi qualification records match the new approved fingerprints. The change does not weaken either check. Pi deployments should update the software and qualification records together because mixed versions are rejected.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The receipt rotation changes which Pi managed-image contracts are accepted on AMD64 and ARM64. It does not add qualification authority for another agent.

Trust Boundaries and Controls

  • observed — The environment supplies an opt-in flag and a receipt location, not the accepted digest. The loader checks file identity, type, and size before reading, then requires a repository-approved SHA-256 match before parsing and validating the managed-image contract.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the zlib packages for the native security builder now come from the Debian snapshot instead of the current pool URL. The raw summary confirms the build script change, …
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.
Full details: Title check

Explanation

The title names the main change: the zlib packages for the native security builder now come from the Debian snapshot instead of the current pool URL. The raw summary confirms the build script change, and the objectives state the same reason (the mirror returned HTTP 404 for the pinned arm64 package). The title does not mention the updated Pi qualification receipts or the candidate-authority digest changes, but those support the same change and do not make the title off-topic. The title is short, specific, and uses no vague terms.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 9e19705 and 57bcbfb.

Files selected for processing: 5

  • ci/pi-agent-qualification-v1-linux-amd64.json
  • ci/pi-agent-qualification-v1-linux-arm64.json
  • scripts/security/build-native-security-packages.sh
  • src/lib/agent/candidate-authority.ts
  • test/install/native-security-packages.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@deepujain

Copy link
Copy Markdown
Collaborator Author
Authoring session — opening
Field Status Value Evidence or limit
Harness recorded Codex CLI 0.160.0 (exec) Authoring session metadata.
Skills partial At least 8 distinct skills, including the repository’s CI failure classification, issue planning, implementation and dependency update skills. Counted complete injections and complete reads once per name. Excerpted reads were excluded.
Instruction files partial AGENTS.md (injected), git-github-hard-stop.md, upstream-skills.md and .github/PULL_REQUEST_TEMPLATE.md (complete reads). Other guidance was available only in excerpts.
Tool calls partial 47 recorded attempts: 46 terminal calls and one search. Includes failed and declined attempts. The search contained three queries. Shell subprocesses were not independently counted.
Session window recorded 2026-11-26 21:14:27 to 21:28:48 UTC; 14 minutes 21 seconds. First event through the commit receipt for 8f35784f7955, including idle time.
Compactions recorded 0 No compaction event through the cutoff.
Models recorded gpt-6.2-astra Recorded authoring turn.
Reasoning levels recorded xhigh Recorded authoring turn.

@github-code-quality

github-code-quality Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/plugin

main 63002cd fix/14465-archived-z... 57bcbfb +/-
96% 97% +1%
View coverage of the 10 most impacted files.
File main 63002cd fix/14465-archived-z... 57bcbfb +/-
nemoclaw/src/sh...cy-boundary.cts 100% 97% -3%
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/ru...time-context.ts 100% 99% -1%
nemoclaw/src/bl...print/runner.ts 95% 95% 0%
nemoclaw/src/bl...ime-identity.ts 97% 97% 0%
nemoclaw/src/bl...t-management.ts 100% 100% 0%
nemoclaw/src/index.ts 94% 99% +5%
nemoclaw/src/de...search-state.ts 0% 100% +100%
nemoclaw/src/on...native-route.ts 0% 100% +100%
nemoclaw/src/search-config.ts 0% 100% +100%

TypeScript / code-coverage/cli

main 63002cd fix/14465-archived-z... 57bcbfb +/-
84% 86% +2%
View coverage of the 10 most impacted files.
File main 63002cd fix/14465-archived-z... 57bcbfb +/-
src/lib/onboard.ts 62% 50% -12%
src/lib/actions...ess-recovery.ts 65% 83% +18%
src/lib/inferen...ollama/proxy.ts 41% 64% +23%
src/lib/onboard.../application.ts 55% 84% +29%
src/lib/domain/...y/dimensions.ts 0% 75% +75%
src/lib/inferen...er/lifecycle.ts 0% 75% +75%
src/lib/actions...ry/operation.ts 0% 76% +76%
src/lib/actions...try/snapshot.ts 0% 84% +84%
src/lib/inferen...ovider/index.ts 0% 90% +90%
src/lib/hermes-...yard-routing.ts 0% 95% +95%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 28, 2026 02:33 UTC

Use the amd64 and arm64 image digests published together for the updated zlib input.

Refs #14465

Signed-off-by: Deepak Jain <deepujain@gmail.com>
Check both architecture pins. Reject a bad digest, name, or version
before unpacking the original package or writing an output.

Signed-off-by: Deepak Jain <deepujain@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit 57bcbfb. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

@deepujain
deepujain marked this pull request as ready for review November 28, 2026 03:36
@deepujain

Copy link
Copy Markdown
Collaborator Author

I ran the same native security build for Linux arm64 on the base revision and the PR revision, both in Docker on the same Linux VM. I checked whether it produced the patched Debian package that managed sandbox images need.

Before (base of this PR): The build stopped while downloading the pinned zlib package and printed “curl: (22) The requested URL returned error: 404”.

After (this PR): The build fetched the package from the Debian snapshot and printed “dpkg-deb: building package 'zlib1g'”. It completed and the resulting arm64 package reported version “1:1.3.dfsg+really1.3.1-1+b1+nemoclaw1”.

@deepujain

Copy link
Copy Markdown
Collaborator Author

Hi @prekshivyas @senthilr-nv, this PR is ready for review and every check passes on 57bcbfb. Whenever you have a moment, a review would be much appreciated. Thank you!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants