gunk-dev/the-valley

ida-1ec03b1-path-scoped-verification-policy.md

sourcef5c9a830d01emain's published tip history
2.7 KiB · Rendered
1---
2type: idea
3id: ida-1ec03b1
4status: exploring
5title: Verification policy is path-scoped — required attestations are a function of the diff
6created: 2026-07-06
7source: conversation, 2026-07-06
8---
9
10# Verification policy is path-scoped
11
12The integrator derives a change's required attestation set from the **actual tree diff**, never from
13the contributor's claim about the change. Policy maps path classes to required checks:
14
15- `.the-valley/**` only → signature + knowledge lint — its checks are enumerated once, in
16 [.the-valley/README.md](../README.md) — and prose format (below).
17- Code → the full check suite ([verification.md](../../design/verification.md)).
18- Mixed → the max of everything touched, automatically.
19
20Because routing is computed from the tree, there is no "node door" to smuggle code through. Mixed
21commits are a feature, not a hole — "a landed change closes the outcome it serves" wants code and
22node flip in one commit, and that commit simply carries code-level requirements. This is also the
23argument for knowledge staying in-tree rather than on its own ref: one protection mechanism,
24proportionate checks, no split in the one-clone durability story.
25
26The policy itself is data — path classes and required checks — so it is a CUE document, versioned
27in-repo and validated like everything else. One schema language then covers config, events, and
28knowledge.
29
30The knowledge lint has three lifetimes: a `nix flake check` derivation today (no integrator needed),
31the required attestation for `.the-valley/**` diffs at the integrator rung
32([architecture.md](../../design/architecture.md)), and a pure, witness-re-derivable check under the
33trust backstop. Same derivation throughout.
34
35Prose format (decided 2026-07-17): markdown prose is filled paragraphs hard-wrapped at 100
36characters by a deterministic formatter. The check is formatter idempotence — formatting the tree
37changes nothing — which is deterministic, judgment-free, and off the shelf. Rationale: humans read
38these files raw, and filled paragraphs are the readable shape in a terminal; semantic line breaks
39(one sentence per line) diff better but read badly raw, and no deterministic formatter can enforce
40them. Hard wrap's cost — a one-word edit can re-flow a paragraph in the diff — is mitigated at
41review time by delta's word-level highlighting in `valley review`. The corpus reformat is one
42mechanical sweep in a single commit, so blame churn is contained.
43
44## Related
45
46- Extends the one-structural-invariant idea (only the integrator writes protected refs) one level
47 down, path-wise within a ref.
48- The scheduling context this serves: [[ida-3145b7a]] — cheap node integration keeps the graph a
49 live coordination surface, not ceremony.