Skip to content

feat(inference): add trusted llama.cpp publication evidence - #8252

Merged
ericksoa merged 4 commits into
mainfrom
feat/llamacpp-publication-evidence-8250
Aug 4, 2026
Merged

feat(inference): add trusted llama.cpp publication evidence#8252
ericksoa merged 4 commits into
mainfrom
feat/llamacpp-publication-evidence-8250

Conversation

@ericksoa

@ericksoa ericksoa commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

This change adds a digest-first, manually gated publication path for the NemoClaw-owned llama.cpp server image. Publication remains disabled in declarative YAML until the public GHCR package and protected DGX Spark qualification infrastructure exist, and this slice does not move a consumer alias.

Related Issue

Fixes #8250

Changes

  • Declare the publication repository, platforms, evidence policy, signing identity, vulnerability threshold, receipt schema, and enablement boundary in managed-inference/images/llama-cpp/image.yaml.
  • Validate and export the exact publication contract from the existing manifest compiler. The dedicated llama.cpp publisher consumes this configuration; workflow-local defaults would violate the accepted declarative serving-configuration decision.
  • Add a main-only manual publisher that builds native digests, requires a public GHCR package before registry writes, assembles an exact two-platform index, scans both platform digests, and creates no consumer alias.
  • Add an independently gated reusable workflow for SPDX SBOM attestations, SLSA provenance, and Sigstore keyless index signing.
  • Add a fail-closed receipt verifier that binds source, CUDA bases, descriptors, attestations, scans, anonymous per-platform pulls, and immutable local image IDs.
  • Add workflow-contract and hostile-mutation tests for the compiler, trust boundary, digest handoff, and evidence verifier.

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: Publication remains disabled; no recipe digest, consumer alias, onboarding default, operator procedure, or supported surface changes.
  • 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: Independent supply-chain review of the complete change through c3fc700f6 found no remaining trust-boundary, evidence-integrity, or workflow-permission blocker.
  • 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: Publication is declaratively disabled, protected DGX Spark inputs are unset, and this change adds no consumer alias, recipe digest, onboarding default, operator procedure, or supported surface.
  • Agent: Codex Desktop

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit:
  • 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 — command/result or justification: 66 tests passed across the four focused integration files, including the dependency-review guard.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result:
  • 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

@ericksoa ericksoa self-assigned this Aug 4, 2026
@ericksoa ericksoa added area: inference Inference routing, serving, model selection, or outputs area: local-models Local model providers, downloads, launch, or connectivity area: providers Inference provider integrations and provider behavior feature PR adds or expands user-visible functionality platform: dgx-spark Affects DGX Spark hardware or workflows v0.0.102 labels Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds a declarative, manually gated llama.cpp publication pipeline. It publishes exact amd64 and arm64 digests, creates supply-chain evidence, verifies all evidence, and writes a canonical receipt.

Changes

llama.cpp publication

Layer / File(s) Summary
Publication contract and configuration
managed-inference/images/llama-cpp/image.yaml, scripts/checks/export-llama-cpp-image-config.mts, test/llama-cpp-image.test.ts
Adds publication, evidence, vulnerability, receipt, platform, and DGX Spark qualification settings. The exporter validates and emits the normalized configuration.
Digest-first publication workflow
.github/workflows/llama-cpp-image.yaml, test/llama-cpp-image-workflow.test.ts
Adds trusted manual publication, public-package preflight, exact platform digest publishing, candidate index assembly, scanning, evidence verification, and receipt upload.
Reusable attestation and signing
.github/workflows/llama-cpp-image-attest.yaml, test/llama-cpp-image-workflow.test.ts
Adds trusted-caller validation, platform SBOM generation, SBOM attestations, SLSA provenance, and exact-digest signing.
Evidence verification and receipt generation
scripts/checks/verify-llama-cpp-image-publication-evidence.sh, test/llama-cpp-image-publication-evidence.test.ts
Validates image, platform, anonymous-pull, SBOM, provenance, signature, and vulnerability evidence. It writes a canonical publication receipt and tests hostile evidence mutations.

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

Possibly related issues

  • NVIDIA/NemoClaw issue 8231 — Covers the broader llama.cpp publication workflow, evidence validation, and DGX Spark qualification flow.

Possibly related PRs

  • NVIDIA/NemoClaw#8224 — Adds related declarative DGX Spark image and qualification configuration.
  • NVIDIA/NemoClaw#8235 — Provides the llama.cpp image manifest, workflow, exporter, and tests extended here.

Suggested labels: area: ci, area: packaging, area: security

Sequence Diagram(s)

sequenceDiagram
  participant Maintainer
  participant GitHubActions
  participant GHCR
  participant Cosign
  participant EvidenceVerifier
  Maintainer->>GitHubActions: Start manual publication
  GitHubActions->>GHCR: Publish amd64 and arm64 digests
  GitHubActions->>GHCR: Assemble candidate OCI index
  GitHubActions->>Cosign: Attest SBOMs, publish provenance, sign digest
  GitHubActions->>EvidenceVerifier: Verify image and supply-chain evidence
  EvidenceVerifier->>GitHubActions: Upload canonical publication receipt
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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 The changes implement the linked issue's digest-first publication, evidence verification, gated enablement, receipt, permissions, and hostile-mutation test requirements.
Out of Scope Changes check ✅ Passed The changes stay within the linked issue's scope and add only related workflow, policy, verifier, and contract-test functionality.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding trusted publication evidence for the llama.cpp image.
✨ 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/llamacpp-publication-evidence-8250

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 5677dc9 in the feat/llamacpp-public... branch remains at 96%, unchanged from commit dd7db61 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 5677dc9 in the feat/llamacpp-public... branch remains at 81%, unchanged from commit dd7db61 in the main branch.

Show a code coverage summary of the most impacted files.
File main dd7db61 feat/llamacpp-public... 5677dc9 +/-
src/lib/policy/...ne-exclusion.ts 96% 92% -4%
src/lib/private-networks.ts 93% 90% -3%
src/lib/credentials/store.ts 56% 55% -1%
src/lib/sandbox...rce-identity.ts 87% 87% 0%
src/lib/domain/.../connect-env.ts 89% 97% +8%

Updated August 04, 2026 20:26 UTC

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 2 warnings · 0 suggestions
  • Model comparison: normalized findings differ; normalized terminology decisions differ; normalized E2E selections match; Nemotron reported the same number of blockers, 2 more warnings, the same number of suggestions.
5 terminology differences from the second opinion

Advisory only. These are normalized differences from the primary terminology receipt.

  • publication qualification at scripts/checks/export-llama-cpp-image-config.mts:211: selected only by the second-opinion lane as define.
  • run-unique candidate at .github/workflows/llama-cpp-image-attest.yaml:10: selected only by the second-opinion lane as define.
  • declarative publication boundary at .github/workflows/llama-cpp-image.yaml:249: selected only by the second-opinion lane as define.
  • digest-first at test/llama-cpp-image-workflow.test.ts:201: selected only by the second-opinion lane as define.
  • protected DGX Spark at .github/workflows/llama-cpp-image.yaml:301: selected only by the second-opinion lane as define.

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

4 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • established — candidate index at .github/workflows/llama-cpp-image.yaml:458: Keep "candidate index" for the exact multi-platform OCI index.
  • justified — anonymous exact-digest pull at scripts/checks/verify-llama-cpp-image-publication-evidence.sh:233: Keep the modifier because the verifier must distinguish public digest retrieval from authenticated or tag-based retrieval.
  • define — publication receipt at .github/workflows/llama-cpp-image.yaml:656: Define "publication receipt" near the manifest contract or verifier as the canonical versioned record of verified publication evidence.
  • define — protected DGX Spark qualification at .github/workflows/llama-cpp-image.yaml:301: Define the protected qualification boundary or replace "protected" with the specific enforced conditions.

E2E guidance

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

