gunk-dev/the-valley

contribute.md

source8fc23bb2bc1bmain's published tip history
2.1 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 attestation** — a structured claim about what ran: inputs, derivations, outputs,
25 results.
264. **Sign and publish to the transparency log** — same SSH key as the commit; the inclusion proof is
27 appended as a sidecar.
285. **Store the attestation in the repo** — as a git blob under
29 `refs/the-valley/attestations/<commit-sha>`, fetchable and lookupable by SHA.
306. **Signal integration intent** — a second ref, `refs/the-valley/integration-requests/<name>`,
31 pointing at the topic commit; without it, the topic branch is just a backup.
327. **Push atomically** — `git push --atomic` of topic branch + attestation ref + request ref; all
33 three land or none do.
348. **Server-side projection** — the bare repo's `post-receive` hook emits one bus event per updated
35 ref; it is a pure projection, no policy and no verification.
36
37## The one invariant
38
39The bare repo's `pre-receive` hook enforces exactly one structural rule: only the integrator's key
40may write protected refs, and attestation refs are create-only. Everything else is open to anyone
41with push access. All complex policy lives in the integrator ([architecture.md](./architecture.md),
42_The one structural git invariant_).