gunk-dev/the-valley

checks.nix

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