sandbox: a manifest is pinned only when its image AND every feature are digest-addressed #270
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/manifest-pinned-means-pinned"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What was wrong
EnvironmentManifest::is_pinned()checked only the base image's digest, but its doc promised "fully pinned" and "same address ⇒ same bytes". Its own test asserted it true for a manifest whose features wererust:1andnode:1.Those are tags. A tag resolves to whatever its publisher last pushed under it, so two hosts can run different toolchains under one manifest address.
The spec made the same overclaim. It called such a manifest pinned, which made it fit for a cross-host "same environment" claim, exactly what unpinned manifests are kept out of.
The fix
Feature::is_pinned(): the feature reference carries an@sha256:digest.EnvironmentManifest::is_pinned(): the image and every feature are digest-addressed.image_pinned()is the old image-only check.spec/environment-manifest.mdand SPEC §14 now say it means the whole toolchain. Mounted content is data and never part of the address, so a pinned manifest says nothing about what its mounts hold.Pinned-ness is not part of the manifest core, so no content address or vector changes.
Checked
Run on the build host:
sandbox-attest: 50 tests pass, including the newpinned_means_every_feature_is_digest_addressed.sandbox-conformance: all classes pass, including C7.fleet.rsandvectors.rs, predate this change.Putting
is_pinned()back to the image-only check fails 2 unit tests and C7 ("a feature declared by tag leaves the manifest unpinned").🤖 Generated with Claude Code