Recommended E2E: managed-image-multiarch-startup, inference-routing, network-policy

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: 2

🧹 Nitpick comments (1)
test/llama-cpp-image-workflow.test.ts (1)

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

Derive the publication output names from the exporter.

This list repeats the 19 publication output keys that scripts/checks/export-llama-cpp-image-config.mts produces. The test proves only that the workflow mirrors this literal list. If the exporter renames or drops an output, the list stays green until someone updates it by hand. Derive the expected names from the compiled configuration keys instead, so the workflow and the exporter cannot drift.

const publicationOutputs = Object.keys(loadLlamaCppImageConfig()).filter((key) =>
  key.startsWith("publication_"),
);
for (const output of publicationOutputs) {
  expect(config.outputs?.[output]).toBe(`\${{ steps.manifest.outputs.${output} }}`);
}
🤖 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/llama-cpp-image-workflow.test.ts` around lines 140 - 162, Replace the
hard-coded publication output list in the workflow test with keys derived from
loadLlamaCppImageConfig(), filtering for names that start with "publication_".
Iterate over those derived keys when asserting config.outputs, preserving the
existing manifest-expression expectation.

Source: Path instructions

🤖 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 `@scripts/checks/verify-llama-cpp-image-publication-evidence.sh`:
- Around line 277-308: Update the SBOM comparison around sbom_expected,
sbom_actual, and the final while loop so every expected hash is validated
deterministically rather than relying on the loop’s last exit status. Normalize
both sets consistently and require exactly two distinct platform-document
hashes, rejecting duplicate expected SBOM hashes and any missing or extra actual
hashes; preserve the existing attestation-binding checks. Add focused tests
covering a missing platform/duplicate predicate detection and a valid
two-document case without relying on lexical hash order.

In `@test/llama-cpp-image-workflow.test.ts`:
- Line 309: Strengthen the assertion in the workflow test to inspect every image
tag the workflow writes and verify that each contains the run-unique candidate
tag, rather than matching only known alias names. Remove the broad
serialized-workflow regex check and reuse the existing candidate-tag symbol and
workflow tag data so future tags such as latest cannot bypass the consumer-alias
guard.

---

Nitpick comments:
In `@test/llama-cpp-image-workflow.test.ts`:
- Around line 140-162: Replace the hard-coded publication output list in the
workflow test with keys derived from loadLlamaCppImageConfig(), filtering for
names that start with "publication_". Iterate over those derived keys when
asserting config.outputs, preserving the existing manifest-expression
expectation.
🪄 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: f593c56f-7581-4ebb-87bb-70793ca0f3ea

📥 Commits

Reviewing files that changed from the base of the PR and between dd5dc0b and bc5ce7a.

📒 Files selected for processing (8)
  • .github/workflows/llama-cpp-image-attest.yaml
  • .github/workflows/llama-cpp-image.yaml
  • managed-inference/images/llama-cpp/image.yaml
  • scripts/checks/export-llama-cpp-image-config.mts
  • scripts/checks/verify-llama-cpp-image-publication-evidence.sh
  • test/llama-cpp-image-publication-evidence.test.ts
  • test/llama-cpp-image-workflow.test.ts
  • test/llama-cpp-image.test.ts

Comment thread scripts/checks/verify-llama-cpp-image-publication-evidence.sh
Comment thread test/llama-cpp-image-workflow.test.ts Outdated
@ericksoa
ericksoa merged commit 0d1cb93 into main Aug 4, 2026
100 of 107 checks passed
@ericksoa
ericksoa deleted the feat/llamacpp-publication-evidence-8250 branch August 4, 2026 21:23
cv added a commit that referenced this pull request Aug 4, 2026
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: inference Inference routing, serving, model selection, or outputs area: local-models Local model providers, downloads, launch, or connectivity area: providers Inference provider integrations and provider behavior feature PR adds or expands user-visible functionality platform: dgx-spark Affects DGX Spark hardware or workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Managed inference] Add trusted llama.cpp image publication evidence

1 participant