gunk-dev/the-valley

restack.nix

source9d8f53c82aaemain's published tip history
1.7 KiB
1{
2 pkgs,
3 packages,
4 hosts,
5 ...
6}:
7{
8 # The restacker planner's own tests (restack/), run in its checkPhase:
9 # how a request relates to a family, which outcomes are current and
10 # which release a family, and the arithmetic of each capacity limit.
11 restack-unit = packages.restack-unwrapped;
12
13 # valley-restacker once --report-only over a bare repository wired with
14 # the protected host's rendered hook, every change readied by its owner
15 # through the repository's own valley. Ready changes of two owners are
16 # planned; a linear stack is one family, and so are two stacks on a
17 # shared lower layer. A draft, a withdrawn change, a lone plain branch, a
18 # change landed by fast-forward and an uncertain landing are left alone,
19 # and a family with a plain branch or a draft in it is held. A change
20 # with two versions uploaded by the principal is held by the project's
21 # cap of 2. A request by name with no outcome holds; a current stale and
22 # a current reject release, the reject noted; an outcome about another
23 # head, tip or evidence, and one that does not read, hold. Requests by
24 # exact head and by range hold, the range's head fetched by the planner,
25 # and a request whose head is no commit holds every family. Every ref on
26 # origin is compared before and after each pass. Outcomes are injected
27 # on the server side, since no push may write one.
28 restack-e2e = pkgs.runCommand "valley-restack-e2e" {
29 nativeBuildInputs = [
30 pkgs.git
31 pkgs.jq
32 packages.valley-script
33 packages.valley-restacker
34 ];
35 initScript = hosts.protectedHost.config.systemd.services.valley-init.script;
36 passAsFile = [ "initScript" ];
37 smokePolicy = ../../examples/policy/smoke;
38 } (builtins.readFile ./restack-e2e.sh);
39}