feat(inference): add trusted llama.cpp publication evidence - #8252
Conversation
📝 WalkthroughWalkthroughThe 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. Changesllama.cpp publication
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related issues
Possibly related PRs
Suggested labels: 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
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit 5677dc9 in the TypeScript / code-coverage/cliThe overall coverage in commit 5677dc9 in the Show a code coverage summary of the most impacted files.
Updated |
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
5 terminology differences from the second opinionAdvisory only. These are normalized differences from the primary terminology receipt.
Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate. 4 semantic terminology decisionsTerminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.
E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
test/llama-cpp-image-workflow.test.ts (1)
140-162: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDerive the publication output names from the exporter.
This list repeats the 19 publication output keys that
scripts/checks/export-llama-cpp-image-config.mtsproduces. 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
📒 Files selected for processing (8)
.github/workflows/llama-cpp-image-attest.yaml.github/workflows/llama-cpp-image.yamlmanaged-inference/images/llama-cpp/image.yamlscripts/checks/export-llama-cpp-image-config.mtsscripts/checks/verify-llama-cpp-image-publication-evidence.shtest/llama-cpp-image-publication-evidence.test.tstest/llama-cpp-image-workflow.test.tstest/llama-cpp-image.test.ts
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
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
managed-inference/images/llama-cpp/image.yaml.Type of Change
Quality Gates
c3fc700f6found no remaining trust-boundary, evidence-integrity, or workflow-permission blocker.Documentation Writer Review
no-docs-neededDGX Station Hardware Evidence
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailablenpm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Signed-off-by: Aaron Erickson aerickson@nvidia.com