Skip to content

feat: content-addressed, hash-chained model carry manifest - #20

Merged
mdheller merged 1 commit into
mainfrom
feat/model-carry-content-addressed-manifest
Aug 3, 2026
Merged

feat: content-addressed, hash-chained model carry manifest#20
mdheller merged 1 commit into
mainfrom
feat/model-carry-content-addressed-manifest

Conversation

@mdheller

@mdheller mdheller commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What

Integrates the near-term recommendations from the SourceOS-vs-Apple ModelCarry analysis (spec-intake 2026-08-03) into the canonical carry surface as spec-as-code with teeth.

Adds ModelCarryManifest — a content-addressed, hash-chained catalog the model-router carries — naming every base model and adapter with a verifiable identity, a targeting predicate, an authoritative SHA-256 content hash, and a policy hash. The model-layer analogue of Exodus provenance: model identity is verifiable, not asserted.

Why (gaps closed)

Gap in the analysis Closed by
No content-addressed model manifest contracts/model-carry-manifest.schema.json
Adapter/base version binding not enforced (silent drift) adapter must pin its base's exact contentSha256
Integrity-checked transport not an invariant integrityFailureIsHardStop / transportMustBeIntegrityChecked const true

Teeth

tools/validate_model_carry_manifests.py (wired into make validate via validate-model-carry-manifest) enforces:

  • SHA-256 authoritative (FIPS 180-4); every entry's content + policy hash non-null;
  • integrity failure is a hard stop; transport must be integrity-checked;
  • manifest hash-chain — only the genesis manifest (version 1) may omit the previous-manifest link;
  • every adapter binds to an existing base entry and pins a baseContentSha256 equal to that base's contentSha256.

Ships a valid example plus negative fixtures: adapter/base drift, missing base, and soft integrity. Verified locally: make validate-model-carry-manifest passes (valid accepted, all three negatives rejected).

Boundary

Reference/verification object only. Does not authorize runtime execution, prompt egress, tool use, model download, training, or promotion — consistent with the carry-only doctrine.

Follow-ups (filed as issues)

  • Governed staged pre-load + atomic swap under a disk/CPU resource governor.
  • Tiered escalation contract: local-by-default → attested confidential-compute target, escalation decision + confidence as provenance.

🤖 Generated with Claude Code

Adds ModelCarryManifest: a content-addressed catalog for the model-router
carry layer that names every base and adapter with a verifiable identity,
targeting predicate, authoritative SHA-256 content hash, and policy hash.

Closes three gaps from the SourceOS-vs-Apple model-carry analysis:
- no content-addressed model manifest (identity asserted, not verifiable);
- adapter/base version binding not enforced (silent drift at deploy);
- integrity-checked transport not an invariant.

Teeth (tools/validate_model_carry_manifests.py, wired into make validate):
- SHA-256 authoritative (FIPS 180-4); content+policy hashes non-null;
- integrityFailureIsHardStop and transportMustBeIntegrityChecked const true;
- manifest hash-chain (genesis-only null prev link);
- adapter must bind to an existing base and pin its exact content hash.

Includes valid example plus negative fixtures for adapter/base drift,
missing base, and soft integrity.
@mdheller
mdheller force-pushed the feat/model-carry-content-addressed-manifest branch from 349e8fe to 52d3e71 Compare August 3, 2026 05:51
@mdheller
mdheller merged commit ff6845a into main Aug 3, 2026
@mdheller
mdheller deleted the feat/model-carry-content-addressed-manifest branch August 3, 2026 05:51
mdheller added a commit that referenced this pull request Aug 3, 2026
Adds ConfidentialComputeEscalation (SourceOS-vs-Apple ModelCarry spec
section 5.2): model execution escalates to a higher confidential-compute
tier (on_device -> sealed_enclave -> attested_tee) based on the
data-residency / sensitivity class of the inputs, and the escalation
decision is governed and receipted.

- contracts/confidential-compute-escalation.schema.json: ordered compute
  tier lattice, sensitivity/residency class -> minimum-tier map, and a
  receipted decision record (chosen tier + reason + attestationRef +
  SHA-256 receipt). SHA-256 is the authoritative receipt hash (FIPS 180-4).
- tools/validate_confidential_compute_escalations.py: structural validator
  with teeth, wired into make validate.

Teeth (fail-closed is the core invariant):
- a request satisfied by its chosen tier VERIFIES;
- a request run BELOW its required minimum tier is REJECTED;
- a chosen tier requiring attestation with no attestationRef is REJECTED;
- a non-monotonic tier lattice is REJECTED;
- an undeclared sensitivity class is REJECTED (never defaulted).

Follow-up (@mdheller): live TEE attestation verification; governed staged
pre-load + atomic swap (#21).

Refs #22, #20.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant