1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
//! What:
//! The resident commit service:
//! protocol,
//! server,
//! client,
//! journal,
//! provisioning and logging.
//! Why:
//! The service is a mode of the one executable with a life of its own: the operating system starts it on demand.
//!
//! In TS you'd write (pseudocode):
//! ```ts
//! // service/index.ts: one `export * from './file'` per module below.
//! ```
/// Whether a socket of an earlier release's unit listens, read from the table of unix sockets.
/// Messages between the wrapper and the resident commit service.
/// The protocol messages as typed values, and the checks on the names they carry.
/// Writes protocol messages as one JSON object per line.
/// Reads protocol lines as messages, checking every field.
/// The longest the wrapper waits for each thing it waits for, with the measurement beside each number.
/// What the one landing thread is doing, shared with the threads that talk to waiting clients.
/// The answers the landing board gives and the checks on the names it keeps.
/// The step record a thread keeps while it is inside a write that is never ended.
/// The connection of one waiting client, answered by the landing thread and kept alive by a beat from the reading thread.
/// The commit service's journal and its restart decisions.
/// The text form of a batch intent: written and parsed.
/// Test-only fault points of the commit service.
/// The native journal protocol and the standard error fallback the service's entries go through.
/// The address native journal entries are sent to.
/// The lines the commit service writes about its life and about the time each request took.
/// The line the commit service writes when a signal ends it.
/// The commit service's loop.
/// The loop of the commit service's work thread.
/// The shapes the connection threads and the landing thread pass between them, and the one-message send.
/// Lands one group of queued requests as a batch and answers each client.
/// Handles one client connection of the commit service.
/// Gets the listening socket of the commit service.
/// The service as a mode of the one executable: the words that select it and the start of the service.
/// The wrapper's side of a commit through the commit service.
/// Connecting to the service, reading one line from it, and asking an older service to retire.
/// The settings of one client run and the watch on the service manager's answer.
/// Reaching the commit service, starting it when nothing answers.
/// The wrapper's own provisioning of the commit service's socket activation.
/// Checks and writes on the unit files of the commit service.
/// A minimal D-Bus client for the user session bus, for the provisioning's two calls.
/// The D-Bus wire format of the user manager client: calls written, replies read.
/// Which commit service instance belongs to a worktree: its name, socket and unit instances.
/// One entry from the wrapper a person ran to the journal, sent without waiting.
/// The service's handler for a review work item, bounded by a call deadline and a total budget.
/// The standards-review credential: redacted when printed, read from the wrapper's environment, sent in the work message.