gunk-dev/the-valley

checks.nix

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