Skip to content

ci: push checked v1 images to an internal per-commit namespace - #13533

Merged
cv merged 1 commit into
v1from
ci/reusable-image-workflow
Oct 20, 2026
Merged

cv merged 1 commit into
v1from
ci/reusable-image-workflow

Conversation

@cv

@cv cv commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Failure

Releases need the exact images CI checked (#13516), but CI / Images discarded every image it built and checked. A release workflow would have to rebuild them, and agent images are not reproducible byte for byte, so the published digests would differ from the checked ones.

Decision

Build once per commit, and let releases promote what was checked.

  • image-build.yml (new, reusable):
    • it has the image job's steps, unchanged;
    • it takes the validation plan's result, the image decision, and a push switch;
    • the calling job is named Build and its own job is named after the platform, so the required checks keep their names (Build / linux_arm64, Build / linux_amd64).
  • images.yml calls it, with push only for pushes to v1. Pull requests, stacked branches, and pushes that skip image work push nothing.
  • When pushing, after the existing checks pass, each agent image and the Ollama proxy is pushed to ghcr.io/nvidia/nemoclaw/v1-ci/<image>:<commit>-<arch> with the workflow's own token:
    • Docker's containerd store pushes the manifest it built, so the digest doesn't change;
    • the job summary lists each digest and its push time;
    • the job fails if any of those packages turns out public, since nothing must be public before a release.
  • Left alone: the live suites' live-images path, which is tuned to stay behind the bundle on the critical path (ci: build the live images once per platform and share them #12995, perf(ci): load saved images directly into Kind #13188, perf(ci): export live images directly from containerd #13239).

Later: the tag workflow that promotes these digests (#13516), and a cleanup schedule for old per-commit tags.

Validation

  • actionlint reports nothing for both workflows.
  • This pull request runs the same steps through the reusable workflow, without pushing.
  • Not yet run: the push step, which runs only on a v1 push that builds images. I'll watch the first one for push time and the new packages' visibility; earlier, a package pushed with a personal token started internal.

@cv
cv enabled auto-merge (squash) October 20, 2026 10:08
@github-actions

Copy link
Copy Markdown
Contributor

@cv
cv merged commit 5e88a87 into v1 Oct 20, 2026
@cv
cv deleted the ci/reusable-image-workflow branch October 20, 2026 10:21
cv added a commit that referenced this pull request Oct 20, 2026
## Failure

#13516 needs a way to assemble a v1 release privately before the
installer, onboarding, and QA and product validation allow a public one.
Since #13533, `v1` pushes keep the images CI checked, but nothing turns
them into a release.

## Decision

A tag workflow, `Release / Stage`, runs on semver tags `v1.*`, starting
with `v1.0.0-rc1`. It runs from the tagged commit, because GitHub only
dispatches manual workflows from the default branch, which is v0's
`main`.

- **Select:** find the latest commit in the tag's first-parent history
with per-commit images (`v1-ci/<image>:<commit>-<arch>`). Check with
`nemoclaw-build changes images --base <commit>` that nothing since could
change them. Otherwise, build and check the images at the tag through
`image-build.yml`.
- **Runtimes:** build the vLLM and Ollama images natively on arm64 and
amd64 and push them with rewritten timestamps. Their builds are
reproducible, and CI doesn't build them.
- **Stage:**
- join each image's two platform images into
`ghcr.io/nvidia/nemoclaw/v1/<image>:<tag>` with `docker buildx
imagetools create`, so nothing is rebuilt;
  - fail if a package is public;
- create a draft release listing every digest, as a prerelease when the
tag has a prerelease part. Rerunning updates the draft, and refuses if
the release is already published.
- **Guide:** `docs/contributing/releases.md` explains staging, testing a
staged release with private images, and the manual publishing step,
which needs the follow-ups #13521 to #13524.

## Validation

- `actionlint` reports nothing for the release, reusable image, and
image workflows.
- `fern check` passes.
- **Not yet run:** the workflow itself, which runs only on a pushed tag.
I'll ask before pushing `v1.0.0-rc1`.
cv added a commit that referenced this pull request Oct 20, 2026
… visibility (#13535)

## Failure

The first `v1` push after #13533 created
`ghcr.io/nvidia/nemoclaw/v1-ci/claude` as a public package and pushed
one arm64 image to it ([run
39407390276](https://github.com/NVIDIA/NemoClaw/actions/runs/39407390276)).
A package created by a workflow's token inherits this public
repository's visibility; the earlier probe used a personal token, and
its package started `internal`. The visibility check ran only after the
first push, so it stopped further pushes but not that one. The staging
workflow from #13534 would likewise create every `v1/<image>` package
public on its first tag, but no tag has been pushed.

## Decision

Workflows never create packages.

- **Guard:** a composite action, `.github/actions/internal-packages`,
checks that every target package already exists and isn't public, before
anything is pushed.
- **`image-build.yml`:** on `v1` pushes it runs the guard as a warning.
If any package is missing or public, it skips the push and the `Build`
checks stay green until the packages exist. The post-push check is gone.
- **`release.yml`:** the runtime and stage jobs run the guard as an
error, before pushing runtime images or creating `v1/<image>:<tag>`
indexes.
- **Docs:** `docs/contributing/releases.md` gains "Provision the
Packages":
- an administrator creates each `v1-ci/` and `v1/` package as internal,
by pushing any image with a personal token;
  - then grants `NVIDIA/NemoClaw` Actions write access;
  - a public package must be deleted and created again.

  The testing guide links to it.

## Validation

- `actionlint` reports nothing for the three workflows, and `fern check`
passes.
- Until packages are provisioned, the next image-affecting `v1` push
should skip its push with a warning per package.

`v1-ci/claude` remains public until it is deleted.
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance platform: container Affects Docker, containerd, Podman, or images labels Oct 23, 2026
cv added a commit that referenced this pull request Oct 23, 2026
## Narrowed by maintainers

This PR now keeps SBOMs as private draft assets and leaves attestation
to final releases:

- Staging generates one SPDX 2.3 document per platform digest with
pinned Syft (a short shell loop) and attaches them to the draft with
`sboms.json`, plus an SBOM table in the release notes.
- The `release-sboms` command and its Rust checks are removed: Syft
scans the exact reference it is given and writes SPDX itself, and the
staging workflow already enforces the release's images and platforms.
- The `v1-release-attestations` approval environment and the attest jobs
are removed. Release candidates and internal packages publish nothing
about their images; final releases will attest SBOMs together with
provenance, recorded in #13521.
- Kept: retaining `Cargo.lock` in the supervisor and proxy images.

Validation: `cargo ci`, `docker buildx bake check`, `actionlint` and
`fern check` pass. A proxy image built from this branch carries
`/usr/share/doc/nemoclaw-ollama-proxy/Cargo.lock`, and the workflow's
Syft command finds 79 packages in it, including hyper, serde and tokio.

The author's original description follows.

---

## Outcome

The v1 release workflow generates an SPDX package inventory for every
Linux ARM64 and AMD64 image and keeps each inventory as a draft-release
asset. After explicit approval to disclose the inventories, separate
jobs attach and verify SBOM attestations against the same platform
digests without rebuilding the images.

## Reason

Released images currently have no package inventory for users to inspect
or for the vulnerability-scanning follow-up to consume. This builds on
the checked-image publishing in #13533, release staging in #13534, and
Kubernetes metadata assets in #13566.

### Related issues

Refs #13522. Part of #13516. Provenance (#13521), vulnerability policy
(#13523), and license review (#13524) remain separate.

## Changes

- Derive platform coverage from the indexes staged by the existing
release inventory, including reused agent and proxy images. Pinned Syft
generates SPDX JSON from immutable platform references. The Rust
integration checks the scanner's source digest and platform, rejects
incomplete or invalid evidence, and exposes assets only after every scan
succeeds. Fixture tests cover substitution, missing platforms, scanner
failures, oversized documents, and reruns; a CLI test checks the saved
asset mapping and checksums.
- Keep digest-named SPDX assets and `sboms.json` beside the existing
metadata bundles, and list their mappings in the release notes. Retain
the supervisor and proxy package lockfiles in their images so Syft can
catalog Rust dependencies without relying on stripped binary metadata.
- Require the `v1-release-attestations` environment's approval before
jobs with OIDC, attestation-write, or registry-write credentials can
issue public evidence. The approval check refuses an environment without
required reviewers; its shell policy is exercised against protected and
unprotected fixtures. The workflow checks the downloaded asset checksum
before pinned `actions/attest` attaches the SPDX predicate through OCI
referrers. Document verification and partial-failure recovery.

## Verification

- `NEXTEST_TEST_THREADS=4 cargo ci` passed formatting, Clippy, the
workspace build, 1,556 tests, doctests, schema checks, native bundle
construction, and 151 lifecycle tests. The first run hit cache
contention in an unchanged dependency test; the rerun passed without
changing test budgets.
- `cargo test --locked -p nemoclaw-build --no-default-features --test
integration release_sboms::` passed all six tests on the final fixtures.
`cargo fmt --all -- --check` and focused Clippy with `-D warnings` also
passed.
- `actionlint .github/workflows/release.yml` passed with actionlint
1.7.12. Fern validation passed on the final documentation with Node.js
24.22.0, reporting zero errors and one warning per version.
- `AGENT_PLATFORM=linux/arm64 docker buildx bake --check ollama-proxy`
passed without warnings. Cargo packaging generated the proxy-specific
lockfile, and pinned Syft catalogued 79 packages from it, including
Hyper, Serde, and Tokio. This checks metadata discovery, not complete
image contents.

Live Docker qualification was not run because the local Colima context
does not provide the harness's required Docker socket. Runtime recipe
checks could not evaluate Bake target contexts with this builder. Actual
OS, Python, Node, and Rust coverage in the released images, protected
approval, attestation verification (including a mismatched digest),
unchanged registry digests, and internal package visibility remain
unverified until a separately authorized release validation run.

The diff contains no secrets, API keys, or credentials.

## Review notes

Decision: use SPDX JSON with pinned Syft and `actions/attest`'s
`sbom-path`, and keep staging assets private until protected approval
authorizes public attestation metadata.

Reason: users and #13523 need inventories bound to exact image
manifests. Attestations from a public repository use public Sigstore
infrastructure even when registry packages are internal.

Placement: the release workflow owns generation, draft assets, and
approved attachment; the Rust build tool owns complete platform coverage
and scanner-result binding. Upstream tools own package discovery, SPDX
serialization, and attestation generation.

Validation plan: use fixture and CLI tests for release coverage, denial,
and recovery; verify real image contents, environment approval, OCI
referrers, digest preservation, and registry visibility in a separately
authorized release run. Before that run, an administrator must configure
required reviewers and release-tag restrictions on
`v1-release-attestations`. The initiating maintainer accepted this
boundary for the change.

Self-review of
`deepujain/NemoClaw@64b8aa7` covered
`.github/workflows/release.yml`, the SBOM integration, and the image
metadata recipes. The release workflow is a sensitive path. Review
covered input validation, credential scope, approval ordering, digest
binding, and partial failures. No independent approval is claimed;
independent review and hosted CI remain required. Rust lockfile entries
include retained build dependencies and do not claim that every
dependency is linked into the executable.

---
Signed-off-by: Deepak Jain <[email protected]>

---------

Signed-off-by: Deepak Jain <[email protected]>
Signed-off-by: Carlos Villela <[email protected]>
Co-authored-by: Carlos Villela <[email protected]>
@wscurran wscurran added the v1 NemoClaw v1 branch label Oct 28, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance platform: container Affects Docker, containerd, Podman, or images v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants