@hearsay-tools/squawk 0.19.0-pr4602.9145.2 → 0.19.0-pr4603.9151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/delegation/workspace-removal.d.ts +1 -1
- package/dist/delegation/workspace-removal.js +1 -1
- package/dist/delegation/workspace-removal.js.map +1 -1
- package/dist/git-command.d.ts +11 -0
- package/dist/git-command.js +14 -0
- package/dist/git-command.js.map +1 -1
- package/dist/git-worktree-claims.d.ts +96 -0
- package/dist/git-worktree-claims.js +219 -0
- package/dist/git-worktree-claims.js.map +1 -0
- package/dist/git-worktree-lock.d.ts +4 -3
- package/dist/git-worktree-lock.js +220 -66
- package/dist/git-worktree-lock.js.map +1 -1
- package/dist/server/runs-routes.d.ts +16 -16
- package/package.json +4 -4
- package/dist/git-worktree-lock-helper.d.ts +0 -30
- package/dist/git-worktree-lock-helper.js +0 -300
- package/dist/git-worktree-lock-helper.js.map +0 -1
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { realpath } from 'node:fs/promises';
|
|
1
|
+
import { open, readFile, realpath, stat, writeFile } from 'node:fs/promises';
|
|
3
2
|
import { join } from 'node:path';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { MAX_QUEUED_WAIT_MS } from './git-worktree-lock-helper.js';
|
|
3
|
+
import { runGit, spawnGatedGit } from './git-command.js';
|
|
4
|
+
import { acquireMutationClaim, claimFiles, mayExist, MAX_QUEUED_WAIT_MS, } from './git-worktree-claims.js';
|
|
7
5
|
/** The holder as one phrase: `worker-destroy for <id> (pid 42)`; a claim without a label is an unknown operation. */
|
|
8
6
|
export function describeMutationHolder(holder) {
|
|
9
7
|
return `${holder.operation ?? 'an unknown operation'}${holder.owner ? ` for ${holder.owner}` : ''} (pid ${holder.pid})`;
|
|
@@ -15,9 +13,13 @@ export class WorktreeMutationLockTimeout extends Error {
|
|
|
15
13
|
this.holder = holder;
|
|
16
14
|
}
|
|
17
15
|
}
|
|
16
|
+
/** The most git output a command under the lock may leave, per stream. */
|
|
17
|
+
const MAX_OUTPUT_BYTES = 32 * 1024 * 1024;
|
|
18
|
+
const CHILDREN_RUNNING = 'Git child processes of the timed-out command may still be running';
|
|
18
19
|
/**
|
|
19
|
-
* Serialize mutations by canonical Git common directory
|
|
20
|
-
* Git
|
|
20
|
+
* Serialize mutations by canonical Git common directory (ADR 0003, ADR 0076). The caller holds the
|
|
21
|
+
* claim itself; each Git command runs in its own process group, recorded in the claim before git
|
|
22
|
+
* starts, so the claim outlives a caller that dies while its git still runs.
|
|
21
23
|
*/
|
|
22
24
|
export async function withWorktreeMutation(repoRoot, operation, options = {}) {
|
|
23
25
|
const waitMs = options.waitMs ?? 120_000;
|
|
@@ -29,71 +31,223 @@ export async function withWorktreeMutation(repoRoot, operation, options = {}) {
|
|
|
29
31
|
// One deadline for finding the common directory and for the queue: `waitMs` bounds both together.
|
|
30
32
|
const startedAt = Date.now();
|
|
31
33
|
const common = await runGit(['rev-parse', '--path-format=absolute', '--git-common-dir'], { cwd: repoRoot, timeout: Math.max(1, Math.min(30_000, waitMs)) }).then(({ stdout }) => stdout.trim(), (error) => { throw new Error(`cannot resolve Git common directory: ${error.stderr.trim() || error.message}`); });
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
34
|
+
const directory = join(await realpath(common), 'cezar-worktree-mutations');
|
|
35
|
+
const acquired = await acquireMutationClaim(directory, {
|
|
36
|
+
waitMs: Math.max(0, waitMs - (Date.now() - startedAt)), perClaimMs, ...(options.label ? { label: options.label } : {}),
|
|
37
|
+
}).catch((error) => { throw new Error(`worktree mutation coordination failed: ${String(error)}`); });
|
|
38
|
+
if ('holder' in acquired)
|
|
39
|
+
throw new WorktreeMutationLockTimeout(acquired.holder);
|
|
40
|
+
const session = mutationSession(acquired.claim);
|
|
41
|
+
try {
|
|
42
|
+
return await operation(session.git);
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
await session.close();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/** The `git` an operation gets: one command at a time, each published in the claim while it runs. */
|
|
49
|
+
function mutationSession(claim) {
|
|
50
|
+
let queue = Promise.resolve();
|
|
51
|
+
let refusal;
|
|
52
|
+
let survivors;
|
|
53
|
+
const git = (cwd, args, timeout, input) => {
|
|
54
|
+
const run = queue.then(async () => {
|
|
55
|
+
// A command whose children may still write admits no further mutation.
|
|
56
|
+
if (refusal)
|
|
57
|
+
throw refusal;
|
|
58
|
+
const outcome = await runClaimed(claim, { cwd, args, timeout, input }).catch((error) => {
|
|
59
|
+
refusal = new Error(`worktree mutation command failed: ${String(error)}`);
|
|
60
|
+
throw refusal;
|
|
61
|
+
});
|
|
62
|
+
if (outcome.survivors !== undefined) {
|
|
63
|
+
survivors = outcome.survivors;
|
|
64
|
+
refusal = new Error(`worktree mutation command failed: ${CHILDREN_RUNNING}`);
|
|
65
|
+
}
|
|
66
|
+
return outcome.result;
|
|
67
|
+
});
|
|
68
|
+
queue = run.catch(() => undefined);
|
|
69
|
+
return run;
|
|
56
70
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
}
|
|
71
|
+
return {
|
|
72
|
+
git,
|
|
73
|
+
async close() {
|
|
74
|
+
await queue;
|
|
75
|
+
// The claim outlives this caller: the group probe frees it once every member is gone.
|
|
76
|
+
if (survivors !== undefined)
|
|
77
|
+
await claim.leaveToGroup(survivors);
|
|
78
|
+
else
|
|
79
|
+
await claim.release();
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function runClaimed(claim, command) {
|
|
84
|
+
return process.platform === 'win32' ? runWindows(claim, command) : runGrouped(claim, command);
|
|
85
|
+
}
|
|
86
|
+
/** Windows has no process groups: the claim says git runs while it does, and a caller that dies
|
|
87
|
+
* meanwhile leaves a claim no reader can prove free (`readMutationClaim`). */
|
|
88
|
+
async function runWindows(claim, command) {
|
|
89
|
+
await claim.write({ gitRunning: true });
|
|
90
|
+
const result = await runGit(command.args, { cwd: command.cwd, maxBuffer: MAX_OUTPUT_BYTES, timeout: command.timeout, input: command.input ?? '' }).then(({ stdout, stderr }) => ({ ok: true, stdout, stderr }), (error) => ({ ok: false, stdout: error.stdout ?? '', stderr: error.stderr || error.message || '',
|
|
91
|
+
...(error.killed && command.timeout ? { timedOut: true } : {}) }));
|
|
92
|
+
await claim.write({ gitRunning: false });
|
|
93
|
+
// Its children may still run, and a kept claim could never be freed here: it is released as
|
|
94
|
+
// usual, and only the caller's rollback and retry are skipped.
|
|
95
|
+
return { result: result.timedOut ? { ...result, childrenRunning: true, stderr: `${result.stderr}\n${CHILDREN_RUNNING}`.trim() } : result };
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Run one Git command in its own process group. Its output goes to files beside the claim, so git
|
|
99
|
+
* finishes even when this caller dies. The claim names the group before the gate opens: no git
|
|
100
|
+
* runs that a reader of the claim cannot see.
|
|
101
|
+
*/
|
|
102
|
+
async function runGrouped(claim, command) {
|
|
103
|
+
const files = claimFiles(claim.path);
|
|
104
|
+
const { child, exited, gate } = await startGated(files, command);
|
|
105
|
+
const group = child.pid;
|
|
106
|
+
if (group === undefined) {
|
|
107
|
+
const end = await exited;
|
|
108
|
+
return { result: { ok: false, stdout: '', stderr: 'error' in end ? end.error.message : `Command failed: git ${command.args.join(' ')}` } };
|
|
109
|
+
}
|
|
110
|
+
try {
|
|
111
|
+
await claim.write({ gitRunning: true, group });
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
// The gate never opens: sh reads end of file and exits without starting git.
|
|
115
|
+
gate?.destroy();
|
|
116
|
+
await exited;
|
|
117
|
+
throw error;
|
|
118
|
+
}
|
|
119
|
+
gate?.end('\n');
|
|
120
|
+
const run = await superviseGroup(group, exited, files, command.timeout);
|
|
121
|
+
if (run.settled === 'running') {
|
|
122
|
+
// Survivors keep the group the claim already names: nothing below may release it.
|
|
123
|
+
const result = await commandResult(files, command, false, run.overran);
|
|
124
|
+
return { result: { ...result, childrenRunning: true, stderr: `${result.stderr}\n${CHILDREN_RUNNING}`.trim() }, survivors: group };
|
|
125
|
+
}
|
|
126
|
+
await claim.write({ gitRunning: false });
|
|
127
|
+
return { result: await commandResult(files, command, run.ok, run.overran) };
|
|
128
|
+
}
|
|
129
|
+
/** Open the command's files and start git held at its gate; the gate is still closed. */
|
|
130
|
+
async function startGated(files, command) {
|
|
131
|
+
if (command.input !== undefined)
|
|
132
|
+
await writeFile(files.in, command.input, { mode: 0o600 });
|
|
133
|
+
const handles = await Promise.all([
|
|
134
|
+
command.input === undefined ? undefined : open(files.in, 'r'),
|
|
135
|
+
open(files.out, 'w', 0o600),
|
|
136
|
+
open(files.err, 'w', 0o600),
|
|
137
|
+
]);
|
|
138
|
+
const closeAll = () => Promise.all(handles.map(handle => handle?.close()));
|
|
139
|
+
let child;
|
|
140
|
+
try {
|
|
141
|
+
child = spawnGatedGit(command.args, { cwd: command.cwd, stdin: handles[0]?.fd ?? 'ignore', stdout: handles[1].fd, stderr: handles[2].fd });
|
|
142
|
+
}
|
|
143
|
+
catch (error) {
|
|
144
|
+
await closeAll();
|
|
145
|
+
throw error;
|
|
146
|
+
}
|
|
147
|
+
// Listen before the first await: a spawn failure (a missing `cwd`) emits error, never exit, on the next tick.
|
|
68
148
|
const exited = new Promise(resolve => {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
resolve();
|
|
72
|
-
});
|
|
73
|
-
// A spawn failure emits error but never exit. Do not await close here:
|
|
74
|
-
// explicit IPC disconnect can suppress it on supported Node versions.
|
|
75
|
-
keeper.once('error', () => { if (keeper.pid === undefined)
|
|
76
|
-
resolve(); });
|
|
149
|
+
child.once('exit', code => resolve({ code }));
|
|
150
|
+
child.once('error', error => { if (child.pid === undefined)
|
|
151
|
+
resolve({ error }); });
|
|
77
152
|
});
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
153
|
+
const gate = child.stdio[3];
|
|
154
|
+
// A gate closed by a sh that already exited (a failed spawn) reports EPIPE; the exit says what happened.
|
|
155
|
+
gate?.on('error', () => undefined);
|
|
156
|
+
// The child holds its own copies from here on.
|
|
157
|
+
await closeAll();
|
|
158
|
+
return { child, exited, gate };
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Watch a started command until its whole group is gone: stop it at its timeout, or when its
|
|
162
|
+
* output passes the limit while it runs, as execFile's maxBuffer did.
|
|
163
|
+
*/
|
|
164
|
+
async function superviseGroup(group, exited, files, timeout) {
|
|
165
|
+
const deadline = timeout ? Date.now() + timeout : undefined;
|
|
166
|
+
let timedOut = false;
|
|
167
|
+
let overflow = false;
|
|
168
|
+
// The group: git and every child it started, such as the checkout of `worktree add`.
|
|
169
|
+
const stop = () => { try {
|
|
170
|
+
process.kill(-group, 'SIGTERM');
|
|
171
|
+
}
|
|
172
|
+
catch { /* already gone */ } };
|
|
173
|
+
const timer = timeout ? setTimeout(() => { timedOut = true; stop(); }, timeout) : undefined;
|
|
174
|
+
const watch = setInterval(() => {
|
|
175
|
+
void outputOverLimit(files).then(over => { if (over && !overflow) {
|
|
176
|
+
overflow = true;
|
|
177
|
+
stop();
|
|
178
|
+
} });
|
|
179
|
+
}, OUTPUT_CHECK_MS);
|
|
180
|
+
const end = await exited;
|
|
181
|
+
clearTimeout(timer);
|
|
182
|
+
// Git's exit does not end its group: a git killed by a signal (OOM), or a hook it ran in the
|
|
183
|
+
// background, can leave a child that still writes. A stopped command's group gets no more time.
|
|
184
|
+
const settled = await settleGroup(group, deadline, () => overflow || timedOut);
|
|
185
|
+
clearInterval(watch);
|
|
186
|
+
return {
|
|
187
|
+
settled,
|
|
188
|
+
// A command whose group had to be signalled at its deadline overran its bound.
|
|
189
|
+
overran: timedOut || (!overflow && settled !== 'exited'),
|
|
190
|
+
ok: 'code' in end && end.code === 0 && settled === 'exited' && !timedOut && !overflow,
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
/** How often a running command's output files are measured against the limit. */
|
|
194
|
+
const OUTPUT_CHECK_MS = 100;
|
|
195
|
+
async function outputOverLimit(files) {
|
|
196
|
+
const sizes = await Promise.all([files.out, files.err].map(file => stat(file).then(info => info.size, () => 0)));
|
|
197
|
+
return sizes.some(size => size > MAX_OUTPUT_BYTES);
|
|
198
|
+
}
|
|
199
|
+
const groupProbe = (pid) => { process.kill(pid, 0); };
|
|
200
|
+
const pause = () => new Promise(resolve => setTimeout(resolve, 50));
|
|
201
|
+
/**
|
|
202
|
+
* Wait for every member of a command's group to exit: until the command's deadline, or at once for
|
|
203
|
+
* a command already stopped (timed out, or over the output limit), then SIGTERM and 10 s more.
|
|
204
|
+
* `exited` without that SIGTERM, `signalled` when the group ended only after it, `running` when
|
|
205
|
+
* members remain. Only ESRCH from the group probe proves every member gone (ADR 0003: no PID or
|
|
206
|
+
* `ps` snapshot).
|
|
207
|
+
*/
|
|
208
|
+
async function settleGroup(group, deadline, stopped) {
|
|
209
|
+
// Without a deadline it waits as long as git's children run, as the wait for git's output to close did before ADR 0076.
|
|
210
|
+
while (mayExist(groupProbe, -group)) {
|
|
211
|
+
if (stopped() || (deadline !== undefined && Date.now() >= deadline)) {
|
|
212
|
+
try {
|
|
213
|
+
process.kill(-group, 'SIGTERM');
|
|
214
|
+
}
|
|
215
|
+
catch { /* already gone */ }
|
|
216
|
+
for (let waited = 0; waited < 10_000; waited += 50) {
|
|
217
|
+
if (!mayExist(groupProbe, -group))
|
|
218
|
+
return 'signalled';
|
|
219
|
+
await pause();
|
|
220
|
+
}
|
|
221
|
+
return mayExist(groupProbe, -group) ? 'running' : 'signalled';
|
|
83
222
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
223
|
+
await pause();
|
|
224
|
+
}
|
|
225
|
+
return 'exited';
|
|
226
|
+
}
|
|
227
|
+
async function readOutput(path) {
|
|
228
|
+
return (await stat(path)).size > MAX_OUTPUT_BYTES ? undefined : readFile(path, 'utf8');
|
|
229
|
+
}
|
|
230
|
+
/** The result of a finished command; it never rejects, so a failed read cannot drop a survivor's claim. */
|
|
231
|
+
async function commandResult(files, command, ok, timedOut) {
|
|
232
|
+
let stdout;
|
|
233
|
+
let stderr;
|
|
89
234
|
try {
|
|
90
|
-
await
|
|
91
|
-
return await operation(git);
|
|
235
|
+
[stdout, stderr] = await Promise.all([readOutput(files.out), readOutput(files.err)]);
|
|
92
236
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
keeper.disconnect();
|
|
96
|
-
await exited;
|
|
237
|
+
catch (error) {
|
|
238
|
+
return { ok: false, stdout: '', stderr: `cannot read the output of git ${command.args[0] ?? ''}: ${String(error)}`, ...(timedOut ? { timedOut: true } : {}) };
|
|
97
239
|
}
|
|
240
|
+
if (stdout === undefined || stderr === undefined) {
|
|
241
|
+
return { ok: false, stdout: '', stderr: `git ${command.args[0] ?? ''} output is over the ${MAX_OUTPUT_BYTES / 1024 / 1024} MiB limit` };
|
|
242
|
+
}
|
|
243
|
+
if (ok)
|
|
244
|
+
return { ok, stdout, stderr };
|
|
245
|
+
return {
|
|
246
|
+
ok,
|
|
247
|
+
stdout,
|
|
248
|
+
stderr: stderr || `Command failed: git ${command.args.join(' ')}`,
|
|
249
|
+
// A git killed at its bound says so: its stderr alone reads like any other failure.
|
|
250
|
+
...(timedOut ? { timedOut: true } : {}),
|
|
251
|
+
};
|
|
98
252
|
}
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AO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QACjE,oFAAoF;QACpF,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACjD,CAAC;AACJ,CAAC"}
|
|
@@ -12303,20 +12303,20 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
12303
12303
|
} & {
|
|
12304
12304
|
"/runs/:id/handoff": {
|
|
12305
12305
|
$get: {
|
|
12306
|
-
output:
|
|
12307
|
-
|
|
12308
|
-
|
|
12306
|
+
output: {
|
|
12307
|
+
error: string;
|
|
12308
|
+
};
|
|
12309
|
+
outputFormat: "json";
|
|
12310
|
+
status: 404;
|
|
12309
12311
|
input: {
|
|
12310
12312
|
param: {
|
|
12311
12313
|
id: string;
|
|
12312
12314
|
};
|
|
12313
12315
|
};
|
|
12314
12316
|
} | {
|
|
12315
|
-
output:
|
|
12316
|
-
|
|
12317
|
-
|
|
12318
|
-
outputFormat: "json";
|
|
12319
|
-
status: 404;
|
|
12317
|
+
output: string;
|
|
12318
|
+
outputFormat: "text";
|
|
12319
|
+
status: 200;
|
|
12320
12320
|
input: {
|
|
12321
12321
|
param: {
|
|
12322
12322
|
id: string;
|
|
@@ -12354,20 +12354,20 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
12354
12354
|
} & {
|
|
12355
12355
|
"/runs/:id/diff": {
|
|
12356
12356
|
$get: {
|
|
12357
|
-
output:
|
|
12358
|
-
|
|
12359
|
-
|
|
12357
|
+
output: {
|
|
12358
|
+
error: string;
|
|
12359
|
+
};
|
|
12360
|
+
outputFormat: "json";
|
|
12361
|
+
status: 404 | 409;
|
|
12360
12362
|
input: {
|
|
12361
12363
|
param: {
|
|
12362
12364
|
id: string;
|
|
12363
12365
|
};
|
|
12364
12366
|
};
|
|
12365
12367
|
} | {
|
|
12366
|
-
output:
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
outputFormat: "json";
|
|
12370
|
-
status: 404 | 409;
|
|
12368
|
+
output: string;
|
|
12369
|
+
outputFormat: "text";
|
|
12370
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
12371
12371
|
input: {
|
|
12372
12372
|
param: {
|
|
12373
12373
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hearsay-tools/squawk",
|
|
3
|
-
"version": "0.19.0-
|
|
3
|
+
"version": "0.19.0-pr4603.9151",
|
|
4
4
|
"description": "Local cockpit for running and tracking AI agent tasks in your repo. Uses your logged-in `claude` CLI and `gh` — zero config, zero database.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@babel/parser": "^8.0.8",
|
|
71
71
|
"@babel/types": "^8.0.8",
|
|
72
|
-
"@open-mercato/cezar-api-client": "0.19.0-
|
|
73
|
-
"@open-mercato/cezar-contract": "0.19.0-
|
|
72
|
+
"@open-mercato/cezar-api-client": "0.19.0-pr4603.9151",
|
|
73
|
+
"@open-mercato/cezar-contract": "0.19.0-pr4603.9151",
|
|
74
74
|
"@types/node": "^24.19.1",
|
|
75
75
|
"@types/ws": "^8.18.1",
|
|
76
76
|
"esbuild": "^0.28.1",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"publishConfig": {
|
|
88
88
|
"access": "public"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "edc97a5300e0a466bce29dcb985fc45584b0d427"
|
|
91
91
|
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/** What a claim says about its owner, so a waiter that times out can name who holds the lock. */
|
|
2
|
-
export type MutationLabel = {
|
|
3
|
-
operation: string;
|
|
4
|
-
owner?: string;
|
|
5
|
-
};
|
|
6
|
-
type Claim = {
|
|
7
|
-
pid: number;
|
|
8
|
-
ticket: number;
|
|
9
|
-
gitRunning: boolean;
|
|
10
|
-
operation?: string;
|
|
11
|
-
owner?: string;
|
|
12
|
-
};
|
|
13
|
-
/** The claim a timed-out waiter names: the one whose turn it is. */
|
|
14
|
-
export type MutationHolder = {
|
|
15
|
-
pid: number;
|
|
16
|
-
operation?: string;
|
|
17
|
-
owner?: string;
|
|
18
|
-
};
|
|
19
|
-
export declare function readMutationClaim(path: string, platform: NodeJS.Platform, probe: (pid: number) => void): Promise<Claim | undefined>;
|
|
20
|
-
/** The longest any wait may last, its queue share included. */
|
|
21
|
-
export declare const MAX_QUEUED_WAIT_MS = 600000;
|
|
22
|
-
/** The wait budget for a claim with `ahead` claims queued before it: the base, plus `perClaimMs` for each, at most 10 min. */
|
|
23
|
-
export declare function queuedWaitBudget(waitMs: number, perClaimMs: number, ahead: number): number;
|
|
24
|
-
/** The keeper's per-claim wait argument in ms: a whole number from 0 to 600 000, 0 when absent. */
|
|
25
|
-
export declare function keeperPerClaimBudget(value: string | undefined): number;
|
|
26
|
-
/** The keeper's label argument: JSON with a non-empty `operation` and an optional `owner`; none when absent. */
|
|
27
|
-
export declare function keeperLabel(value: string | undefined): MutationLabel | undefined;
|
|
28
|
-
/** The keeper's wait budget argument in ms: a whole number from 0 to 120 000, 120 000 when absent. */
|
|
29
|
-
export declare function keeperWaitBudget(value: string | undefined): number;
|
|
30
|
-
export {};
|