gunk-dev/the-valley

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

sourcec3e97f086eb3main's published tip history
3.0 KiB · Rendered
1---
2type: idea
3id: ida-5006606
4status: adopted
5title: "Let clients discover a project's owning valley from the target tree"
6created: 2026-08-22
7source: review of the asker's policy defaults, 2026-08-22
8---
9
10# Let clients discover a project's owning valley from the target tree
11
12A project carries a `policy/valley` file naming its owning valley's repository. Clients follow it to
13find the governing policy. Ownership itself is declared by the valley; the project's pointer is a
14discovery aid.
15
16The planned valley membership declaration arrives with support for multiple valleys. Until then,
17host configuration supplies the ownership declaration used by the running integration service.
18
19## Discovery
20
21The pointer contains one repository address in a form accepted by `git fetch`. Policy tools fetch
22that repository and read `policy/instance` from its integrated tip.
23
24A valley repository carries its own `policy/instance` and can use that directly. It needs no pointer
25to itself. Principals governed by a valley need fetch access to its policy repository.
26
27Once the authoritative membership declaration exists, a client must check that it agrees with the
28pointer. A mismatch must produce an error.
29
30## Match the integrator's inputs
31
32A client must derive checks from the same sources as the integrator:
33
34- Project policy from the target branch's tip.
35- The ownership pointer from that same tip.
36- The floor from the owning valley's integrated tip.
37
38Working-tree files and the proposed branch do not supply these inputs. Review should therefore give
39the same answer from any checkout, including a stale one.
40
41A missing project layer adds nothing to the floor. Missing or unreadable governing inputs must be
42reported under the current resolver's rules.
43[[dcr-9c75283]](../decisions/dcr-9c75283-substrate-adoption-and-the-core.md) defines the separate
44core-based bootstrap design and its activation prerequisite.
45
46Tools should default to these real governing sources. Alternate sources remain useful for explicit
47inspection or testing, but must be selected deliberately.
48
49## Authority and later discovery
50
51A proposed edit to `policy/valley` is evaluated under the policy that already governs the target. It
52cannot use its own replacement pointer to choose the rules for admitting itself. The running
53integrator also has its configured ownership source.
54
55Once repository addressing reliably identifies the valley, discovery may be possible from the clone
56URL. The explicit pointer could then be retired. Until that mechanism exists, the pointer lets
57`valley checks` and review's `[a]sk` find the floor.
58
59## Open questions
60
61Each derivation currently fetches the valley repository again. Frequent automated use needs an
62appropriate caching and freshness policy.
63
64The pointer identifies a repository but assumes `refs/heads/main`. It cannot yet select another
65integrated ref.
66
67[[dcr-f41f718]](../decisions/dcr-f41f718-declared-verification-policy.md) defines policy
68composition, and [[dcr-9b5da04]](../decisions/dcr-9b5da04-hosts-serve-isolated-valleys.md) defines
69project ownership and hosting.