| 1 | --- |
| 2 | type: idea |
| 3 | id: ida-a9e274c |
| 4 | status: exploring |
| 5 | title: A check a policy mandates is supplied by the instance, not by the project it checks |
| 6 | created: 2026-08-02 |
| 7 | source: design conversation, 2026-08-02 |
| 8 | --- |
| 9 | |
| 10 | # A check a policy mandates comes from the instance |
| 11 | |
| 12 | When a verification policy requires a check by name, that name must resolve to a derivation the |
| 13 | instance supplies. The project being checked contributes the tree, and nothing else. A flake input |
| 14 | is how the derivation arrives: the instance's repository is an input of the project's flake, and the |
| 15 | project instantiates the check over its own source. |
| 16 | |
| 17 | The alternative is that every project writes the check itself and the policy trusts the name. Then |
| 18 | the policy says `knowledge-lint` and each project decides what those characters mean — which makes |
| 19 | the floor a naming convention rather than a floor. A group with ten projects would have ten lints |
| 20 | drifting apart, and the one that drifted would be the one that stopped failing. |
| 21 | |
| 22 | Supplying the derivation carries the toolchain with it. The instance pins the versions the check |
| 23 | runs against, so two projects in a group get the same answer for the same tree, and a project cannot |
| 24 | weaken a check by pinning an older tool. This is why the exposed entry point takes a system and a |
| 25 | tree rather than a package set: a consuming project needs no nixpkgs of its own for a check it did |
| 26 | not write. |
| 27 | |
| 28 | What the project keeps is the decision to be checked at all, which is exactly what the policy layers |
| 29 | already govern ([[dcr-f41f718]]): the instance floor states what a project cannot take back, and the |
| 30 | project document selects the rest. This idea is about where the check's code comes from once the |
| 31 | policy has named it, and it applies to every check a floor can mandate, not only the knowledge lint |
| 32 | ([[ida-1ec03b1]]). |
| 33 | |
| 34 | ## Consequences |
| 35 | |
| 36 | - The instance repository becomes a dependency of every project it governs, and its availability |
| 37 | becomes a build-time concern. A project that cannot fetch the instance flake cannot run the checks |
| 38 | the instance mandates. |
| 39 | - Upgrading a check is a change in one repository, and it reaches projects when they update the |
| 40 | input. Which means a project can sit on an old input and run an old check — the input revision a |
| 41 | project pins is itself something a policy may eventually have to say something about. |
| 42 | - A project may still write checks of its own. Nothing here narrows what a project can add; it |
| 43 | narrows where the mandated ones come from. |
| 44 | |
| 45 | ## Related |
| 46 | |
| 47 | - [[dcr-f41f718]] |
| 48 | ([decisions/dcr-f41f718-declared-verification-policy.md](../decisions/dcr-f41f718-declared-verification-policy.md)) |
| 49 | — the two policy layers this sits under. |
| 50 | - [[ida-1ec03b1]] |
| 51 | ([ideas/ida-1ec03b1-path-scoped-verification-policy.md](./ida-1ec03b1-path-scoped-verification-policy.md)) |
| 52 | — path-scoped policy, and the knowledge lint's three lifetimes. |
| 53 | - [[ida-b9f646c]] |
| 54 | ([ideas/ida-b9f646c-nix-backend-not-substrate.md](./ida-b9f646c-nix-backend-not-substrate.md)) — a |
| 55 | flake input is one backend for this, not the substrate; a check named by policy must be resolvable |
| 56 | without Nix eventually. |