gunk-dev/the-valley

policy.cue

sourceaf38e23853bamain's published tip history
26.6 KiB
1// the-valley's project layer: what this one project declares above the
2// floor. The floor is the owning valley's policy/instance; this
3// layer binds the-valley alone, and a project can only add to its own
4// layer (dcr-f41f718).
5package verification
6
7import (
8 "list"
9 "strings"
10)
11
12project: {
13 // the-valley takes no knowledge lint of its own tree. The docs
14 // template's lint checks a knowledge graph kept in the source, and
15 // the-valley's source holds none: its plan graph is project storage, at
16 // refs/the-valley/knots, and the push hook holds it to the knot
17 // module's rules. The nodes under archive/.the-valley/ are history that
18 // never changes, so linting them against today's schema protects
19 // nothing. The lint itself stays covered: the knowledge-lint class
20 // below requires its consumer and rejection checks.
21
22 // Every check below is the flake check of the same name in
23 // nix/checks.nix, built for the runner's own system. own-policy holds
24 // this list to that: a name here that the flake does not define fails
25 // it.
26 let ownChecks = [
27 "valleyhook-unit",
28 "protect-e2e",
29 "knots-e2e",
30 "note-unit",
31 "exactjson-unit",
32 "change-unit",
33 "knot-unit",
34 "knot-agree",
35 "delta-unit",
36 "derive-unit",
37 "review-unit",
38 "attest-unit",
39 "attest-conformance",
40 "attest-e2e",
41 "identity-unit",
42 "identity-e2e",
43 "approval-unit",
44 "integrator-unit",
45 "integrator-e2e",
46 "restack-unit",
47 "restack-e2e",
48 "signers-e2e",
49 "sigverify-unit",
50 "sigverify-e2e",
51 "web-unit",
52 "web-server-unit",
53 "web-reader-state-crash",
54 "web-reader-browser-e2e",
55 "web-receiver-unit",
56 "readaccess-unit",
57 "rebase-unit",
58 "valley-go-unit",
59 "valley-cli",
60 "review-notes",
61 "valley-request",
62 "valley-status",
63 "valley-ready",
64 "valley-changes",
65 "valley-knot",
66 "valley-plan",
67 "valley-darwin-eval",
68 "selfupdate-unit",
69 "valley-self-update",
70 "policy-deriver",
71 "own-policy",
72 "module-eval",
73 "cue-vet",
74 "attest-schema",
75 "identity-schema",
76 "knowledge-lint-consumer",
77 "knowledge-lint-rejects",
78 "init-e2e",
79 "mirror-e2e",
80 "bus-e2e",
81 "ssh-e2e",
82 "publish-e2e",
83 "worker-e2e",
84 "telemetry-unit",
85 "telemetry-e2e",
86 "restack-host-e2e",
87 "web-publisher-e2e",
88 "web-image",
89 "web-push-e2e",
90 ]
91 for n in ownChecks {
92 checks: (n): {
93 runner: "nix"
94 attribute: n
95 }
96 }
97
98 // The integrator's scenarios take about a minute, and ssh-e2e,
99 // publish-e2e, worker-e2e, telemetry-e2e, restack-host-e2e and
100 // web-publisher-e2e boot
101 // NixOS machines. web-reader-browser-e2e boots no machine, but its
102 // closure holds Chromium, and it runs a browser in about 2 GiB.
103 // Every other check here takes seconds once its packages are built.
104 checks: "integrator-e2e": cost: "slow"
105 checks: "ssh-e2e": cost: "slow"
106 checks: "publish-e2e": cost: "slow"
107 checks: "worker-e2e": cost: "slow"
108 checks: "telemetry-e2e": cost: "slow"
109 checks: "restack-host-e2e": cost: "slow"
110 checks: "web-publisher-e2e": cost: "slow"
111 checks: "web-reader-browser-e2e": cost: "slow"
112
113 // Each class below is one part of the tree and the checks that read it.
114 // A path in two classes requires both sets. A Go module's unit check is
115 // its package built again with its tests, which runs `go test`. The
116 // package itself runs no tests (nix/packages.nix).
117
118 // The pre-receive hook and the git user's login shell. protect-e2e
119 // pushes to bare repositories wired with the hook a host renders,
120 // valley-ready pushes change records through that hook, and knots-e2e
121 // pushes the plan graph through it.
122 classes: valleyhook: {
123 paths: "valleyhook/**": true
124 requires: "valleyhook-unit": true
125 requires: "protect-e2e": true
126 requires: "valley-ready": true
127 requires: "knots-e2e": true
128 }
129
130 // The change record, which the hook guards, the CLI's Go verbs and the
131 // rebase engine write, and the integrator and the review module read.
132 // Each reads a record through it, so a change to it requires their tests
133 // as well as its own.
134 classes: change: {
135 paths: "change/**": true
136 requires: "change-unit": true
137 requires: "review-unit": true
138 requires: "valleyhook-unit": true
139 requires: "protect-e2e": true
140 requires: "rebase-unit": true
141 requires: "valley-go-unit": true
142 requires: "valley-ready": true
143 requires: "valley-changes": true
144 requires: "integrator-unit": true
145 requires: "integrator-e2e": true
146 requires: "approval-unit": true
147 }
148
149 // The plan graph's module, which the CLI's Go verbs write the graph
150 // with and the hook validates it with. knot-agree holds its validator
151 // to the node schema and the knowledge lint, valley-knot and
152 // valley-plan drive the verbs that use it, and knots-e2e pushes
153 // through the hook. The web export reads names and knot IDs by its
154 // rules, and the web server reads a claim's age by them, so
155 // web-unit and web-server-unit are here too.
156 classes: knot: {
157 paths: "knot/**": true
158 requires: "knot-unit": true
159 requires: "knot-agree": true
160 requires: "valley-go-unit": true
161 requires: "valley-knot": true
162 requires: "valley-plan": true
163 requires: "valleyhook-unit": true
164 requires: "knots-e2e": true
165 requires: "web-unit": true
166 requires: "web-server-unit": true
167 }
168
169 // valley-delta-v1, which the CLI's Go verbs compare a version with its
170 // approved version through, and which the review module recomputes a
171 // review's binding with. delta-unit holds it to its conformance vectors,
172 // valley-go-unit builds the verbs with it, valley-ready and review-notes
173 // drive review over the comparison, and review-unit binds reviews with
174 // its bounded reading.
175 classes: delta: {
176 paths: "delta/**": true
177 requires: "delta-unit": true
178 requires: "valley-go-unit": true
179 requires: "valley-ready": true
180 requires: "review-notes": true
181 requires: "review-unit": true
182 }
183
184 // Review records: the record, its binding to the version it judged, and
185 // its append-only history. review-unit runs its tests against real git.
186 classes: review: {
187 paths: "review/**": true
188 requires: "review-unit": true
189 }
190
191 // The deriver of required checks, and the composed-policy reader it reads
192 // the whole policy through. derive-unit holds the deriver to bin/valley's,
193 // and valley-go-unit builds the verb that prints its answer with both.
194 classes: derive: {
195 paths: "derive/**": true
196 paths: "composed/**": true
197 requires: "derive-unit": true
198 requires: "valley-go-unit": true
199 }
200
201 // The note envelope. The hook and attest both read notes through it,
202 // the identity compiler reads its approval files back with it, and the
203 // web export's manifest is a note, which the web server builds with,
204 // so a change to it requires their tests as well as its own.
205 classes: note: {
206 paths: "note/**": true
207 requires: "note-unit": true
208 requires: "valleyhook-unit": true
209 requires: "protect-e2e": true
210 requires: "attest-unit": true
211 requires: "attest-e2e": true
212 requires: "identity-unit": true
213 requires: "approval-unit": true
214 requires: "web-unit": true
215 requires: "web-server-unit": true
216 }
217
218 // The attestation helper, and the conformance vectors under
219 // attest/conformance/ that hold its written form fixed. restack-e2e
220 // signs the changes' evidence with attest run.
221 classes: attest: {
222 paths: "attest/**": true
223 requires: "attest-unit": true
224 requires: "attest-conformance": true
225 requires: "attest-e2e": true
226 requires: "restack-e2e": true
227 }
228
229 // The strict JSON reader. The hook reads its push policy with it, the
230 // identity compiler its registry, read access a policy/read, and the
231 // web export, publisher, server and receiver what they are sent, so a
232 // change to it requires their unit tests as well as its own.
233 classes: exactjson: {
234 paths: "exactjson/**": true
235 requires: "exactjson-unit": true
236 requires: "valleyhook-unit": true
237 requires: "identity-unit": true
238 requires: "readaccess-unit": true
239 requires: "web-unit": true
240 requires: "web-server-unit": true
241 requires: "web-receiver-unit": true
242 }
243
244 // Approval statements, their signing and verifying, and the PIV
245 // session signer.
246 classes: approval: {
247 paths: "approval/**": true
248 requires: "approval-unit": true
249 }
250
251 // The identity registry compiler, and the registries it is driven over.
252 classes: identity: {
253 paths: "identity/**": true
254 paths: "examples/identity/**": true
255 requires: "identity-unit": true
256 requires: "identity-e2e": true
257 }
258
259 // Telemetry: the records, streams and command grammar of telemetry/, the
260 // collector built from it, and the host module's half in
261 // nix/telemetry.nix. The git user's shell parses the command with it,
262 // attest, the worker and the integrator write its streams, and the CLI
263 // reads and reports with it, so a change to it requires their unit
264 // tests as well as its own. telemetry-e2e drives all of it on a NixOS
265 // machine. module-eval evaluates the module in nix/telemetry.nix, so the
266 // module-eval class requires it for that file. It runs none of the
267 // collector's code, so a change under telemetry/ does not require it.
268 classes: telemetry: {
269 paths: "telemetry/**": true
270 paths: "nix/telemetry.nix": true
271 requires: "telemetry-unit": true
272 requires: "telemetry-e2e": true
273 requires: "valleyhook-unit": true
274 requires: "attest-unit": true
275 requires: "valley-go-unit": true
276 requires: "integrator-unit": true
277 }
278
279 // The producers and the CLI that record and send telemetry: attest's
280 // progress, the worker's and the workstation's records, and approve,
281 // which runs them. telemetry-e2e observes each over ssh.
282 classes: "telemetry-producers": {
283 paths: "attest/progress.go": true
284 paths: "status/telemetry.go": true
285 paths: "status/workertelemetry.go": true
286 paths: "bin/valley": true
287 requires: "telemetry-e2e": true
288 }
289
290 // The check worker's own code: its pass and its records in status/, the
291 // wake directory it claims, and attest's run, which runs each check a
292 // pass builds, signs and stores the evidence, and reports its progress.
293 // worker-e2e runs those passes on a NixOS machine. The rest of status/
294 // and attest/ serves other commands too, and their classes require
295 // their own checks.
296 classes: worker: {
297 paths: "status/worker.go": true
298 paths: "status/workertelemetry.go": true
299 paths: "status/wake.go": true
300 paths: "attest/run.go": true
301 paths: "attest/check.go": true
302 paths: "attest/progress.go": true
303 requires: "worker-e2e": true
304 }
305
306 // The integrator, the end-to-end scenarios under integrator/e2e/, and the
307 // verification schema, which the integrator composes every policy under
308 // and both checks read. restack-e2e runs the real integrator too: it
309 // lands one change and rejects another.
310 classes: integrator: {
311 paths: "integrator/**": true
312 paths: "composed/**": true
313 paths: "schema/verification.cue": true
314 requires: "integrator-unit": true
315 requires: "integrator-e2e": true
316 requires: "restack-e2e": true
317 }
318
319 // The security-key signature verifier.
320 classes: sigverify: {
321 paths: "sigverify/**": true
322 requires: "sigverify-unit": true
323 requires: "sigverify-e2e": true
324 }
325
326 // The web UI's module: the export contract, its shared fixture, the
327 // publisher, the server and its browser state, and the receiver. The
328 // publisher's tests also read each project's policy/read and the
329 // instance's registry under the read and identity schemas.
330 // web-push-e2e runs the three programs as they ship, and
331 // web-reader-state-crash kills valley-web inside its browser state's
332 // transactions. Changes require all five checks.
333 classes: web: {
334 paths: "web/**": true
335 paths: "schema/read.cue": true
336 paths: "schema/identity.cue": true
337 requires: "web-unit": true
338 requires: "web-server-unit": true
339 requires: "web-reader-state-crash": true
340 requires: "web-receiver-unit": true
341 requires: "web-push-e2e": true
342 }
343
344 // What a browser engine runs or is served by on a reader page:
345 // web-reader-browser-e2e runs the packaged valley-web under headless
346 // Chromium. So it is required for the reader script and pages, the
347 // layout and the stylesheet whose hash every policy carries, the
348 // rendering and its policies, the dispatch and headers in server.go,
349 // the reader handlers, the command that sets up the browser state, the
350 // check's own test, and the packaging that builds the binary and its
351 // assets. Its definition is its own class's, check-<name> below. The
352 // publisher, package export, archives and the projection of the graph
353 // are not here: a change to them alone needs no browser.
354 classes: "reader-browser": {
355 paths: "web/server/assets/reader.js": true
356 paths: "web/server/assets/style.css": true
357 paths: "web/server/templates/redeem.tmpl": true
358 paths: "web/server/templates/logout.tmpl": true
359 paths: "web/server/templates/layout.tmpl": true
360 paths: "web/server/render.go": true
361 paths: "web/server/server.go": true
362 paths: "web/server/reader.go": true
363 paths: "web/cmd/valley-web/main.go": true
364 paths: "web/cmd/valley-web/browser_test.go": true
365 paths: "nix/packages.nix": true
366 requires: "web-reader-browser-e2e": true
367 }
368
369 // The real publisher's output that web-server-unit serves:
370 // nix/checks/web-published.sh runs the publisher and the CLI as they
371 // ship, and the server's tests read what it writes.
372 classes: "web-published": {
373 paths: "nix/checks/web-published.sh": true
374 requires: "web-server-unit": true
375 }
376
377 // Read access: the two consents a reader needs, the evaluator that
378 // intersects them, and the coverage report. readaccess-unit reads both
379 // schemas, so a change to either requires it, and the web publisher
380 // reads its consents through the module, so web-unit runs too.
381 classes: readaccess: {
382 paths: "readaccess/**": true
383 paths: "schema/read.cue": true
384 paths: "schema/identity.cue": true
385 requires: "readaccess-unit": true
386 requires: "web-unit": true
387 }
388
389 // The valley CLI: the script, its Go verbs (status/), the rebase engine
390 // they rebase and read landings with (rebase/), and its completions.
391 // valley-ready drives ready, withdraw, rebase and the verbs that take a
392 // change's handle, valley-changes drives changes and pending,
393 // valley-plan drives plan against the golden files under
394 // status/testdata/plan/, and valley-self-update drives --version and
395 // self-update. derive-unit holds the script's deriver to the Go one.
396 // The web publisher reads the valley through plan, pending and knot
397 // show, and its tests in web-unit run the CLI itself, as web-push-e2e
398 // runs the CLI's package.
399 classes: cli: {
400 paths: "bin/valley": true
401 paths: "status/**": true
402 paths: "rebase/**": true
403 paths: "completions/**": true
404 requires: "valley-go-unit": true
405 requires: "valley-cli": true
406 requires: "review-notes": true
407 requires: "valley-request": true
408 requires: "valley-status": true
409 requires: "valley-ready": true
410 requires: "valley-changes": true
411 requires: "valley-knot": true
412 requires: "valley-plan": true
413 requires: "valley-self-update": true
414 requires: "policy-deriver": true
415 requires: "derive-unit": true
416 requires: "web-unit": true
417 requires: "web-push-e2e": true
418 requires: "integrator-e2e": true
419 }
420
421 // The push path as it ships: web-push-e2e runs the publisher, the
422 // receiver, valley-web and the CLI as nix/packages.nix builds and wraps
423 // them, and exports its host declaration under schema/valley.cue. The
424 // web and cli classes require it for the code it runs.
425 classes: "web-push": {
426 paths: "nix/packages.nix": true
427 paths: "schema/valley.cue": true
428 requires: "web-push-e2e": true
429 }
430
431 // Self-update: its module (selfupdate/), the policy the package ships
432 // for its smoke test, and the home-manager module that runs it on a
433 // timer. valley-go-unit builds the verb with the module, and
434 // valley-self-update drives the verb through the package and holds the
435 // units the home-manager module renders.
436 classes: selfupdate: {
437 paths: "selfupdate/**": true
438 paths: "examples/policy/smoke/**": true
439 paths: "nix/home-module.nix": true
440 requires: "selfupdate-unit": true
441 requires: "valley-go-unit": true
442 requires: "valley-self-update": true
443 }
444
445 // The rebase engine, with its own tests over real repositories. The
446 // verbs that run it are the cli class's, so its paths are there too.
447 classes: rebase: {
448 paths: "rebase/**": true
449 requires: "rebase-unit": true
450 }
451
452 // The restacker, with its unit tests and its planner end to end. It
453 // reads origin through the rebase engine and the policy through the
454 // composed-policy reader it shares with the integrator, so a change to
455 // either requires its checks too.
456 classes: restack: {
457 paths: "restack/**": true
458 paths: "composed/**": true
459 paths: "rebase/**": true
460 requires: "restack-unit": true
461 requires: "restack-e2e": true
462 }
463
464 // What a client verifies an integrator's transfer statement with: the
465 // host's publisher and the default name it publishes, the unit that
466 // runs it, the client's reading of the signers, the instance discovery
467 // it reads them through, and the snapshot that asks for them.
468 // signers-e2e drives them together over the real integrator.
469 classes: signers: {
470 paths: "integrator/signers.go": true
471 paths: "integrator/main.go": true
472 paths: "nix/valley-host.nix": true
473 paths: "status/signers.go": true
474 paths: "status/list.go": true
475 paths: "rebase/snapshot.go": true
476 requires: "signers-e2e": true
477 }
478
479 // The web publisher's module, which runs the publisher on a timer in a
480 // sandbox of its own. web-publisher-e2e runs the unit it renders in a
481 // NixOS machine. module-eval, in the module-eval class, holds what it
482 // renders.
483 classes: "web-publisher": {
484 paths: "nix/web-publisher.nix": true
485 requires: "web-publisher-e2e": true
486 }
487
488 // The verification policy: this layer, the pointer to the owning
489 // valley, the schema a policy is written in, and the example policies
490 // the derivers and cue-vet read.
491 classes: policy: {
492 paths: "policy/**": true
493 paths: "schema/verification.cue": true
494 paths: "examples/policy/**": true
495 requires: "policy-deriver": true
496 requires: "derive-unit": true
497 requires: "cue-vet": true
498 requires: "own-policy": true
499 }
500
501 // What module-eval evaluates: the NixOS modules, the host declarations
502 // it renders and the files they are exported from, and the wiring that
503 // hands them to the check. Nothing else changes its derivation. An edit
504 // to another check's script or definition, to the packages, or to a
505 // program's code leaves it unchanged, so those paths are not here. That
506 // holds for nix/checks/ in general: each file there is its own check's,
507 // by the per-check classes below, and module-eval's own files are
508 // nix/checks/module-eval.sh, nix/checks/host-module.nix and
509 // nix/checks/hosts.nix.
510 classes: "module-eval": {
511 paths: "nix/valley-host.nix": true
512 paths: "nix/telemetry.nix": true
513 paths: "nix/web-publisher.nix": true
514 paths: "nix/web-receiver.nix": true
515 paths: "nix/checks.nix": true
516 paths: "nix/checks/hosts.nix": true
517 paths: "nix/checks/host-module.nix": true
518 paths: "schema/valley.cue": true
519 paths: "flake.nix": true
520 paths: "flake.lock": true
521 paths: "examples/host.cue": true
522 paths: "examples/hosts/protected.cue": true
523 paths: "examples/hosts/no-backup.cue": true
524 paths: "examples/hosts/bus.cue": true
525 paths: "examples/hosts/mirrors.cue": true
526 requires: "module-eval": true
527 }
528
529 // The flake, the NixOS module, the packages and the check definitions,
530 // and the host declarations the module checks are evaluated over.
531 // own-policy is here because renaming or removing a flake check would
532 // leave this layer naming a check that no longer exists. A change to
533 // flake.nix or flake.lock requires these and module-eval, which boots
534 // no machine, so a nixpkgs bump boots none.
535 classes: nix: {
536 paths: "nix/**": true
537 paths: "flake.nix": true
538 paths: "flake.lock": true
539 paths: "examples/host.cue": true
540 paths: "examples/hosts/**": true
541 requires: "valley-darwin-eval": true
542 requires: "cue-vet": true
543 requires: "own-policy": true
544 }
545
546 // The schemas, and the example events, attestations and registries they
547 // are vetted against.
548 classes: schema: {
549 paths: "schema/**": true
550 paths: "examples/events/**": true
551 paths: "examples/attestations/**": true
552 paths: "examples/identity/**": true
553 requires: "cue-vet": true
554 requires: "attest-schema": true
555 requires: "identity-schema": true
556 }
557
558 // The knowledge lint itself: its program, the node schema it holds a
559 // graph to, and the example graphs it must accept and reject. The plan
560 // graph's validator is held to the same two by knot-agree.
561 classes: "knowledge-lint": {
562 paths: "nix/knowledge-lint.*": true
563 paths: "schema/node.cue": true
564 paths: "examples/graphs/**": true
565 requires: "knowledge-lint-consumer": true
566 requires: "knowledge-lint-rejects": true
567 requires: "knot-agree": true
568 }
569
570 // The NixOS module and what its end-to-end checks run. The hook checks
571 // follow the scripts out of the hosts in nix/checks/hosts.nix, which
572 // are made of the three declarations named here; ssh-e2e, publish-e2e,
573 // worker-e2e and restack-host-e2e run the module in NixOS machines.
574 classes: "host-module": {
575 paths: "nix/valley-host.nix": true
576 paths: "nix/checks/hosts.nix": true
577 paths: "examples/hosts/protected.cue": true
578 paths: "examples/hosts/bus.cue": true
579 paths: "examples/hosts/mirrors.cue": true
580 requires: "init-e2e": true
581 requires: "mirror-e2e": true
582 requires: "bus-e2e": true
583 requires: "protect-e2e": true
584 requires: "knots-e2e": true
585 requires: "identity-e2e": true
586 requires: "ssh-e2e": true
587 requires: "publish-e2e": true
588 requires: "worker-e2e": true
589 requires: "restack-host-e2e": true
590 requires: "valley-changes": true
591 }
592
593 // A check's own files require that check: its script,
594 // nix/checks/<name>.sh, and its definition, nix/checks/<name>.nix,
595 // where it has a file of its own. One class per check, named
596 // check-<name>. prose-format is the floor's check, but its script is
597 // here. own-policy fails if a script under nix/checks/ requires no
598 // check.
599 for n in list.Concat([ownChecks, ["prose-format"]]) {
600 classes: ("check-\(n)"): {
601 paths: ("nix/checks/\(n).sh"): true
602 paths: ("nix/checks/\(n).nix"): true
603 requires: (n): true
604 }
605 }
606
607 // The other files under nix/checks/, and the checks that read each: the
608 // definitions of a subject's checks, and the helpers and rejection lists
609 // a check is given. cli.nix, which defines every check of bin/valley,
610 // is left to the nix class, as is nix/checks.nix, which wires them all.
611 let checkFiles = {
612 "attest.nix": ["attest-unit", "attest-conformance", "attest-e2e"]
613 "telemetry.nix": ["telemetry-unit", "telemetry-e2e"]
614 "delta.nix": ["delta-unit"]
615 "derive.nix": ["derive-unit"]
616 "review.nix": ["review-unit"]
617 "identity.nix": ["identity-unit", "identity-e2e"]
618 "approval.nix": ["approval-unit"]
619 "integrator.nix": ["integrator-unit", "integrator-e2e"]
620 "signers.nix": ["signers-e2e"]
621 "sigverify.nix": ["sigverify-unit", "sigverify-e2e"]
622 "web.nix": ["web-unit", "web-server-unit", "web-reader-state-crash", "web-receiver-unit", "web-image", "readaccess-unit"]
623 "schema.nix": ["cue-vet", "attest-schema", "identity-schema"]
624 "knowledge.nix": ["knowledge-lint-consumer", "knowledge-lint-rejects", "prose-format"]
625 "hooks.nix": ["valleyhook-unit", "change-unit", "mirror-e2e", "protect-e2e", "init-e2e", "bus-e2e"]
626 "host-module.nix": ["module-eval"]
627 "fail-nth.sh": ["policy-deriver", "valley-request"]
628 "review-notes-editor.sh": ["review-notes"]
629 "cue-vet-rejected.txt": ["cue-vet"]
630 "identity-rejected.txt": ["identity-schema"]
631 "knowledge-lint-rejected.txt": ["knowledge-lint-rejects"]
632 }
633 for f, ns in checkFiles {
634 classes: ("check-file-\(strings.Replace(f, ".", "-", -1))"): {
635 paths: ("nix/checks/\(f)"): true
636 requires: {for n in ns {(n): true}}
637 }
638 }
639
640 // How far an approval carries across a rebase (#Carry in
641 // schema/verification.cue). Every path not named here is same-paths.
642 //
643 // The hook, the integrator, the signature verifier and the identity
644 // compiler enforce who may do what. An approval of a change to one of
645 // them carries only while no landing has touched the same classes:
646 // same-class. The identity compiler's class is its code and the schema
647 // it holds a registry to. It requires nothing, because the identity and
648 // schema classes already require the checks of its paths.
649 classes: valleyhook: carry: "same-class": true
650 classes: integrator: carry: "same-class": true
651 classes: sigverify: carry: "same-class": true
652 classes: "identity-compiler": {
653 paths: "identity/**": true
654 paths: "schema/identity.cue": true
655 carry: "same-class": true
656 }
657
658 // The policy decides what every change requires, so an approval of a
659 // change to it carries across no landing at all: exact. That is this
660 // layer, the pointer to the owning valley, and the schema a policy is
661 // written in. The example policies are fixtures and stay same-paths. Like
662 // identity-compiler, this class requires nothing: the policy class
663 // requires the checks of its paths.
664 //
665 // This tree holds no registry, grant or secret data of its own. The
666 // registries, grants and keys under examples/ and attest/conformance/
667 // are test fixtures, and the instance's registry is in its instance
668 // repository. So nothing else here is exact.
669 classes: "policy-authority": {
670 paths: "policy/**": true
671 paths: "schema/verification.cue": true
672 carry: exact: true
673 }
674
675 // The restacker's cap is the schema's default of 64 automatic versions
676 // per change.
677}
678
679// What no class above covers falls to the floor's `unclassified` rule and
680// requires prose-format alone. That is the research artefacts under research/,
681// the GitHub mirror's workflow under .github/, and editor settings: files
682// no program here reads.