The operator, 2026-11-02: "part of bringing down these check times is sorting through all the tests and making sure they add value. We shouldn't be testing OTS setups. We should assume they work." Required checks are now most of the approval latency: worker-e2e takes about 10 minutes, telemetry-e2e about 3, and web-unit 2 to 5. Some subtests re-prove upstream behaviour, for example that systemd holds a slice to its CPU and memory caps. Outcome: each required check tests the project's own logic or its own configuration choices. Facts about chosen configuration are eval-time assertions where they can be, not VM runs. Subtests that only show nixpkgs, systemd or Nix doing what they document are removed. Each check is triggered only by the paths it can be affected by. First step: an audit, reported here, of every check: what it covers, ours or upstream, its measured time, what triggers it, and a recommendation (keep, slim, replace with an assertion, drop, or narrow its trigger). The operator decides from the report before anything is removed.
Audit report (run 20261102-2208-c7deff52), 2026-11-02. Nothing has been changed; the operator decides. ## Sources - **Times:** the worker stream (all records, seq 1–1149) and the workstation report stream (seq 2031–4772). Both cover only 2026-11-02 between 14:37 and 21:58 UTC, because the worker stream's history starts today. "Build s" is the median / max of `build_ms` for real builds, with n runs. Cache hits (≤1 s, no log) are left out. 23 checks never ran today and are "not measured". - **Required in 2 weeks ("Req"):** `valley checks --names` run over all 270 first-parent commits since 2026-10-19, under today's policy. - **What can affect each check:** `nix/tools/drv-churn.expected` at HEAD. I did not re-run it, and built nothing. - **Per-step times inside worker-e2e:** its passing run's log in the report stream. The log is cut off after 8 of 20 subtests. Subtests 9–20 together took 443 s (21:46:47 to 21:54:10). - Checks run side by side, so a change waits about as long as its slowest required check. Before any check starts, every approval also spends 55–94 s evaluating the flake (median 85 s, from `eval.end`). ## Every check, sorted by measured time O = ours, U = upstream. "Save/run" is an estimate unless it says measured. | Check | What it covers | O/U | Build s (med/max, n) | Req | Trigger, and is it wider than its inputs? | Recommendation | Save/run | |---|---|---|---|---|---|---|---| | worker-e2e | Worker key, enrollment, builds side by side, wake/recovery, slice caps (VM) | Mixed, see below | 568/572 (4) | 27 | host-module class, own file. **Narrower** than its inputs (see Q2) | **Slim** | 4–5 min | | telemetry-e2e | Telemetry read/report boundary over sshd, worker and workstation records, outage, limits (VM) | O, all 10 subtests | 200/208 (2) | 14 | telemetry, telemetry-producers. The whole of `bin/valley` is wider than its telemetry parts | Keep; optionally narrow | 0 (≈75 s on a `bin/valley` change if narrowed) | | integrator-e2e | Controller judges and lands over real repositories and keys | O | 128/128 (1) | 28 | change, integrator. Matches | Keep | 0 | | web-unit | Export contract, manifest, bundles, receiver state, Markdown, repository docs links | O | 124/124 (1) | 93 | web, cli, knot, note, readaccess. `completions/**` is wider, but those runs are cache hits | Keep; profile `go test` | ? | | publish-e2e | Landing reaches mirror and bus, signers publication, wake marks (VM) | Mostly O; 2 subtests wait on systemd | 102/102 (1) | 24 | host-module. Matches | **Slim** | ≈50 s | | web-push-e2e | Publisher → receiver → valley-web, using the packaged binaries | O | 77/77 (1) | 98 | web, cli, `nix/packages.nix`, `schema/valley.cue`. Matches; cache absorbs the rest | Keep | 0 | | restack-host-e2e | Restacker service over sshd as its own principal (VM) | O; 1 isolation subtest mixed | 63/93 (2) | 25 | host-module. Matches | Keep | ≈5 s | | derive-unit | Go deriver's rules, held to bin/valley's over seeded paths | O | 63/63 (1) | 52 | derive, cli, policy. Matches | Keep | 0 | | own-policy | This layer composes, names real checks, classes match | O | 61/70 (2) | 144 | policy, nix. Hit the cache in 4 of 6 runs | Keep | 0 | | valley-request | approve / rebase verbs and the request sequence on origin | O | 59/59 (1) | 33 | cli. Matches | Keep | 0 | | ssh-e2e | Push boundary over real sshd, grants (VM) | O; 1 subtest leans on sshd | 50/50 (1) | 23 | host-module. Matches | Keep | ≈0 | | integrator-unit | Verdict rules as functions of data | O | 31 (1) | 28 | change, integrator, telemetry | Keep | 0 | | valley-ready | ready / unready / withdraw through the hook | O | 23 (1) | 35 | Matches | Keep | 0 | | valleyhook-unit | Hook rules, glob matching, record transitions | O | 21 (1) | 18 | Matches | Keep | 0 | | telemetry-unit | Telemetry records, streams, command grammar | O | 17 (1) | 3 | Matches | Keep | 0 | | valley-go-unit | Go verbs' tests (`status/`) | O | 15/15 (2) | 39 | Matches | Keep | 0 | | attest-unit | Written form, key hash, tree digest | O | 13/13 (2) | 16 | Matches | Keep | 0 | | valley-changes | changes / pending over a host's project list | O | 13 (1) | 44 | Matches | Keep | 0 | | bus-e2e | Push → JetStream event; a dead bus never fails a push | O | 10 (1) | 28 | Matches | Keep | 0 | | valley-knot | knot verbs against plain bare repositories | O | 9 (1) | 34 | Matches | Keep | 0 | | prose-format | Formatter idempotence, links/anchors, style rules | O | 7/17 (6) | 184 | Floor rule | Keep | 0 | | signers-e2e | Published signers verify a real landing | O | 6/7 (2) | 33 | Matches | Keep | 0 | | valley-status | Status refs and their JSON contract | O | 6 (1) | 30 | Matches | Keep | 0 | | review-notes | Review note anchors in a real pty, pager and editor | O | 6 (1) | 33 | Matches | Keep | 0 | | policy-deriver | Bash deriver's glob boundaries | O | 6 (1) | 50 | Matches | Keep | 0 | | protect-e2e | Rendered hook refuses forbidden pushes | O | 5 (1) | 32 | Matches | Keep | 0 | | identity-e2e | Registry compiler over an instance repository | O | 4 (1) | 33 | Matches | Keep | 0 | | knots-e2e | Plan graph pushes through the hook | O | 4 (1) | 32 | Matches | Keep | 0 | | valley-cli | Script lint, help without a repository, completions | O | 4 (1) | 30 | Matches | Keep | 0 | | module-eval | What the modules render and refuse (eval-time) | O | 4/6 (2) | 143 | Matches | Keep; receives the new assertions | — | | valley-plan | plan output against golden files | O | 3 (1) | 32 | Matches | Keep | 0 | | mirror-e2e | Drain publishes main and tags, deletes tags | O | 3 (1) | 28 | Matches | Keep | 0 | | attest-e2e | Helper publishes, refuses; what a verifier sees | O | 2 (1) | 15 | Matches | Keep | 0 | | cue-vet | Host schema accepts and refuses examples | O | 2 (1) | 144 | Matches | Keep | 0 | | knowledge-lint-consumer | Lint's reusable form on other trees | O | 1 (1) | 4 | Matches | Keep | 0 | | knowledge-lint-rejects | Lint names file and defect | O | 1 (1) | 4 | Matches | Keep | 0 | | init-e2e | valley-init converges hooks | O | 1 (1) | 28 | Matches | Keep | 0 | | valley-self-update | --version and self-update through the package | O | 1 (1) | 31 | Matches | Keep | 0 | | attest-conformance | Written form held to fixed vectors | O | 1 (1) | 12 | Matches | Keep | 0 | | valley-darwin-eval | CLI evaluates for Darwin | O | 1 (2) | 143 | Matches | Keep | 0 | | web-server-unit | valley-web server and its browser state | O | not measured | 62 | Matches | Keep | — | | web-reader-state-crash | Browser-state transactions killed or failed at each step | O | not measured | 57 | Matches | Keep | — | | web-receiver-unit | Receiver: auth, replay, limits, crash | O | not measured | 57 | Matches | Keep | — | | web-reader-browser-e2e | Reader page in headless Chromium | O; browser enforcement is the means | not measured | 42 | reader-browser. Matches | Keep | — | | web-publisher-e2e | Publisher unit's sandbox, read-links wrapper (VM) | **Mixed** | not measured | 9 | web-publisher. Matches | **Slim** | ≈15–20 s | | web-image | Container image layout, owners, modes | O | not measured | 13 | Own files only. **Narrower** than its inputs | Keep; widen? | — | | readaccess-unit | Read consents, coverage report | O | not measured | 23 | Matches | Keep | — | | restack-unit / restack-e2e | Restacker planner; report-only run over a hooked repository | O | not measured | 26 / 26 | Matches | Keep | — | | knot-unit / knot-agree | Knot module; Go validator agrees with schema and lint | O | not measured | 3 / 3 | Matches | Keep | — | | delta-unit, review-unit, note-unit, change-unit | Formats and records, strict reading | O | not measured | 3 / 6 / 4 / 10 | Matches | Keep | — | | identity-unit, attest-schema, identity-schema | Compiler, and the two schemas | O | not measured | 15 each | Matches | Keep | — | | sigverify-unit / sigverify-e2e | Verifier refuses a security-key signature made without a touch | O, plus one assertion that upstream accepts it | not measured | 3 / 3 | Matches | Keep | ≈0 | | rebase-unit, selfupdate-unit | Rebase engine; self-update module | O | not measured | 10 / 2 | Matches | Keep | — | | exactjson-unit | Strict JSON reader | O | not measured | **0** | **No class requires it** | Add a trigger (Q3) | — | ## Checks with upstream parts **worker-e2e** (subtest numbers in file order) | Subtests | O/U | Notes | |---|---|---| | 1–16: seeding, key, enrollment, builds side by side, timer pass, wake directory, marks, claims, hold-off, instance/floor/signer marks, hung mirror/bus, killed pass, outage, failed-batch backoff | O | Measured: setup 8.4 s, enrolled build 10.6 s, "timer runs the next pass" 62.6 s, ready push 12.9 s. Subtests 9–16 mostly wait for the real one-minute timer. | | 17: "the slice holds its default caps" | U | Reads `cpu.max` / `memory.max`, i.e. systemd rendering CPUQuota and MemoryMax. module-eval already pins Slice, CPUQuota=400%, MemoryMax=8G and MemorySwapMax=0 (`workerMisrendered` in `nix/checks/host-module.nix`). | | 18: "a build that wants six CPUs is held to the slice's quota" | U | Kernel CPU throttling. Since 247c4666 it lowers the quota to 100% first, so it does not even test the configured value. | | 19: "a runaway build is stopped at the memory cap…" | Mostly U | Which process the kernel's OOM killer picks is the kernel's. The part that is ours is the choice that keeps the daemon alive, `OOMPolicy=continue` in `nix/valley-host.nix`. Make that an eval-time assertion. | | 20: "the key is the same after many starts and a reboot" | Mixed | Same key across starts is ours. Surviving a reboot is StateDirectory's. Keep the restart check and drop the reboot (boot took 13 s). | worker-e2e failed in 3 of its 4 runs today, each after about 566 s. Commit 247c4666 says the cause was subtest 18. I could not read the failed runs' logs, so that attribution rests on the commit message. **publish-e2e:** "systemd retries the push after a delay" and "a move that cannot be deleted… waits to retry" each wait out `RestartSec = "30s"`. The retry itself is systemd's job. What is ours stays covered: the drain fails the run and keeps the queue. Pin `Restart`, `RestartSec`, `RestartSteps` and `RestartMaxDelaySec` in module-eval, and either shorten RestartSec on the test machine or drop the two waits. **web-publisher-e2e:** several probes only show systemd enforcing settings that module-eval already pins (DynamicUser, IPAddressDeny / IPAddressAllow, LoadCredential): - Connections to disallowed IPv4 and IPv6 addresses fail. - A UDP send to the DNS server gets EPERM. - Two units share one dynamic UID. Keep the parts that are ours: the ExecStartPre egress check run inside and outside the unit, a connection to the allowed address, one name resolved through nscd, the safe.directory list, and the read-links wrapper. **Smaller mixed cases, all kept:** - restack-host-e2e: "the controller's Unix user holds nothing but its own state". - ssh-e2e: "a client cannot supply the principal itself". - sigverify-unit: the assertion that `ssh-keygen -Y verify` and `git verify-tag` accept a no-touch signature. Each costs only seconds. ## The three changes that save the most for the least risk 1. **worker-e2e: drop subtests 17–19 and add `OOMPolicy == "continue"` to module-eval.** Saves about 1 min a run, and removes the subtest that failed 3 of 4 runs today (about 28 min of failed builds). Low risk: the values are already pinned at eval time. 2. **worker-e2e: set `services.valley.worker.interval` to about 15–20 s on the test machine.** module-eval keeps pinning the 1 min default. Saves about 3 min a run, on a check required 27 times in two weeks. The interval must stay longer than the test's 5 s "nothing starts a pass" windows, or those assertions will race. 3. **publish-e2e: pin the restart settings at eval time and stop waiting out two 30 s RestartSec delays.** Saves about 50 s of its 102 s. Low risk. Together, worker-e2e drops from about 9.5 min to about 4–5 min, and it is the slowest check on every host-module change. ## Questions for the operator 1. Telemetry covers one day, and 23 checks never ran. Should times be measured again after a week before anything is removed? 2. worker-e2e is required only by `nix/valley-host.nix`, `nix/checks/hosts.nix`, the three host examples and its own file. A change to the worker's own code (`attest/run.go`, `attest/check.go`, `status/worker.go`) does not require it. Is that intended? 3. Nothing ever requires exactjson-unit: it is missing from `ownChecks`, and `exactjson/**` is in no class. Commits e5e09626 and d93cce99 changed only exactjson and required prose-format alone. Add a class, or drop the check? 4. Evaluating the flake takes 55–94 s on every approval, longer than all but a few checks. Does reducing it belong to this knot or a sibling? 5. telemetry-e2e runs on any edit to `bin/valley`. Narrowing that needs the telemetry code split out of the script. Is about 75 s on roughly 10 changes in two weeks worth that? 6. web-reader-browser-e2e relies on Chromium enforcing the page's policy and cookie flags. I counted it as ours, because only a browser catches a wrong script hash. Do you agree? ## What I ran - `valley knot show oc-19345de`: read. - `valley telemetry --json read` (`--source worker` and the report stream, paged with `--since`; `--logs` for build output) and `valley telemetry --json sources`: all succeeded. - `nix eval .#checks.x86_64-linux --apply builtins.attrNames`: 63 checks. - `valley checks --names` over 270 commits: no errors. - `git status`: clean, HEAD unchanged. - Two side effects: I fetched one attestation ref into a temporary local ref (`refs/scratch-audit/a`) and deleted it, so its objects remain in the object store. Nothing else was written. - No build, test suite or `klaus _pre-review`, since nothing was changed.Measurement (run 20261105-0033-c8e77e4c), 2026-11-05: how often our checks fail, and whether a failure caught a real mistake. Nothing has been changed. The principles at the end are candidates for the operator to decide on. ## Summary - **On the host, no check failure caught a real mistake.** The worker recorded 1,163 check results, and 12 failed, about 1%. Those 12 come from 7 distinct failing trees on 5 changes. Three were the host's capacity, one was probably a flake, one was a test that asserted the old behaviour, and two were bugs in the tests. - **During agent development, checks fail far more often, but rarely because of the change's own code.** The most common causes are a bug in the new test the agent is writing, and the agent breaking its own code on purpose to prove a new test fails. A real defect in the change's code was the cause in 6 of 67 classified nix check failures and in 1 of 30 sampled Go test failures. - **The mistakes that did get through were all across a boundary:** another component, another platform, or a check the change did not require. A review or a later change found them, and no required check did. - **The data is thin.** The host telemetry covers 2.4 days. A check with no failures in that window may still guard against a rare break. ## Sources, and what each one can support 1. **Host worker telemetry.** I read every record, seq 1 to 15,445, from 2026-11-02 14:37 to 2026-11-05 00:33 UTC. "Host builds" counts real builds, and leaves out cache hits of 1.5 s or less. "Median build s" is the median `build_ms` of those builds. The read with `--logs` returns only the logs of builds still in flight, so I could not read the log of any past failure. I classified each host failure from three things: the diff between the failing version and the next passing one, the commit and bug knot that fixed it, and the agent run that wrote it. 2. **Agent run logs.** There are 586 runs, from 2026-10-05 to 2026-11-05: 324 for the-valley, 113 for the operator's host configuration project (called `site` below), and the rest for other projects. A script scanned every run for two things. The first is nix check failures (`Cannot build '…drv'. Reason: builder failed`), counted once per derivation hash per run. The second is Go test failures (`--- FAIL:`), counted once per test name per run. I read every nix failure in the-valley and `site`: 67 code-check failures and 30 prose-format failures. For Go, I read a seeded random sample of 30 of the 90 the-valley runs with a failing test, one failure per run. These runs had 297 distinct failing tests in total. Each failure is classified by what the agent did next, which is the agent's own account. Two limits apply. First, agents often build in the background and read only the tail of a log, so some failures never reach the log and are missed. Second, passing builds are not reliably visible in the logs, so I give no pass rates for development. 3. **Git history.** These are first-parent commits on main since 2026-10-19: 294 in the-valley and 81 in `site`. Classes: **R** caught a real mistake. **C** intended behaviour change, where only the test was fixed ("mirror" churn). **T** test bug, including a bug in a new test as it is written. **F** flake or host environment. **E** agent workflow, such as a new file not yet staged, so the flake could not see it. **M** a deliberate mutation, or a revert to prove a new test fails; this is neither a catch nor a cost. **P** prose-format. **U** the evidence does not say. ## 1. Every host failure | Change, version | Check | Runs | Class | Evidence | |---|---|---|---|---| | kwvx v2, runz v2, nunp v2 | worker-e2e | 3, each about 565 s | F | The subtest "a build that wants six CPUs is held to the slice's quota" never throttled inside the host's capped build slice. bd-a0de0da records that it failed on the host and passed elsewhere. 247c4666 fixed only the test. kwvx and runz then landed with their own diffs unchanged. | | nunp v4 | worker-e2e | 1, 21 s | F (probable) | v2 to v5 change the same files by the same line counts against their bases. v5 passed after a rebase whose only new main commit was 17cde4c7, which changes `rebase/` alone. | | ovrm v3 | valley-request | 6, on one unchanged tree | C | The change meant a note of the wrong kind to make a request `stale`. The test expected `reject`. v4 changed only `valley-request.sh`, `integrator/e2e/run.sh` and `restack-e2e.sh`. The worker rebuilt the same failing tree 6 times over 8 hours. | | ovrm v5 | valley-request | 1 | T | After the rebase onto rmyv, scenario 20d depended on the order of a note's keys. v6 changed only `valley-request.sh`, in 5 lines. | | smuk v1 | valley-cli | 1 | T | `grep -qx` in a pipe under `pipefail` can kill `printf` with SIGPIPE. v2 changed only that line of `valley-cli.sh`. | That makes 0 real catches, 1 churn, 2 test bugs and 4 environment or flake failures, counted by distinct tree. By build time, the worker-e2e environment failures alone cost about 28 minutes, and each one held a change back by about 10 minutes. ## 2. Failures during agent development - **Nix code checks** (67 failures): T 23, R 6, M 7, C 5, F 2, E 2, U 22. The real catches were these: - valley-ready: `valley` printed an empty state, because `read` emptied its variable at the end of input. - knots-e2e: the knot hook checked a deleted knot's comments before the deletion rule. - own-policy: the policy did not map a new script to the check it feeds. - The web-receive package: a merge gap, where a package did not list a module it now imports. - The restacker package: it named a subpackage the module does not contain. - valley-changes: a cost baseline left out a change's own build. - **prose-format** (30 failures): 22 were Prettier wrapping, fixed by running the formatter. 5 were rule hits, such as the narration phrase "no longer". 3 were unclear. - **Go tests** (sample of 30): M 12, T 5, C 1, R 1, F or E 2, U 9. The one real catch: a shadowed variable in `bindSpool` left an error set (`TestSpoolsAreBoundToTheirDestinations`). The two environment failures were `cue` missing from PATH and nix being unavailable. The usual sequence in development: the agent writes a test, fixes the test, then mutates the code to prove the test fails, then restores the code. ## 3. The other direction: defects no required check caught - **The Darwin build** (bd-31610b7, 2026-11-04). Change mytm called `syscall.Sysinfo` in `status/`, which does not exist on Darwin. The review round found it. No check compiles the Go modules for Darwin, because `valley-darwin-eval` only evaluates the derivation. - **integrator-e2e was not required by `bin/valley` changes.** rmyv (f007964e, 2026-11-02) made a plain `valley approve` file the request without building the evidence. That broke integrator-e2e's scenario 27, and rmyv landed. The break was found when run 20261103-1342-92372e67 rebased ovrm onto it. 16d422ff then made the cli class require integrator-e2e. - **restack-e2e was not required by integrator changes.** ovrm, an integrator change, had to edit `restack-e2e.sh` between v3 and v4. Its run built restack-e2e by choice, outside the required list. 16d422ff made the integrator and attest classes require restack-e2e. - **A review caught it:** bd-439e352, where a check-cost baseline can skip records when a page ends at the size cap. The pre-push review of zrxy found it. - **It surfaced in operation:** bd-0913cba, where a change whose base is the tip lands commits that review never showed. It was found through a landing's verified outcome. - **Flakes seen only in agent runs under load:** bd-11d1ae0 (telemetry-e2e timing), bd-fa032ec (the browser check's ten-second waits) and bd-9fff0e6 (a CPU-dependent test). None of them failed on the host in this window. ## 4. Git history: how landed commits touch tests - **the-valley** (294 commits): 46% changed existing lines in a test file, 29% only added test lines, and 24% touched no test. The first figure is an upper bound on churn. It counts any removed line that is not a comment, so a refactor counts too, and `nix/checks/*.nix` also holds the wiring. The files edited most often were these, by number of commits: `host-module.nix` 25, `webui.nix` 18, `cli.nix` 16, `server_test.go` (web and webui) 14 each, `worker-e2e.nix` 11, `restack.nix` 11, `integrator/e2e/run.sh` 11, and `valley-request.sh` 10. - **`site`** (81 commits): 87% touched no test. ## 5. Per check (the-valley) Columns: host results, host builds, median build seconds, host failures, and development failures by class. | Check | Res | Builds | Med s | Host fail | Dev fail | Judgement | |---|---|---|---|---|---|---| | worker-e2e | 22 | 19 | 432 | 4 (F4) | T2 U1 | Mostly flakes so far, and the costliest check. The failing subtests were removed in b7b15bf7, and it has shown no real catch. | | telemetry-e2e | 15 | 13 | 208 | 0 | T1 | Never failed on the host. It has timing flakes under load (bd-11d1ae0). | | web-publisher-e2e | 5 | 5 | 156 | 0 | U1 | Never fails. | | integrator-e2e | 20 | 13 | 142 | 0 | C1 T2 M1 U1 | Guards something agents break, across components. It would have caught rmyv had rmyv required it. | | web-unit | 29 | 21 | 127 | 0 | 0 | Never fails as a check. Its Go tests appear often in development, mostly as mutation proofs. | | valley-request | 29 | 27 | 64 | 7 (C6 T1) | C2 T2 M1 U3 | Mostly churn. It pins approve's exact outcomes and messages. | | own-policy | 47 | 31 | 62 | 0 | R1 U1 | Guards something agents break: a new file left out of the policy. | | web-push-e2e | 29 | 21 | 52 | 0 | T3 | Never fails on the host. Its failures in development were the test itself. | | ssh-e2e | 17 | 3 | 50 | 0 | 0 | Never fails. | | restack-e2e | 12 | 10 | 46 | 0 | T1 U1 | Guards a boundary agents break, because integrator changes needed it. | | publish-e2e | 22 | 14 | 44 | 0 | U2 | Never fails on the host. | | derive-unit | 36 | 11 | 42 | 0 | T1 | Never fails on the host. | | restack-host-e2e | 17 | 10 | 38 | 0 | T1 | Never fails on the host. | | integrator-unit | 14 | 3 | 31 | 0 | 0 | Never fails. | | valley-ready | 29 | 21 | 23 | 0 | R1 T3 U1 | It has guarded something once, in bin/valley's shell. | | policy-deriver | 37 | 22 | 16 | 0 | T1 | Never fails on the host. | | valley-changes | 36 | 21 | 14 | 0 | R1 T2 U3 | It has guarded something once: a cost baseline. | | valley-go-unit | 32 | 22 | 14 | 0 | 0 | Never fails as a check. | | attest-unit, attest-conformance | 11, 9 | 7, 1 | 13, 12 | 0 | 0 | Never fail. | | valley-knot | 29 | 21 | 10 | 0 | M1 | Never fails. | | bus-e2e | 17 | 7 | 10 | 0 | 0 | Never fails. | | module-eval | 43 | 2 | 9 | 0 | 0 | Never fails. | | prose-format | 46 | 37 | 7 | 0 | P30 (both projects) | Mostly formatting. The formatter was not run. 5 rule hits were real. | | review-notes | 30 | 22 | 6 | 0 | T2 M1 U1 | Never fails on the host. | | signers-e2e, valley-status, identity-e2e, protect-e2e, knots-e2e, attest-e2e, valley-cli, valley-plan, mirror-e2e, cue-vet | 9–43 each | | 2–6 | 1 (valley-cli, T) | knots-e2e R1; valley-cli C1; mirror-e2e M1; cue-vet E1 | Cheap. knots-e2e has guarded something once. valley-cli is churn, because it pins the verb list and the help's length. The rest never fail. | | init-e2e, attest-schema, identity-schema, valley-darwin-eval, valley-self-update | 10–45 | 0 | — | 0 | identity-schema U1 | Always cache hits on the host. valley-darwin-eval did not catch the Darwin break, by construction. | **`site`:** 32 checks, each with at most 10 results and mostly 2 real builds. The VM rebuild checks take a median of 113 to 222 s. No check failed on the host. In development, the failures were prose-format 9 (P), the converge-read VM test 2 (T1 U1), a memory VM test 1 (T) and a docs-sync path check 1 (M). None of its VM checks failed in any data I have. ## Candidate principles 1. **Keep a test where agents demonstrably break the behaviour.** Here, every break that got through crossed a boundary. Such a break shows up only when a second component, or a second platform, runs the changed code. Examples: integrator-e2e runs `bin/valley`, and restack-e2e runs the integrator. 2. **Require a test by the code it runs, not by where the test lives.** Both cross-component breaks existed because the check that would have caught them was not required. 3. **Add the cheap check that a real escape shows is missing.** For example, a Darwin cross-compile (bd-31610b7) costs seconds. 4. **Treat a test that fails on host capacity or timing as a cost with no catch.** worker-e2e's CPU subtest, telemetry-e2e's timing and the browser waits caught nothing in this data. Each failure costs minutes, and teaches agents to rerun. Either make such a test depend on events rather than wall-clock time, or drop it. 5. **Assert the decision, not its wording.** valley-request and valley-cli fail when an intended change rewords a message or adds a verb. Their assertions on the outcome (land, stale or reject) are what a later change can break by mistake. 6. **Judge a test by its failures on later changes, not by the change that wrote it.** In development, nearly all failures of a new test are the test being wrong, or the agent proving the test bites. Neither says whether the test will stop the next agent. 7. **Make the mechanical fix automatic.** Most prose-format failures are the formatter not run. Running the formatter before the check would leave the check failing only on the rule lints, which do catch real breaks of the writing rules. 8. **Do not drop a check because it never failed in 2.4 days.** Record a class with every host failure. A fix that touches only tests means churn. A pass on an unchanged tree means a flake. Keep the record until each check has weeks of history. bd-93360e8 also matters here: a retained build log drops the failure, and that is part of why host failures had to be classified from diffs.Audit: overlap between the-valley's own test layers (run 20261105-0033-5c3ed942), 2026-11-05. Part 1 of 2: the map, the overlaps and the cost. Nothing has been changed; the operator decides. ## Sources - **Build times:** the worker stream, `check.result` records with `build_ms` over 1.5 s, project the-valley, 2026-11-03 to 2026-11-05. The stream holds no check results between 2026-11-04 02:48 and 2026-11-05 00:2x. - **Per-subtest times (VM checks):** the NixOS test driver's `(finished: subtest …, in N seconds)` lines, read from the deployment host's stored build logs (`/nix/var/log/nix/drvs`) for 5 or 6 recent runs each. These logs include builds made outside the worker, so a log's script time can differ from the telemetry median. - **Per-scenario times (integrator-e2e):** the timestamps in the integrator's own timing lines in its build log. Scenarios 1–32 span 80 s of one run. Scenarios 33 and 34 print no timestamps. - **valley-request, valley-ready, web-push-e2e:** their logs carry no timestamps, and nothing here was built. Their per-scenario shares are **estimates** from each scenario's share of the script's lines. - **How often each check is required ("Req"):** `valley checks --names` over all 267 first-parent commits on main since 2026-10-22, of which 266 require any check, under today's policy. The class that made each one required comes from `valley checks` without `--names`. - **Owning code:** the scripts' own comments, `policy/project/policy.cue`, and the Go test names in `integrator/`, `restack/`, `status/` and `web/`. ## 1. What each end-to-end check exercises | Check | Layer | Behaviours, by scenario or subtest | |---|---|---| | valley-request | bin/valley over a bare origin with the real hook; stand-in nix | 1–15: approve files evidence and request in one push; the governing layers come from outside the change; stale heads; no key refused; races for the request ref; same-head approval. 16: packaged schema, and every git call fails closed. 17–19: the approve and rebase verbs without the pager. 20a–20g: approve reuses evidence on origin, and each reuse case is held to **one pass of the real integrator**. **21a–21m: the packaged worker** builds before approval, takes turns, backs off, survives a lost reply, a superseded head, a kill and a broken cache clone. 22: refs read by exact name. | | integrator-e2e | The controller over real repositories and keys | 1–8: evidence transfers, goes stale, or is rejected (unknown signer, tampered, other tree, wrong kind). 9–18: requests that are not requests, scratch, floor, nothing required, first-seen reporting, replacement refs. **19–20: a bus or a cue that never answers.** 21–26: record states (ready, unready, withdrawn, draft, merge). **27: a stack, rebased by `valley rebase` and approved by `valley approve --build-here`, lands as one commit.** 28–32: signer projects, one commit per landing, versions, layers below a landing, standing answers. 33: the wake directory. 34: evidence for the tree that would land. | | restack-e2e | valley-restacker over a hooked bare repository | Planner selection, holds and caps over injected outcomes; report-only writes; the restacker's grant. **A fixture where the real integrator lands one change and rejects a tampered one**, so the planner reads real outcomes. Locking, timeouts, write passes after a real landing, a branch under a landed change. | | restack-host-e2e | VM, restacker service over sshd | Keys provisioned; after main moves the controller restacks as its own principal; its Unix user holds only its state; its key pushes as its principal and the hook refuses the rest. | | telemetry-e2e | VM, collector over sshd | Catalog access; private keys; declared units as sources; **a worker build seen live and its kill inferred**; **a failed batch's backoff record**; **three approvals observed** (slow and fast side by side; from review after a refused attempt; reusing worker evidence); approval goes on when telemetry is unreachable; request limits. | | worker-e2e | VM, worker service, path unit and timer | Key; enrolment; builds side by side; the timer pass finds evidence and builds nothing; wake directory; a ready push starts a pass; scheduling under the memory budget; marks and stale marks; claims left by a killed pass; hold-off; marks for the instance, signer publication and floor; hung mirror and bus; **a pass killed during a build**; **a pass that cannot reach the repositories**; **a failed batch not built again before its wait**; key stable across starts; GC roots. | | publish-e2e | VM, host module | The hook marks the controller; the landing moves main; mirror failure keeps the queue; the landing is on the bus while the mirror is down; **the host publishes signers, and no ssh push replaces them**; wake directories; an ssh push wakes only its project's controller; a floor wakes its reader. | | ssh-e2e | VM, sshd and the git user's shell | The principal comes from the key's entry; a key with no grant fetches and is refused writes and a shell; a client cannot name its own principal; an unconverged host refuses pushes; hand and compiled grants. | | signers-e2e | Local, the signers publisher and hook | Nothing published reads uncertain; the publisher refuses a non-key file; a fresh client reads landed-recorded; overrides; **no push replaces the publication**; the integrator is never a signer project; rotation; concurrent runs; revocation; restricted signer projects. | | valley-ready | bin/valley ready, unready, withdraw through the hook | Versions and identity; who may write a record; handles; a draft is a change paused, and approve and rebase refuse it; the record is read again just before acting; **a stack is rebased whole**; review's versions and knots. | | valley-changes | `valley changes` and `pending` over a host's project list | Listings by state, guarded prefixes, the JSON form, stacks shown at their top, reused branch names, knots, `--checks`. | | web-push-e2e | The packaged publisher, receiver, valley-web and CLI | Export key, sign-in, Markdown, anonymous 404s, archives, cache headers, read links, **replay refused**, protocol refusal, re-upload on change, reader removal and regrant, withdrawal, **the links lock**, **a lost acknowledgement**, **a restored credential file or host**, browser-state loss, restarts, a stopped receiver. | | Other flows | | protect-e2e (the rendered hook refuses forbidden pushes), knots-e2e, bus-e2e (a dead bus never fails a push), mirror-e2e, identity-e2e, attest-e2e, init-e2e, web-publisher-e2e (VM), web-reader-browser-e2e (Chromium). Each tests its own module, and none repeats another layer's cases beyond what is listed in section 2. | ## 2. Behaviours tested comprehensively at more than one layer "Outermost" is the outermost check that shows the behaviour. "Repeats" are the checks that test it again although it is not their own logic. | # | Behaviour | Where it is tested | Outermost | Repeats | |---|---|---|---|---| | O1 | **The worker's failure handling:** a failed batch backs off, a failed read stops a pass, a killed pass is recovered | Go: `TestAFailedReadStopsAdmissionAndDrainsTheRunningBatches` only. valley-request 21b–21m. worker-e2e: killed during a build, cannot reach the repositories, failed batch, claim left by a killed pass. telemetry-e2e: the kill, and the failed batch. | worker-e2e | **valley-request 21** tests the worker inside the approve check. **worker-e2e** repeats the backoff and the failed read with real timers. Its three recovery subtests all prove one thing: a claim left behind is picked up by the timer's next pass. **telemetry-e2e** kills a pass and fails a batch again, only to read the records. | | O2 | **What an approval reuses, builds, files or refuses** | valley-request 1, 4, 17, 20a–20g. telemetry-e2e's three approval subtests assert `approve.coverage` reused and missing, `approve.request` pushed, and `approve.end` filed or refused. integrator-e2e 27 drives approve. | telemetry-e2e (VM) | **telemetry-e2e** restates valley-request's outcomes through records. Its own claims are narrower: records stream live, are flushed, name their principal, and each attempt is its own run. | | O3 | **Which evidence the integrator accepts** | integrator-unit; integrator-e2e 2–8; valley-request 20g (11 cases, each judged by the real integrator); restack-e2e's tampered note. | integrator-e2e | **valley-request 20g** exists because approve's reuse rule (`status/coverage.go`) is a second implementation of the integrator's, and it imports nothing from `integrator/`. **restack-e2e** rejects a tampered note only to obtain a real reject outcome. | | O4 | **A stack is rebased whole, and its top lands** | rebase-unit; valley-ready's stack section; integrator-e2e 27; restack-e2e; restack-host-e2e. | integrator-e2e 27, for the operator's verbs | **integrator-e2e 27** drives `valley rebase` and `valley approve`, which are valley-ready's and valley-request's logic. Its own part, a stack's top landing as one commit, is close to scenarios 29 and 31. Because of this scenario the `cli` class requires integrator-e2e, which it did for **19 of integrator-e2e's 40** requirements. | | O5 | **A hung bus, mirror or cue does not hold up a landing** | bus-e2e; integrator-e2e 19–20; publish-e2e (bus while the mirror is down); worker-e2e (mirror and bus hung). | worker-e2e | **integrator-e2e 19–20** wait out the fixed `busDeadline` of 10 s in `integrator/bus.go`, twice each. The rule is the integrator's own, but only a deadline is under test, and that needs no real wait. | | O6 | **A real integrator landing as a fixture** | integrator-e2e; valley-request 20 and 21 (17 `integrated` or `judged` passes); restack-e2e. | integrator-e2e | **valley-request** and **restack-e2e** run the integrator to check a contract: that what approve files lands, and that the outcome record reads back. Because of this, the integrator class requires restack-e2e, which it did for 16 of restack-e2e's 38 requirements. | | O7 | **The signers publication cannot be replaced by a push** | signers-e2e; publish-e2e. | publish-e2e | **publish-e2e** repeats the hook rule over ssh. Its own part is that the path unit republishes when the file changes. | | O8 | **A push without the grant is refused** | valleyhook-unit; protect-e2e; ssh-e2e; restack-host-e2e's last subtest; publish-e2e's signers subtest. | ssh-e2e | **restack-host-e2e** and **publish-e2e** repeat grant enforcement over ssh. | | O9 | **Record states gate a landing** (not ready, withdrawn, merge) | integrator-unit (`TestTheRecordsRefuseARequestForAChangeThatIsNotReady`, `TestAWithdrawnChangeVoidsItsRequests`, `TestARequestWhoseCommitsHoldAMergeIsRefused`); integrator-e2e 21–26. | integrator-e2e | **integrator-e2e 21–26** repeat the unit cases one by one (about 7 s). | | O10 | **Web receiver state:** replay, links lock, restore, lost acknowledgement | web-unit and web-receiver-unit (`TestStoreRefusesReplays`, `TestTheLinksLockSerializesChangesAndPasses`, `TestARestoredStateRestoresNoWithdrawnAccess`); web-push-e2e. | web-push-e2e | **web-push-e2e** repeats several unit cases with the packaged binaries. Their time is not measured. | ## 3. Cost Medians are of passing, uncached runs. "Script" is the VM test script's time in the build logs. | Check | Median build s (n) | Req (of 267) | Overlapping scenarios | Their time per run | Share | |---|---|---|---|---|---| | worker-e2e | 421 (13); script 503–656 in the 5 latest logs | 42 | failed batch (105–144 s); cannot reach the repositories (38–48 s) | 143–192 s | ≈30% | | telemetry-e2e | 212 (10); script 250–271 | 14 | approval from review (40–44 s); approval reusing evidence (37–46 s) | 78–89 s | ≈32% | | integrator-e2e | 143 (11) | 40 (19 of them only through `cli`) | 19–20 (20.4 s each); 21–26 (≈7 s); 27 (2.2 s, but it is why `cli` requires the check) | ≈50 s, plus 19 whole runs | ≈35% | | valley-request | 66 (18); 75–84 in the latest 6 | 31 | 21b–21m (worker logic); 20g (agreement with the integrator) | est. 15–20 s for 21 | est. ≈23% | | restack-e2e | 45 (9) | 38 (16 through `integrator`) | the real-integrator fixture | not measured; it is why `integrator` requires the check | — | | publish-e2e, ssh-e2e, restack-host-e2e | 42 (12), 49 (2), 39 (8) | 29, 28, 29; **all three together on 27**, and publish-e2e with worker-e2e on 28 | in each, a VM boot and setup of 18–23 s; subtests are only 15, 25 and 14 s | ≈40 s of boots, if merged | ≈30% of the three | | web-push-e2e | 52 (18) | 96 | replay, links lock, restore, lost acknowledgement | not measured | — | Where the time goes in a change's wait: checks run side by side on 4 build slots, so a change waits for its slowest required check. Of the 266 commits, worker-e2e was the slowest required check on 42, integrator-e2e on 14 and telemetry-e2e on 6. Slots are contended too: in the 2026-11-05 00:32 pass, restack-host-e2e waited 41 s for a slot.