gunk-dev/the-valley

contribute.md

source5c321a9ff56fmain's published tip history
2.0 KiB · Rendered
1# Contributor protocol
2
3What a contributor (human or agent) does to push a change and request its integration into a protected ref.
4
5## Four properties
6
7A push that is:
8
91. **Cryptographically attributable** to the contributor.
102. **Accompanied by a signed promise** that the repo's canonical check set passed locally in a hermetic environment.
113. **Externally tamper-evident** via inclusion in a transparency log.
124. **Explicitly marked** as ready for integration into a target branch.
13
14All four are produced by one atomic `git push` — native git verbs plus one helper for attestation composition, no `git` wrapper command.
15
16## The steps
17
181. **Commit, signed natively** — SSH commit signing, no GPG.
192. **Run the canonical check set** — the repo's `flake.nix` check derivations, locally and hermetically, via one helper (e.g. `nix run .#attest`); if any fails, nothing is published.
203. **Compose the attestation** — a structured claim about what ran: inputs, derivations, outputs, results.
214. **Sign and publish to the transparency log** — same SSH key as the commit; the inclusion proof is appended as a sidecar.
225. **Store the attestation in the repo** — as a git blob under `refs/the-valley/attestations/<commit-sha>`, fetchable and lookupable by SHA.
236. **Signal integration intent** — a second ref, `refs/the-valley/integration-requests/<name>`, pointing at the topic commit; without it, the topic branch is just a backup.
247. **Push atomically** — `git push --atomic` of topic branch + attestation ref + request ref; all three land or none do.
258. **Server-side projection** — the bare repo's `post-receive` hook emits one bus event per updated ref; it is a pure projection, no policy and no verification.
26
27## The one invariant
28
29The bare repo's `pre-receive` hook enforces exactly one structural rule: only the integrator's key may write protected refs, and attestation refs are create-only. Everything else is open to anyone with push access. All complex policy lives in the integrator ([architecture.md](./architecture.md), *The one structural git invariant*).