gunk-dev/the-valley

contribute.md

source8653db9d1ae2main's published tip history
2.9 KiB · Rendered
1# Contributor protocol
2
3What a contributor (human or agent) does to push a change and request its integration into a
4protected ref.
5
6## Four properties
7
8A push that is:
9
101. **Cryptographically attributable** to the contributor.
112. **Accompanied by a signed promise** that the repo's canonical check set passed locally in a
12 hermetic environment.
133. **Externally tamper-evident** via inclusion in a transparency log.
144. **Explicitly marked** as ready for integration into a target branch.
15
16All four are produced by one atomic `git push` — native git verbs plus one helper for attestation
17composition, no `git` wrapper command.
18
19## The steps
20
211. **Commit, signed natively** — SSH commit signing, no GPG.
222. **Run the canonical check set** — the repo's `flake.nix` check derivations, locally and
23 hermetically, via one helper (e.g. `nix run .#attest`); if any fails, nothing is published.
243. **Compose the statements** — one per check, each a typed, versioned record of what ran, over
25 what, with what result, plus the provenance of the run that produced the change. The subject is a
26 digest set whose primary member is a content-addressed digest of the resulting tree; a commit
27 hash may accompany it as an advisory member, never relied on for identity
28 ([dcr-0de694f](../.the-valley/decisions/dcr-0de694f-phase2-attestation-shape.md)).
294. **Sign as a note** — the host signs the statement text; the signature covers that text and
30 nothing else, and further signers add sibling lines under the same text
31 ([dcr-de9d996](../.the-valley/decisions/dcr-de9d996-statement-text-and-signed-note.md)).
325. **Store the attestation in the repo** — at a git ref keyed by the subject digest and the signer,
33 `refs/the-valley/attestations/<tree digest>/<signer key hash>`.
346. **Publish to the transparency log** — the inclusion proof is appended as a sidecar; lands with
35 [roadmap Phase 6](./roadmap.md#phase-6--trust-backstop).
367. **Signal integration intent** — how integration is requested is open. The integrator is designed
37 around change objects — a diff targeting a stream, with identity stable across rebases — rather
38 than branches, and how a change is submitted is part of that pending design
39 ([ida-93e4f91](../.the-valley/ideas/ida-93e4f91-changes-not-branches.md)).
408. **Push atomically** — `git push --atomic` of the topic branch plus its attestation refs; all land
41 or none do.
429. **Server-side projection** — the bare repo's `post-receive` hook emits one bus event per updated
43 ref; it is a pure projection, no policy and no verification.
44
45## The one invariant
46
47The bare repo's `pre-receive` hook enforces exactly one structural invariant, with two parts: only
48the integrator's key may write protected refs, and attestation refs are create-only. Everything else
49is open to anyone with push access. All complex policy lives in the integrator
50([architecture.md](./architecture.md), _The one structural git invariant_).