| 1 | // the-valley's project layer: what this one project declares above the |
| 2 | // floor. The floor is the owning valley's (qinling policy/instance); this |
| 3 | // layer binds the-valley alone, and a project can only add to its own |
| 4 | // layer (dcr-f41f718). |
| 5 | package verification |
| 6 | |
| 7 | project: { |
| 8 | // the-valley keeps a knowledge graph, so it takes the lint the docs |
| 9 | // template offers rather than declining it. |
| 10 | #docs |
| 11 | |
| 12 | // The graph is archived under archive/.the-valley/, which the |
| 13 | // template's `.the-valley/**` does not reach, so the knowledge class |
| 14 | // adds the archived path. nix/checks/knowledge.nix lints that root. |
| 15 | classes: knowledge: paths: "archive/.the-valley/**": true |
| 16 | |
| 17 | // Every check below is the flake check of the same name in |
| 18 | // nix/checks.nix, built for the runner's own system. own-policy holds |
| 19 | // this list to that: a name here that the flake does not define fails |
| 20 | // it. |
| 21 | for n in [ |
| 22 | "valleyhook-unit", |
| 23 | "protect-e2e", |
| 24 | "note-unit", |
| 25 | "attest-unit", |
| 26 | "attest-conformance", |
| 27 | "attest-e2e", |
| 28 | "identity-unit", |
| 29 | "identity-e2e", |
| 30 | "integrator-unit", |
| 31 | "integrator-e2e", |
| 32 | "sigverify-unit", |
| 33 | "sigverify-e2e", |
| 34 | "valley-status-unit", |
| 35 | "valley-cli", |
| 36 | "review-notes", |
| 37 | "valley-request", |
| 38 | "valley-status", |
| 39 | "valley-darwin-eval", |
| 40 | "policy-deriver", |
| 41 | "own-policy", |
| 42 | "module-eval", |
| 43 | "cue-vet", |
| 44 | "attest-schema", |
| 45 | "identity-schema", |
| 46 | "knowledge-lint-consumer", |
| 47 | "knowledge-lint-rejects", |
| 48 | ] { |
| 49 | checks: (n): { |
| 50 | runner: "nix" |
| 51 | attribute: n |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | // The integrator's scenarios take about a minute, where every other |
| 56 | // check here takes seconds once its packages are built. |
| 57 | checks: "integrator-e2e": cost: "slow" |
| 58 | |
| 59 | // Each class below is one part of the tree and the checks that read it. |
| 60 | // A path in two classes owes both sets. A Go module's unit check is its |
| 61 | // package, whose checkPhase runs `go test`. |
| 62 | |
| 63 | // The pre-receive hook and the git user's login shell. protect-e2e |
| 64 | // pushes to bare repositories wired with the hook a host renders. |
| 65 | classes: valleyhook: { |
| 66 | paths: "valleyhook/**": true |
| 67 | requires: "valleyhook-unit": true |
| 68 | requires: "protect-e2e": true |
| 69 | } |
| 70 | |
| 71 | // The note envelope. The hook and attest both read notes through it, so |
| 72 | // a change to it owes their tests as well as its own. |
| 73 | classes: note: { |
| 74 | paths: "note/**": true |
| 75 | requires: "note-unit": true |
| 76 | requires: "valleyhook-unit": true |
| 77 | requires: "protect-e2e": true |
| 78 | requires: "attest-unit": true |
| 79 | requires: "attest-e2e": true |
| 80 | } |
| 81 | |
| 82 | // The attestation helper, and the conformance vectors under |
| 83 | // attest/conformance/ that hold its written form fixed. |
| 84 | classes: attest: { |
| 85 | paths: "attest/**": true |
| 86 | requires: "attest-unit": true |
| 87 | requires: "attest-conformance": true |
| 88 | requires: "attest-e2e": true |
| 89 | } |
| 90 | |
| 91 | // The identity registry compiler, and the registries it is driven over. |
| 92 | classes: identity: { |
| 93 | paths: "identity/**": true |
| 94 | paths: "examples/identity/**": true |
| 95 | requires: "identity-unit": true |
| 96 | requires: "identity-e2e": true |
| 97 | } |
| 98 | |
| 99 | // The integrator, and the end-to-end scenarios under integrator/e2e/. |
| 100 | classes: integrator: { |
| 101 | paths: "integrator/**": true |
| 102 | requires: "integrator-unit": true |
| 103 | requires: "integrator-e2e": true |
| 104 | } |
| 105 | |
| 106 | // The security-key signature verifier. |
| 107 | classes: sigverify: { |
| 108 | paths: "sigverify/**": true |
| 109 | requires: "sigverify-unit": true |
| 110 | requires: "sigverify-e2e": true |
| 111 | } |
| 112 | |
| 113 | // The valley CLI: the script, its status helper, and its completions. |
| 114 | classes: cli: { |
| 115 | paths: "bin/valley": true |
| 116 | paths: "status/**": true |
| 117 | paths: "completions/**": true |
| 118 | requires: "valley-status-unit": true |
| 119 | requires: "valley-cli": true |
| 120 | requires: "review-notes": true |
| 121 | requires: "valley-request": true |
| 122 | requires: "valley-status": true |
| 123 | requires: "policy-deriver": true |
| 124 | } |
| 125 | |
| 126 | // The verification policy: this layer, the pointer to the owning |
| 127 | // valley, the schema a policy is written in, and the example policies |
| 128 | // the deriver and cue-vet read. |
| 129 | classes: policy: { |
| 130 | paths: "policy/**": true |
| 131 | paths: "schema/verification.cue": true |
| 132 | paths: "examples/policy/**": true |
| 133 | requires: "policy-deriver": true |
| 134 | requires: "cue-vet": true |
| 135 | requires: "own-policy": true |
| 136 | } |
| 137 | |
| 138 | // The flake, the NixOS module, the packages and the check definitions, |
| 139 | // and the host declarations the module checks are evaluated over. |
| 140 | // own-policy is here because renaming or removing a flake check would |
| 141 | // leave this layer naming a check that no longer exists. |
| 142 | classes: nix: { |
| 143 | paths: "nix/**": true |
| 144 | paths: "flake.nix": true |
| 145 | paths: "flake.lock": true |
| 146 | paths: "examples/host.cue": true |
| 147 | paths: "examples/hosts/**": true |
| 148 | requires: "module-eval": true |
| 149 | requires: "valley-darwin-eval": true |
| 150 | requires: "cue-vet": true |
| 151 | requires: "own-policy": true |
| 152 | } |
| 153 | |
| 154 | // The schemas, and the example events, attestations and registries they |
| 155 | // are vetted against. |
| 156 | classes: schema: { |
| 157 | paths: "schema/**": true |
| 158 | paths: "examples/events/**": true |
| 159 | paths: "examples/attestations/**": true |
| 160 | paths: "examples/identity/**": true |
| 161 | requires: "cue-vet": true |
| 162 | requires: "attest-schema": true |
| 163 | requires: "identity-schema": true |
| 164 | } |
| 165 | |
| 166 | // The knowledge lint itself: its program, the node schema it holds a |
| 167 | // graph to, and the example graphs it must accept and reject. |
| 168 | classes: "knowledge-lint": { |
| 169 | paths: "nix/knowledge-lint.*": true |
| 170 | paths: "schema/node.cue": true |
| 171 | paths: "examples/graphs/**": true |
| 172 | requires: "knowledge-lint": true |
| 173 | requires: "knowledge-lint-consumer": true |
| 174 | requires: "knowledge-lint-rejects": true |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | // What no class above covers falls to the floor's `unclassified` rule and |
| 179 | // owes prose-format alone. That is the research artefacts under research/, |
| 180 | // the GitHub mirror's workflow under .github/, and editor settings: files |
| 181 | // no program here reads. |