gunk-dev/the-valley

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

source0bf55f00eff4main's published tip history
2.1 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 the contributor's claim about the change. Policy maps path classes to required checks:
13
14- `.the-valley/**` only → signature + knowledge lint: frontmatter vetted against a CUE `#Node` schema (types, status enums, id derived from slug, filename coherence) and reference integrity (`[[wiki-links]]`, `blocked_by` ids, and relative links all resolve).
15- Code → the full check suite ([verification.md](../../design/verification.md)).
16- Mixed → the max of everything touched, automatically.
17
18Because routing is computed from the tree, there is no "node door" to smuggle code through. Mixed commits are a feature, not a hole — "a landed change closes the outcome it serves" wants code and node flip in one commit, and that commit simply carries code-level requirements. This is also the argument for knowledge staying in-tree rather than on its own ref: one protection mechanism, proportionate checks, no split in the one-clone durability story.
19
20The policy itself is data — path classes and required checks — so it is a CUE document, versioned in-repo and validated like everything else. One schema language then covers config, events, and knowledge.
21
22The knowledge lint has three lifetimes: a `nix flake check` derivation today (no integrator needed), the required attestation for `.the-valley/**` diffs at the integrator rung ([architecture.md](../../design/architecture.md)), and a pure, witness-re-derivable check under the trust backstop. Same derivation throughout.
23
24## Related
25
26- Extends the one-structural-invariant idea (only the integrator writes protected refs) one level down, path-wise within a ref.
27- The scheduling context this serves: [[ida-3145b7a]] — cheap node integration keeps the graph a live coordination surface, not ceremony.