gunk-dev/the-valley

checks.nix

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