gunk-dev/the-valley

ida-5006606-a-project-names-its-owning-valley.md

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