Skip to content

docs/adr: 0028 sketch — content-addressed artifacts (read by CID, write by append + bind) - #381

Open
hartsock wants to merge 2 commits into
mainfrom
adr/0028-content-addressed-artifacts
Open

docs/adr: 0028 sketch — content-addressed artifacts (read by CID, write by append + bind)#381
hartsock wants to merge 2 commits into
mainfrom
adr/0028-content-addressed-artifacts

Conversation

@hartsock

Copy link
Copy Markdown
Member

Summary

Proposed/sketch ADR deciding how content identity enters Bridle's fs authority and evidence — architecture-before-implementation, no code.

  • D1 CIDs are exact scope tokens and evidence links — never a new Caveats axis, never bearer authority ("a CID identifies, it never authorizes").
  • D2 Reads of immutable artifacts = fs_read on a harness-owned <store>/<cid>; the existing Landlock fence enforces it at Kernel grade because rules are inode-keyed and the child holds no fs_write on the store. The path rule is the CID rule — zero protocol change.
  • D3 Trees are the content-addressable crate's DAG shapes (feat(shell): wire the Landlock fs_write L3 boundary into the engine (#35) #53); containment = DAG leaf closure.
  • D4 Writes = append(store) + bind(ref → CID), performed by the harness under fs_write on the ref path; fs_write never targets a CID; working trees stay path-shaped.
  • D5 Evidence binds input CIDs, action id, AdmittedFenceId, output CIDs — closes two ASM-CID hops.
  • D6/D7 Verify consumed bytes or rely on store immutability (hash-then-reread is racy); exec-by-content deferred; ASM-STORE and Inspect residuals named.

Identity policy for raw artifacts (codec / text / algorithm) is deliberately deferred to hartsock/content-addressable#84 so this does not become the workspace's fifth hash convention.

Worked example: Jupyter as a hermetic action (execute(notebook: CID) → CID), motivated by newt-agent#1730.

Test plan

Docs only. just check-security (internal-specifics + docs-accuracy) and the full pre-push hook passed locally. Proof obligations for the eventual implementation are listed in the ADR under ADR 0023 tiers.

Not for merge without human review — it is a design decision.

…te by append + bind)

WHAT: a Proposed/sketch ADR deciding how content identity enters Bridle's
fs authority and evidence: CIDs as exact scope tokens (never a new Caveats
axis, never bearer authority); reads of immutable artifacts as fs_read on a
harness-owned <store>/<cid> so the existing Landlock fence enforces the CID
rule at Kernel grade; trees as the content-addressable crate's DAG shapes
with containment = DAG closure; writes as append(store) + bind(ref -> CID)
performed by the harness under fs_write on the ref path; evidence binding
input/action/fence/output CIDs (closes two ASM-CID hops); named residuals.

WHY: the exact-token meet is semantically empty for path scopes and a path
grant approves a location, not the bytes; content identity fixes both for
immutable inputs and outputs, and Jupyter (newt#1730) is value -> action ->
value shaped. Identity policy for raw artifacts is deferred to
content-addressable#84 so this does not become a fifth hash convention.

Verified inputs recorded in the ADR: Landlock rules are inode-keyed; no
kernel content enforcement on the reference host; hash-then-reread is racy.

Co-authored-by: Claude <noreply@anthropic.com>
…tentId, typed-bytes identity, #84-first sequencing)

WHAT: replace the deferred 'codec decided elsewhere' language with the
resolved contract: RawContentId for artifacts, ContentId for records,
VerifiedCid for foreign identities; ArtifactRef<RawContentId> compared as
typed normalized CID bytes (never text, never bare digest); Raw(X) != Content(X)
as a proof vector; alternatives + sequencing updated (#84 lands before any
grant carries an artifact id).

WHY: #84 was resolved decisively on 2026-08-16; the ADR should consume the
identity contract, not restate an open question.

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high High-risk change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant