sandbox: a manifest is pinned only when its image AND every feature are digest-addressed #270

Merged
dcharlot merged 1 commit from fix/manifest-pinned-means-pinned into main 2026-10-15 22:35:42 -04:00
Owner

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 were rust:1 and node: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.
  • What pinned means: the docs, spec/environment-manifest.md and 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.
  • C7 conformance now checks three things:
    • the image is digest-addressed, as its label always said;
    • a feature declared by tag leaves the manifest unpinned;
    • digest-addressed features pin it.

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 new pinned_means_every_feature_is_digest_addressed.
  • sandbox-conformance: all classes pass, including C7.
  • Clippy reports nothing new. Its two warnings, in fleet.rs and vectors.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

## 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 were `rust:1` and `node: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. - **What pinned means:** the docs, `spec/environment-manifest.md` and 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. - **C7 conformance** now checks three things: - the image is digest-addressed, as its label always said; - a feature declared by tag leaves the manifest unpinned; - digest-addressed features pin it. 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 new `pinned_means_every_feature_is_digest_addressed`. - `sandbox-conformance`: all classes pass, including C7. - Clippy reports nothing new. Its two warnings, in `fleet.rs` and `vectors.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](https://claude.com/claude-code)
sandbox: a manifest is pinned only when its image AND every feature are digest-addressed
Some checks failed
repository checks / lockfiles, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 55s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 5s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 2m2s
standards workspaces build + test / joulecontract-rs (joulecontract/joulecontract-rs, joulecontract-rs, linux-arm64, true) (pull_request) Successful in 1m42s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 6m24s
standards workspaces build + test / jouledesk-rs (jouledesk/jouledesk-rs, jouledesk-rs, macos) (pull_request) Successful in 1m26s
standards workspaces build + test / jcp-rs (jcp-conformance, jcp/jcp-rs, -p jcp-energy --features nvml, jcp-rs, linux) (pull_request) Failing after 1m7s
standards workspaces build + test / joule-ui-rs (joule-ui/joule-ui-rs, joule-ui-rs, linux) (pull_request) Successful in 1m16s
standards workspaces build + test / proof-rs (proof-conformance, proof/proof-rs, proof-rs, linux, true) (pull_request) Successful in 1m32s
standards workspaces build + test / sandbox-rs (sandbox-conformance, sandbox/sandbox-rs, sandbox-rs, linux) (pull_request) Successful in 2m31s
d79332b061
`EnvironmentManifest::is_pinned()` checked the base image's digest alone,
while its doc promised "fully pinned" and "same address ⇒ same bytes". Its
own test asserted it true for a manifest whose features were `rust:1` and
`node:1`. Those are tags, which resolve to whatever was last pushed under
them, so two hosts can run different toolchains under one address. The
spec repeated the overclaim: it called such a manifest pinned, and so fit
for a cross-host "same environment" claim.

- `Feature::is_pinned()`: the reference carries an `@sha256:` digest.
- `EnvironmentManifest::is_pinned()`: the image and every feature are
  digest-addressed. `image_pinned()` is the old image-only check.
- Its docs, the spec (spec/environment-manifest.md, SPEC §14): pinned 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.
- C7 conformance checks the image (as it always said it did), that a
  feature by tag leaves the manifest unpinned, and that digest features pin
  it.

Pinned-ness is not in the manifest core, so no content address or vector
changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Transaction-Science/open-standards!270
No description provided.