gunk-dev/the-valley

checks.nix

sourceea258e0e0163main's published tip history
3.6 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# knot.nix knot-unit, knot-agree — the plan graph's module, and
16# its validator held to the schema and the lint
17# attest.nix attest-unit, attest-conformance, attest-e2e — the
18# helper's unit tests, the written form as a fixed
19# contract, and the helper driven end to end
20# integrator.nix integrator-unit, integrator-e2e — the verdict rules,
21# and the controller over real repositories
22# hooks.nix valleyhook-unit, note-unit, change-unit, mirror-e2e,
23# bus-e2e, protect-e2e, knots-e2e, init-e2e — the hooks
24# the module renders, run against real git, the formats
25# they read, and the init script that wires them
26# identity.nix identity-unit, identity-e2e — the compiler's unit
27# tests, and the registry compiler over a real
28# instance repository, against the hand-written
29# artifacts it replaces, and the hook reading its grants
30# sigverify.nix sigverify-unit, sigverify-e2e — the security-key
31# signature verifier against real ssh-keygen, real git
32# and OpenSSH's software authenticator
33# cli.nix valley-cli, review-notes, policy-deriver,
34# own-policy, valley-request, valley-go-unit,
35# valley-status, valley-ready, valley-changes,
36# valley-knot, valley-darwin-eval —
37# bin/valley, its Go verbs, the-valley's own policy, and
38# the CLI's package evaluated for Darwin
39# ssh-e2e.nix ssh-e2e — the push boundary over a real sshd in a
40# NixOS machine, and the request grant's handoff
41# publish-e2e.nix publish-e2e — an integrator landing reaching the push
42# mirror and the bus, in a NixOS machine running the
43# real controller
44#
45# Fixtures live with the thing they are fixtures of: host declarations,
46# attestations, events, graphs and policies under examples/, attestation
47# vectors under attest/, the integrator's scenarios under integrator/e2e/.
48{
49 pkgs,
50 lib,
51 self,
52 system,
53 packages,
54}:
55let
56 hosts = import ./checks/hosts.nix {
57 inherit
58 pkgs
59 lib
60 self
61 system
62 ;
63 };
64 args = {
65 inherit
66 pkgs
67 lib
68 self
69 system
70 packages
71 hosts
72 ;
73 };
74in
75import ./checks/host-module.nix args
76// import ./checks/schema.nix args
77// import ./checks/knowledge.nix args
78// import ./checks/knot.nix args
79// import ./checks/attest.nix args
80// import ./checks/integrator.nix args
81// import ./checks/hooks.nix args
82// import ./checks/identity.nix args
83// import ./checks/sigverify.nix args
84// import ./checks/cli.nix args
85// import ./checks/ssh-e2e.nix args
86// import ./checks/publish-e2e.nix args