worker-e2e (nix/checks/worker-e2e.nix) takes about 9 minutes, and every change to nix/valley-host.nix requires it, comment-only edits included, along with the other host-module VM tests. Find where the time goes, then cut it: split, give the VM resources, or avoid real builds inside the VM, without losing coverage.
Done when worker-e2e's time is measured before and after, and is a few minutes.
Comments
contributor2026-10-25 20:05 UTC
worker-e2e measured before and after: 209 s to 83 s of test script, 3.5 min to under 1.5 min of wall clock. Measured on one machine (8 cores, 15 GB, KVM), one build at a time, with the test driver already built. Each figure is the test driver's own time for the step, in seconds. The knot's 9 minutes was not measured here.
| step | before (f7af9db) | after (dd719e9) |
|---|---|---|
| boot to multi-user.target | 20.1 | 12.6 |
| seed the projects, ready a change | 5.8 | 4.2 |
| first start makes the key | 2.1 | 1.4 |
| enrolled pass builds two checks | 21.9 | 9.2 |
| the timer runs the next pass | 83.6 | 8.7 |
| six CPUs get four | 18.0 | 8.0 |
| runaway stopped at the memory cap | 33.0 | 17.8 |
| the key survives a reboot | 24.1 | 21.1 |
| whole test script | 209.0 | 83.2 |
| nix build of the check, wall clock | 210 | 88 |
Another run of the same scripts took 80 s. The timer step takes about 4.5 s, or about 8.7 s when the timer starts one more pass before the test stops it.
Where the time went, and what changed:
- The timer subtest waited 84 s: a one-minute interval plus up to a minute of systemd's timer accuracy. The machine sets `services.valley.worker.interval` and the timer's `AccuracySec` to 1s.
- Each new build waited about 4.5 s while the daemon failed to reach cache.nixos.org, five times a run. The machine lists no substituters.
- Each boot waited about 5 s for a DHCP lease on an interface nothing uses. The machine takes no lease.
- The project's checks spin for half a second, not two seconds.
- The unrelated small and big builds hold their memory and wait without using a CPU, instead of spinning for 22 s. The spinning had slowed the worker's pass. small finishes when the test sends it SIGUSR1, and the test checks that it is still running after the OOM kills.
- The CPU cap is measured over 5 s, not 10 s.
Every assertion still runs. Splitting the test would not help on the worker, which builds one check at a time.
The host-module class: a comment-only edit to `nix/valley-host.nix` changes no check's derivation, so the worker builds nothing for it. A real edit rebuilds only the checks whose machines render the edited part. worker-e2e's machine runs nearly the whole module, and it exercises most of those parts in passing. A class is a set of paths, so leaving checks out would first need the module split into files. Even then, few checks could be left out. The commit message has the measurement behind this.
Commits 84f4376 and dd719e9, on branch worker-e2e-finishes-in-a-few-minutes-53fba53c.
contributor2026-10-26 00:23 UTC
klaus run 20261026-0023-98a708fb pushed 453ba845c77014cb3a2a79babd067ae20353ec25 to branch worker-e2e-finishes-in-a-few-minutes-53fba53c, and the valley didn't take it as a change: valley ready: valley: the commits from origin's main to 453ba84 include the merge 453ba84, and a change is a line of commits.
The run no longer claims the knot.
contributor2026-10-26 01:28 UTC
Change valley:the-valley/lwlyxrpzoyxoxtvskmrnxypmummkrmqn landed: v2 as 090efd0cc3131061e122994bc2325100f11967c3.
Every change the knot links has landed and it has no active children, so klaus set it done.