| 1 | --- |
| 2 | type: idea |
| 3 | id: ida-5006606 |
| 4 | status: adopted |
| 5 | title: A project names its owning valley in its own tree |
| 6 | created: 2026-08-22 |
| 7 | source: review of the asker's policy defaults, 2026-08-22 |
| 8 | --- |
| 9 | |
| 10 | # A project names its owning valley |
| 11 | |
| 12 | Authority points downward: valley membership is law, so the valley declares its projects in its own |
| 13 | repository, the same way it grants everything else. A project cannot claim its own governor. Until |
| 14 | that declaration has an implementation — it arrives with the multi-valley work — the host a project |
| 15 | runs on carries the declaration, because the host is where the project already runs under one |
| 16 | valley's law. |
| 17 | |
| 18 | A project also carries a pointer, `policy/valley`, one line in its own tree naming that valley's |
| 19 | repository as `git fetch` takes it. The pointer is discovery, not authority: a claim a client |
| 20 | follows and then checks against the valley's declaration once that declaration exists. A mismatch is |
| 21 | a loud error. The valley's declaration is the truth; the pointer is only how a client finds it |
| 22 | before it can ask the valley directly. |
| 23 | |
| 24 | Anything that derives the project's policy follows the pointer, fetches the named repository, and |
| 25 | takes the floor from `policy/instance` at that repository's integrated tip ([[dcr-f41f718]] |
| 26 | ([decisions/dcr-f41f718-declared-verification-policy.md](../decisions/dcr-f41f718-declared-verification-policy.md)), |
| 27 | [[dcr-9b5da04]] |
| 28 | ([decisions/dcr-9b5da04-hosts-serve-isolated-valleys.md](../decisions/dcr-9b5da04-hosts-serve-isolated-valleys.md))). |
| 29 | A valley's own config repository carries `policy/instance` and uses its own, so it needs no pointer. |
| 30 | Fetch is all the pointer asks for: anyone the valley governs already holds fetch on the valley. |
| 31 | |
| 32 | ## The rule this exists to keep |
| 33 | |
| 34 | **A gate's default sources are the ones that govern the project. Every other layer is reachable only |
| 35 | by naming it.** A tool with no way to find the floor will be given one anyway, and the tempting |
| 36 | substitute is whatever policy directory the tree already contains. Each layer defaults to a real |
| 37 | source and refuses loudly when that source is absent; the options that point elsewhere stay, for a |
| 38 | person to name explicitly. |
| 39 | |
| 40 | ## The client derives from exactly the sources the integrator uses |
| 41 | |
| 42 | Every source the derivation reads is a source the integrator reads. The project's own layer comes |
| 43 | from the target's tip. The pointer naming the owning valley comes from the target's tip. The floor |
| 44 | comes from that valley's integrated tip. None of them comes from the working tree, because a change |
| 45 | never supplies the policy that gates it, and neither does whoever happens to be reviewing it. Review |
| 46 | works identically from any branch, however stale, so there is nothing to synchronize before |
| 47 | reviewing. |
| 48 | |
| 49 | Absence has to agree too, layer by layer: a target carrying no project layer is derived under the |
| 50 | floor alone; a floor that is not there is refused. |
| 51 | |
| 52 | ## The pointer is never the gate |
| 53 | |
| 54 | A change can edit `policy/valley`, because it is a file in the tree like any other file, and that |
| 55 | costs nothing: the pointer is not what gates anything. The integrator composes the policy from its |
| 56 | own configuration and from the target ref's tip, so a branch that repoints its own floor is judged |
| 57 | under the floor it tried to leave — the same shape as every other part of the policy a change cannot |
| 58 | supply for itself. |
| 59 | |
| 60 | ## The pointer is transitional |
| 61 | |
| 62 | Once addressing carries the valley — the ssh user a client connects as already selects the valley — |
| 63 | discovery collapses into the clone URL itself, and the breadcrumb retires. Until then, the pointer |
| 64 | is what lets a checkout on a contributor's machine find its floor at all: nothing else gives that |
| 65 | answer to `valley checks` or to review's `[a]sk`, both of which need it before either can report |
| 66 | what a change owes. |
| 67 | |
| 68 | ## Open |
| 69 | |
| 70 | - Nothing caches the fetch. Every derivation reaches the valley's repository again, which is right |
| 71 | for a verb a person runs and wrong for anything run per commit. |
| 72 | - The pointer names a repository and takes the ref as given (`refs/heads/main`). A valley whose |
| 73 | integrated tip is some other ref has no way to say so yet. |