Skip to content

fix(vm): bind cached registry images to verified manifest digests - #4342

Open
alangou wants to merge 1 commit into
mainfrom
fix/4-vm-image-cache-validation/alangou
Open

alangou wants to merge 1 commit into
mainfrom
fix/4-vm-image-cache-validation/alangou

Conversation

@alangou

@alangou alangou commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Bind VM registry downloads to the manifest digest used for the image cache identity. Resolving a tag and then pulling it independently could cache different image contents under the resolved digest; both VM registry preparation paths now pull through an immutable digest reference and reject mismatched manifest bytes before downloading blobs.

Related Issue

None.

Changes

  • Resolve tags once and preserve caller-supplied digest pins for bootstrap and prepared-image downloads, including retries.
  • Use the existing OCI client's byte verification for single manifests, multi-platform indexes, and selected platform manifests.
  • Advance bootstrap cache layout to v6 and prepared-image layout to v4 so new preparations do not reuse older entries. Hash source identities to keep cache and staging filenames bounded for longer digests such as SHA-512.
  • Add seven loopback registry tests covering mismatches, tag changes, retries, index children, forged headers, explicit pins, and SHA-512 compatibility. Document cache rebuilding on upgrade.

Testing

  • VM driver suite passes serially: 250 tests, including all seven new registry tests.
  • Both manifest/cache identity mismatch regressions failed against the original implementation and pass with the fix.
  • VM driver Clippy, Rust formatting, and diff checks pass.
  • Published documentation checks pass: zero errors, three warnings.
  • VM boot E2E was not run locally: this environment has no /dev/kvm. The test:e2e label requests the repository's core E2E lane.

The parallel VM unit suite hits driver::preparation::tests::restart_reclaims_inactive_attempts_and_preserves_active_shared_and_unknown_data; the same failure was reproduced on the unmodified baseline. The complete serial suite passes. Registry tests validate manifest verification and staging without booting a VM; successful-manifest cases deliberately stop at a missing blob response.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Relevant driver README and published runtime documentation updated

Signed-off-by: Adrien Langou <alangou@nvidia.com>
@alangou
alangou requested a review from mrunalp as a code owner October 8, 2026 16:17
@alangou alangou added the test:e2e Requires end-to-end coverage label Oct 8, 2026
@alangou
alangou requested review from a team, derekwaynecarr and sjenning as code owners October 8, 2026 16:17
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Label test:e2e applied for 78e65a8. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway, sandbox, and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

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

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant