Skip to content

feat: publish Kubernetes metadata bundles with each staged release - #13566

Merged
cv merged 2 commits into
feat/multi-platform-metadata-bundlesfrom
feat/release-metadata-bundles
Oct 21, 2026
Merged

cv merged 2 commits into
feat/multi-platform-metadata-bundlesfrom
feat/release-metadata-bundles

Conversation

@cv

@cv cv commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Closes #13548. Stacked on #13565.

Failure

A Kubernetes sandbox names its agent image's metadata bundle in image.metadata, but a bundle could only come from cargo images export-metadata run on a locally built image. A user deploying a published release had no way to get one: the tool isn't in the CLI, and docker image save of a pulled multi-platform image omits the configs it needs. Found while testing v1.0.0-rc1 (#13516).

Decision

Publish the bundles with each release, instead of making the CLI read registries (that would mean NemoClaw handling registry logins, which belongs to Docker and the registry).

  • cargo images export-metadata --registry HOST/REPOSITORY@sha256:DIGEST fetches the root and, for each Linux platform it lists, the platform's manifest and config over the registry API. It checks every document against its digest, skips attestations, and builds the bundle with the same code as a local export, so both produce identical bundles. It answers the registry's bearer-token challenge, with NEMOCLAW_REGISTRY_USERNAME and NEMOCLAW_REGISTRY_PASSWORD when set. Plain HTTP is allowed only for loopback hosts.
  • The staging workflow, after promoting each agent image's index, exports that index's bundle from ghcr.io with the workflow's token. It attaches the bundles to the draft as <image>.metadata.json and adds a Kubernetes metadata column to the release notes. The runtime and proxy images don't need one.
  • Docs:
    • docs/kubernetes.md: for a published release, use the index reference from the notes and the attached bundle;
    • docs/build.md: --registry;
    • docs/contributing/releases.md: the attached bundles.

Validation

  • Two new tests run a local registry stand-in that issues a bearer-token challenge. They check that a two-platform index plus attestation becomes the index, both manifests and both configs as exact bytes, with the attestation never fetched, and that a changed config or a missing platform fails. They failed to compile before the change.
  • Against ghcr.io, exporting v0.1.0-rc1's v1/deepagents index with a token wrote a schema 2 bundle with the index, the arm64 and amd64 manifests, and both configs.
  • actionlint is clean, cargo ci passed, and fern check reported 0 errors.
  • The workflow change runs at the next release-candidate tag. Staging v0.1.0-rc2 and deploying its Deep Agents image on kind straight from the release's index and bundle is the end-to-end check for Provide Kubernetes metadata bundles for published agent images #13548's "done when".

@cv
cv merged commit d8efbf9 into feat/multi-platform-metadata-bundles Oct 21, 2026
@cv
cv deleted the feat/release-metadata-bundles branch October 21, 2026 00:00
@wscurran wscurran added area: packaging Packages, images, registries, installers, or distribution area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance platform: k8s Affects Kubernetes deployments 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]>
@cv cv added the v1 NemoClaw v1 branch label Nov 17, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: packaging Packages, images, registries, installers, or distribution area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance platform: k8s Affects Kubernetes deployments v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants