gunk-dev/the-valley

contribute.md

source4dc8a2218c87main's published tip history
5.1 KiB · Rendered
1# Contributor protocol
2
3A contributor publishes a signed change, supplies the required verification evidence, and explicitly
4requests integration. The same protocol applies to humans and agents.
5
6Publishing a topic branch makes the work available for review. Requesting integration asks the
7integrator to evaluate it and, if policy is satisfied, update the protected branch.
8
9## Publishing and requesting integration
10
11Commit the work with native SSH commit signing, then push the topic branch to the project's
12canonical `origin`:
13
14```sh
15git push --set-upstream origin <branch>
16```
17
18Use the valley review helper to inspect the published change:
19
20```sh
21nix run .#valley -- review <branch>
22```
23
24The helper fetches and reviews `origin/<branch>` against `origin/main`. At its prompt:
25
26- `[s]kip` leaves the change available for later review.
27- `[b]ase`, when offered, rebases it in a temporary worktree, pushes with a lease, and returns to
28 review of the resulting diff.
29- `[a]sk` runs the required checks, signs their results, and publishes an integration request.
30 Choose it when the change is ready to be evaluated for landing.
31- `[r]eject` deletes the remote branch after confirmation.
32
33The review prompt's `[a]sk` action currently targets `main`. It reads the project policy from the
34target's integrated tip and the floor from the owning valley's integrated repository. It runs checks
35over a temporary checkout of the published branch, not over the reviewer's working files.
36
37When checks are required, `VALLEY_ATTEST_KEY` must name the host's Ed25519 signing-key file.
38`VALLEY_ATTEST_NAME` optionally selects the signing name. The integrator must recognize that signer.
39This configuration is separate from native Git commit signing.
40
41The evidence and request are sent in one `git push --atomic`. The branch is already on `origin`, so
42it is not part of that second push. A check or signing failure publishes no request. An atomic-push
43failure publishes neither the request nor new evidence on the remote.
44
45The CLI does not write `main`. The integrator evaluates the request and records its outcome. GitHub,
46when configured as a publication mirror, is not part of this review or integration path.
47
48## Records in the protocol
49
50| Record | Purpose |
51| ----------------------- | ------------------------------------------------------------------------------------------ |
52| Signed commit | Attribute the authored repository change |
53| Check statement | Identify the checked tree, check, result, and supplied provenance |
54| Signed note | Attribute that statement to its signer and permit additional signatures over the same text |
55| Attestation ref | Store evidence by tree digest and signer |
56| Integration request ref | Name the submitted head and target stream |
57
58Attestations are stored at:
59
60```text
61refs/the-valley/attestations/<tree digest>/<signer key hash>
62```
63
64A request is a ref pointing to the change's head:
65
66```text
67refs/the-valley/integration-requests/<target>/<change>
68```
69
70The current review helper derives the change name from the branch name, replacing slashes with
71dashes, and prints the resulting request ref. The integrator derives the delta from the head and its
72merge base with the target.
73
74A policy that requires no check still permits a request. The helper reports that case and sends the
75request without check evidence or an attestation key. The integrator records explicitly that no
76checks were required.
77
78## Using the lower-level helper
79
80`nix run .#attest -- run` runs checks and stores signed notes. Its `--push` option atomically
81publishes the topic branch and evidence, but does not request integration. Native Git can publish a
82request ref when the caller has assembled the required evidence. `valley review` provides the
83current combined evidence-and-request workflow.
84
85[Verification](./verification.md) defines the helper options, signed bytes, and storage.
86[Integration](./integration.md) defines request evaluation and evidence transfer.
87
88## Enforcement and planned additions
89
90Protected refs are reserved for the integrator. Attestation refs are create-only through the receive
91boundary. Other namespaces currently follow push access; the
92[project-scoped permissions](../.the-valley/decisions/dcr-e544f20-access-is-verbs-on-projects.md)
93need additional enforcement.
94
95Submitting a request is separate from supplying human approval. The
96[core decision](../.the-valley/decisions/dcr-9c75283-substrate-adoption-and-the-core.md) requires
97signed physical approval by default, with policy exemptions for ordinary work. That mechanism must
98be available before the requirement is activated. Clicking `[a]sk` does not itself produce that
99future approval evidence.
100
101External transparency publication and inclusion proofs are planned for
102[Phase 6](./roadmap.md#phase-6--trust-backstop). Current local attestations do not include that
103guarantee.