gunk-dev/the-valley

webui.nix

sourcea7ab0ac9051amain's published tip history
3.7 KiB
1# The web UI (webui/): the export contract the publisher and the server
2# share, and the server. Their tests run here, in the packages' unit
3# builds (nix/packages.nix).
4{
5 packages,
6 ...
7}:
8{
9 # The projection over the shared fixture, which holds every disclosure
10 # rule: what reaches export.json, hidden projects' edges, the display
11 # mapping. The content digest; strict reading of export.json, with
12 # nothing after its document; each of VerifyManifest's steps, in order;
13 # the manifest's grammar and its agreement with export.json; the
14 # streaming body check; bundle acceptance against real git, refusing
15 # wrong tips, prerequisites, extra refs, corrupt objects and a header
16 # past its bound, and serving no commit main does not reach; git's
17 # output read within its limit, with git stopped past it or when its
18 # reader stops early; and the receiver's state directory. For the state directory: readers holding
19 # a generation through activations, every file of a generation synced
20 # before high-water names it, a repository a crash interrupted built
21 # again, recovery checking a generation before it activates it and
22 # keeping one whose check git did not finish, and injected sweep and
23 # swap failures, reported apart from the commit. go vet runs after them.
24 webui-unit = packages.webui.unit;
25
26 # The server and valley-web over the shared fixture, uploaded to a real
27 # store, and real git. The plan page's reading order, its free to start
28 # legend, its one card of ready changes, and the export's age, marked
29 # stale after five minutes; a knot's body and comments, with the edited
30 # one marked; a hidden project answering every route exactly as a
31 # missing one, though its repository is in the generation; a commit
32 # main's tip does not reach, and every other object ID or name, refused
33 # with the one 404; hostile README, file, file name, commit subject and
34 # knot text rendered inert, and large and binary files not shown; a
35 # reference into the hidden project naming nothing of it; a directory
36 # past MaxRead listed in part, and a 5 MiB commit message ending its
37 # page of history early; a file of MaxFile newlines shown to MaxLines;
38 # a chain of knots near the graph's limit shown to MaxPlanDepth, with
39 # the plan's structure built once; the policy on every response,
40 # admitting the page's inline stylesheet and script by their hashes; a
41 # request keeping its generation while another activates; an export
42 # read once per generation, however many requests wait for it, across
43 # activations; a load started only by a request taking a loader slot,
44 # with requests that wait for one ending at their deadline or when
45 # their reader goes away, leaving no load behind and holding no
46 # generation; a load reading export.json from a slow pipe stopped part
47 # way once its one request's deadline passes, caching nothing and
48 # giving back its generation; a flood during a load keeping
49 # MaxLoadWaiting requests waiting and answering the rest 503, with the
50 # server's goroutines and open files bounded; source requests past
51 # MaxGit and MaxWaiting answering 503, with an activation while they
52 # wait and a deadline that covers the wait; a request held past its
53 # deadline before it renders answering 503; a page past MaxResponse on
54 # a knot, and past a smaller bound on a file, a directory, a page of
55 # history and the plan, answering the one short page that says it is
56 # too large; readers that never read holding no git slot and no
57 # generation, and, asking for twice MaxBuffered, holding no more of the
58 # heap than it, with a page it has no room for answering 503; and
59 # valley-web run as a process of its own, serving and stopping on
60 # SIGTERM. go vet runs after them.
61 webui-server-unit = packages.valley-web.unit;
62}