gunk-dev/the-valley

checks.nix

source3be481bd0edfmain's published tip history
3.0 KiB
1# What is tested, and where each test's logic lives.
2#
3# One file per subject, each returning the checks for it. A check's shell
4# body is never here: it is a script under checks/, and a check definition
5# is only what builds it, what it is given, and why it exists.
6#
7# hosts.nix the eval-only host declarations the module checks share
8# host-module.nix module-eval — what the NixOS module renders from a
9# declaration, and what it must refuse
10# schema.nix cue-vet, attest-schema, identity-schema — the schemas
11# against the examples they accept and the ones they
12# must reject
13# knowledge.nix knowledge-lint and its consumer and rejection forms,
14# prose-format — the graph and the prose
15# attest.nix attest-conformance, attest-e2e — the written form as a
16# fixed contract, and the helper driven end to end
17# integrator.nix integrator-unit, integrator-e2e — the verdict rules,
18# and the controller over real repositories
19# hooks.nix valleyhook-unit, mirror-e2e, bus-e2e, protect-e2e,
20# init-e2e — the hooks the module renders, run against
21# real git, and the init script that wires them
22# identity.nix identity-e2e — the registry compiler over a real
23# instance repository, against the hand-written
24# artifacts it replaces, and the hook reading its grants
25# sigverify.nix sigverify-unit, sigverify-e2e — the security-key
26# signature verifier against real ssh-keygen, real git
27# and OpenSSH's software authenticator
28# cli.nix valley-cli, review-notes, policy-deriver,
29# valley-request, valley-status — bin/valley
30# ssh-e2e.nix ssh-e2e — the push boundary over a real sshd in a
31# NixOS machine, and the request grant's handoff
32# publish-e2e.nix publish-e2e — an integrator landing reaching the push
33# mirror and the bus, in a NixOS machine running the
34# real controller
35#
36# Fixtures live with the thing they are fixtures of: host declarations,
37# attestations, events, graphs and policies under examples/, attestation
38# vectors under attest/, the integrator's scenarios under integrator/e2e/.
39{
40 pkgs,
41 lib,
42 self,
43 system,
44 packages,
45}:
46let
47 hosts = import ./checks/hosts.nix {
48 inherit
49 pkgs
50 lib
51 self
52 system
53 ;
54 };
55 args = {
56 inherit
57 pkgs
58 lib
59 self
60 system
61 packages
62 hosts
63 ;
64 };
65in
66import ./checks/host-module.nix args
67// import ./checks/schema.nix args
68// import ./checks/knowledge.nix args
69// import ./checks/attest.nix args
70// import ./checks/integrator.nix args
71// import ./checks/hooks.nix args
72// import ./checks/identity.nix args
73// import ./checks/sigverify.nix args
74// import ./checks/cli.nix args
75// import ./checks/ssh-e2e.nix args
76// import ./checks/publish-e2e.nix args