@gadicc/loom 2.4.0 → 2.5.0
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/.loom-source-manifest.json +4 -1
- package/esm/src/cli/machineSlots.d.ts +149 -0
- package/esm/src/cli/machineSlots.d.ts.map +1 -0
- package/esm/src/cli/machineSlots.js +417 -0
- package/esm/src/cli/machineSlots.js.map +1 -0
- package/esm/src/cli/machineSlotsCommand.d.ts +24 -0
- package/esm/src/cli/machineSlotsCommand.d.ts.map +1 -0
- package/esm/src/cli/machineSlotsCommand.js +431 -0
- package/esm/src/cli/machineSlotsCommand.js.map +1 -0
- package/esm/src/cli/machineSlotsHost.d.ts +50 -0
- package/esm/src/cli/machineSlotsHost.d.ts.map +1 -0
- package/esm/src/cli/machineSlotsHost.js +192 -0
- package/esm/src/cli/machineSlotsHost.js.map +1 -0
- package/esm/src/cli/mod.d.ts.map +1 -1
- package/esm/src/cli/mod.js +39 -1
- package/esm/src/cli/mod.js.map +1 -1
- package/esm/src/cli/testResourceLaunch.d.ts +29 -1
- package/esm/src/cli/testResourceLaunch.d.ts.map +1 -1
- package/esm/src/cli/testResourceLaunch.js +49 -12
- package/esm/src/cli/testResourceLaunch.js.map +1 -1
- package/package.json +2 -2
- package/skills/loom/SKILL.md +43 -15
- package/skills/loom/references/verification-workflow.md +128 -0
- package/source/src/cli/machineSlots.ts +543 -0
- package/source/src/cli/machineSlotsCommand.ts +549 -0
- package/source/src/cli/machineSlotsHost.ts +215 -0
- package/source/src/cli/mod.ts +53 -1
- package/source/src/cli/testResourceLaunch.ts +71 -9
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `loom slots run|pin|status` (docs/machine-slots.md). `run` waits in line for
|
|
3
|
+
* a grant of CPUs from the machine-wide pool, then runs a command pinned to
|
|
4
|
+
* them; `pin` pins a light command to the pool, or to the grant it is in,
|
|
5
|
+
* without admission.
|
|
6
|
+
*/
|
|
7
|
+
import process from "node:process";
|
|
8
|
+
import { ancestorGrant, dropTicket, FlockSlotLocks, holderAlive, isHead, liveWaiters, newLease, ownLabel, readSlots, resolveSlotRequest, scanForGrant, scanOrder, SLOTS_SPEC, SlotsInterrupted, takeTicket, verifyLease, } from "./machineSlots.js";
|
|
9
|
+
import { readCoreTypes, readProcessStat, resolveSlotDirectory, } from "./machineSlotsHost.js";
|
|
10
|
+
import { inspectTestResources, } from "./testResourceHost.js";
|
|
11
|
+
import { executable, launch } from "./testResourceLaunch.js";
|
|
12
|
+
/** Agent-session markers; such a session is local even when `CI` is set. */
|
|
13
|
+
const AGENT_SESSION_ENV_NAMES = [
|
|
14
|
+
"CLAUDECODE",
|
|
15
|
+
"CLAUDE_CODE_ENTRYPOINT",
|
|
16
|
+
"AI_AGENT",
|
|
17
|
+
"CODEX_SANDBOX",
|
|
18
|
+
"CURSOR_AGENT",
|
|
19
|
+
"GEMINI_CLI",
|
|
20
|
+
];
|
|
21
|
+
const CI_ENV_NAMES = [
|
|
22
|
+
"CI",
|
|
23
|
+
"GITHUB_ACTIONS",
|
|
24
|
+
"GITLAB_CI",
|
|
25
|
+
"BUILDKITE",
|
|
26
|
+
"TF_BUILD",
|
|
27
|
+
];
|
|
28
|
+
/** Default deadline for waiting in line. */
|
|
29
|
+
const DEFAULT_WAIT_MINUTES = 60;
|
|
30
|
+
/** How long the wrapper waits for a finished job's process group. */
|
|
31
|
+
const GROUP_GRACE_MS = 30_000;
|
|
32
|
+
const POLL_MS = 250;
|
|
33
|
+
const REPORT_EVERY_MS = 30_000;
|
|
34
|
+
/** Whether this is CI: a CI variable set, and no agent-session marker. */
|
|
35
|
+
export function slotsProfile(env) {
|
|
36
|
+
const set = (name) => {
|
|
37
|
+
const value = env[name]?.trim();
|
|
38
|
+
return Boolean(value && !/^(0|false)$/i.test(value));
|
|
39
|
+
};
|
|
40
|
+
if (AGENT_SESSION_ENV_NAMES.some(set))
|
|
41
|
+
return "local";
|
|
42
|
+
return CI_ENV_NAMES.some(set) ? "ci" : "local";
|
|
43
|
+
}
|
|
44
|
+
/** The label text a job shows other waiters: never its command line. */
|
|
45
|
+
export function jobLabel(explicit, env) {
|
|
46
|
+
if (explicit)
|
|
47
|
+
return explicit.slice(0, 80);
|
|
48
|
+
const parts = [env.npm_package_name, env.npm_lifecycle_event].filter(Boolean);
|
|
49
|
+
return parts.length ? parts.join(" ").slice(0, 80) : "unlabelled";
|
|
50
|
+
}
|
|
51
|
+
/** Which flags each subcommand accepts; anything else is a usage error. */
|
|
52
|
+
export function slotsFlagProblem(sub, options) {
|
|
53
|
+
const given = [
|
|
54
|
+
["--min", options.min !== undefined],
|
|
55
|
+
["--max", options.max !== undefined],
|
|
56
|
+
["--label", options.label !== undefined],
|
|
57
|
+
["--wait-timeout", options.waitTimeout !== undefined],
|
|
58
|
+
["--allow-unpooled", Boolean(options.allowUnpooled)],
|
|
59
|
+
["--quiet", Boolean(options.quiet)],
|
|
60
|
+
["--json", Boolean(options.json)],
|
|
61
|
+
]
|
|
62
|
+
.filter(([, set]) => set)
|
|
63
|
+
.map(([name]) => name);
|
|
64
|
+
const allowed = {
|
|
65
|
+
run: [
|
|
66
|
+
"--min",
|
|
67
|
+
"--max",
|
|
68
|
+
"--label",
|
|
69
|
+
"--wait-timeout",
|
|
70
|
+
"--allow-unpooled",
|
|
71
|
+
"--quiet",
|
|
72
|
+
],
|
|
73
|
+
pin: ["--quiet"],
|
|
74
|
+
status: ["--json"],
|
|
75
|
+
};
|
|
76
|
+
const permitted = allowed[sub ?? ""];
|
|
77
|
+
if (!permitted)
|
|
78
|
+
return null;
|
|
79
|
+
const stray = given.filter((flag) => !permitted.includes(flag));
|
|
80
|
+
return stray.length
|
|
81
|
+
? `${stray.join(", ")} ${stray.length === 1 ? "does" : "do"} not apply to loom slots ${sub}`
|
|
82
|
+
: null;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The pool's CPUs (respecting inherited affinity), the machine's whole pool
|
|
86
|
+
* (for `status`), and the largest grant a known quota allows.
|
|
87
|
+
*/
|
|
88
|
+
function poolOf(report) {
|
|
89
|
+
const reserved = report.cpu.exclusion?.reservedCpus ?? [];
|
|
90
|
+
const quota = report.cpu.quota.status === "known"
|
|
91
|
+
? Math.max(1, Math.ceil(report.cpu.quota.cpus))
|
|
92
|
+
: undefined;
|
|
93
|
+
return {
|
|
94
|
+
pool: report.cpu.exclusion?.testCpus ?? [],
|
|
95
|
+
machine: report.cpu.online.filter((cpu) => !reserved.includes(cpu)),
|
|
96
|
+
quota,
|
|
97
|
+
reserved,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Test seam: a fixed pool instead of the machine's, honoured only together
|
|
102
|
+
* with `LOOM_SLOTS_DIR` and only for online CPUs, so a stray variable can
|
|
103
|
+
* neither split the real pool nor reach the reserved cores.
|
|
104
|
+
*/
|
|
105
|
+
function testPool(env, online) {
|
|
106
|
+
const text = env.LOOM_SLOTS_TEST_POOL;
|
|
107
|
+
if (!text || !env.LOOM_SLOTS_DIR)
|
|
108
|
+
return null;
|
|
109
|
+
const cpus = text.split(",").map((part) => Number(part.trim()));
|
|
110
|
+
if (cpus.length === 0 ||
|
|
111
|
+
cpus.some((cpu) => !Number.isSafeInteger(cpu) || !online.includes(cpu)))
|
|
112
|
+
throw new Error("LOOM_SLOTS_TEST_POOL must list online CPUs");
|
|
113
|
+
return [...new Set(cpus)];
|
|
114
|
+
}
|
|
115
|
+
function describe(cpus) {
|
|
116
|
+
return [...cpus].sort((a, b) => a - b).join(",");
|
|
117
|
+
}
|
|
118
|
+
async function runDirect(cwd, command, env) {
|
|
119
|
+
const result = await launch(command[0], command.slice(1), cwd, {
|
|
120
|
+
env,
|
|
121
|
+
name: "Loom slots",
|
|
122
|
+
holdInterrupts: true,
|
|
123
|
+
});
|
|
124
|
+
if (result.signal)
|
|
125
|
+
process.kill(process.pid, result.signal);
|
|
126
|
+
return result.code;
|
|
127
|
+
}
|
|
128
|
+
/** Strips grant variables so an unpooled child does not claim one. */
|
|
129
|
+
function withoutGrant(env) {
|
|
130
|
+
const copy = { ...env };
|
|
131
|
+
delete copy.LOOM_SLOTS;
|
|
132
|
+
delete copy.LOOM_SLOT_CPUS;
|
|
133
|
+
delete copy.LOOM_SLOTS_LEASE;
|
|
134
|
+
return copy;
|
|
135
|
+
}
|
|
136
|
+
/** The variables a job inside a grant receives. */
|
|
137
|
+
function grantEnv(env, lease, cpus) {
|
|
138
|
+
return {
|
|
139
|
+
...env,
|
|
140
|
+
LOOM_SLOTS: String(cpus.length),
|
|
141
|
+
LOOM_SLOT_CPUS: describe(cpus),
|
|
142
|
+
LOOM_SLOTS_LEASE: lease,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
/** Entry point for `loom slots <sub> [-- command]`. */
|
|
146
|
+
export async function runSlotsCommand(cwd, sub, command, options, io) {
|
|
147
|
+
const env = process.env;
|
|
148
|
+
const flagProblem = slotsFlagProblem(sub, options);
|
|
149
|
+
if (flagProblem) {
|
|
150
|
+
io.err(`Loom slots: ${flagProblem}; nothing ran.`);
|
|
151
|
+
return 120;
|
|
152
|
+
}
|
|
153
|
+
if (sub === "status")
|
|
154
|
+
return await slotsStatus(options, io);
|
|
155
|
+
if ((sub !== "run" && sub !== "pin") || command.length === 0) {
|
|
156
|
+
io.err("Usage: loom slots run [--min n] [--max n] [--label text] [--wait-timeout minutes] [--allow-unpooled] [--quiet] -- <command> [args]\n loom slots pin [--quiet] -- <command> [args]\n loom slots status [--json]");
|
|
157
|
+
return 120;
|
|
158
|
+
}
|
|
159
|
+
const note = (line) => {
|
|
160
|
+
if (!options.quiet)
|
|
161
|
+
io.err(`Loom slots: ${line}`);
|
|
162
|
+
};
|
|
163
|
+
if (slotsProfile(env) === "ci") {
|
|
164
|
+
note("CI profile; running without the machine pool.");
|
|
165
|
+
return await runDirect(cwd, command, withoutGrant(env));
|
|
166
|
+
}
|
|
167
|
+
if (process.platform !== "linux") {
|
|
168
|
+
note(`no machine-wide pool on ${process.platform}; this run is uncoordinated.`);
|
|
169
|
+
return await runDirect(cwd, command, withoutGrant(env));
|
|
170
|
+
}
|
|
171
|
+
// Linux: the pool, or a refusal unless the operator allowed a bypass.
|
|
172
|
+
const unavailable = async (reason) => {
|
|
173
|
+
if (!options.allowUnpooled) {
|
|
174
|
+
io.err(`Loom slots: the machine pool is unavailable (${reason}); nothing ran (exit 121). Pass --allow-unpooled to run uncoordinated.`);
|
|
175
|
+
return 121;
|
|
176
|
+
}
|
|
177
|
+
note(`${reason}; running uncoordinated (--allow-unpooled).`);
|
|
178
|
+
return await runDirect(cwd, command, withoutGrant(env));
|
|
179
|
+
};
|
|
180
|
+
const directory = resolveSlotDirectory(env);
|
|
181
|
+
if (directory.status !== "ready")
|
|
182
|
+
return await unavailable(directory.reason);
|
|
183
|
+
let flock;
|
|
184
|
+
let taskset;
|
|
185
|
+
try {
|
|
186
|
+
flock = await executable("flock");
|
|
187
|
+
taskset = await executable("taskset");
|
|
188
|
+
}
|
|
189
|
+
catch (error) {
|
|
190
|
+
return await unavailable(error instanceof Error ? error.message : String(error));
|
|
191
|
+
}
|
|
192
|
+
// Optional: the job is sent SIGTERM if the wrapper itself dies.
|
|
193
|
+
const setpriv = await executable("setpriv").catch(() => null);
|
|
194
|
+
const report = await inspectTestResources({ profile: "local" });
|
|
195
|
+
const { pool: machinePool, quota } = poolOf(report);
|
|
196
|
+
let pool;
|
|
197
|
+
try {
|
|
198
|
+
const test = testPool(env, report.cpu.online);
|
|
199
|
+
if (test)
|
|
200
|
+
note(`test pool ${describe(test)} (LOOM_SLOTS_TEST_POOL).`);
|
|
201
|
+
pool = test ?? machinePool;
|
|
202
|
+
}
|
|
203
|
+
catch (error) {
|
|
204
|
+
io.err(`Loom slots: ${error instanceof Error ? error.message : String(error)}; nothing ran.`);
|
|
205
|
+
return 120;
|
|
206
|
+
}
|
|
207
|
+
if (pool.length === 0)
|
|
208
|
+
return await unavailable("the pool has no CPUs");
|
|
209
|
+
const pinned = (cpus, args) => setpriv
|
|
210
|
+
? {
|
|
211
|
+
file: setpriv,
|
|
212
|
+
args: ["--pdeathsig", "TERM", taskset, "-c", describe(cpus), ...args],
|
|
213
|
+
}
|
|
214
|
+
: { file: taskset, args: ["-c", describe(cpus), ...args] };
|
|
215
|
+
// Already inside a grant: by its variables, or by an ancestor holding it.
|
|
216
|
+
const byVariables = verifyLease(directory.path, env, report.cpu.inherited, flock);
|
|
217
|
+
const grantInside = byVariables
|
|
218
|
+
? { lease: env.LOOM_SLOTS_LEASE, cpus: byVariables }
|
|
219
|
+
: ancestorGrant(directory.path, pool, flock);
|
|
220
|
+
if (sub === "pin") {
|
|
221
|
+
const cpus = grantInside?.cpus ?? pool;
|
|
222
|
+
note(grantInside
|
|
223
|
+
? `pinned to this job's grant (${describe(cpus)}).`
|
|
224
|
+
: `pinned to the pool (${describe(cpus)}), no admission.`);
|
|
225
|
+
const { file, args } = pinned(cpus, command);
|
|
226
|
+
const result = await launch(file, args, cwd, {
|
|
227
|
+
env: grantInside
|
|
228
|
+
? grantEnv(env, grantInside.lease, grantInside.cpus)
|
|
229
|
+
: withoutGrant(env),
|
|
230
|
+
name: "Loom slots",
|
|
231
|
+
holdInterrupts: true,
|
|
232
|
+
});
|
|
233
|
+
if (result.signal)
|
|
234
|
+
process.kill(process.pid, result.signal);
|
|
235
|
+
return result.code;
|
|
236
|
+
}
|
|
237
|
+
// Inside a grant, reuse it: no acquisition, nothing to deadlock on.
|
|
238
|
+
if (grantInside) {
|
|
239
|
+
note(`reusing this job's grant of ${grantInside.cpus.length} CPUs.`);
|
|
240
|
+
return await runDirect(cwd, command, grantEnv(env, grantInside.lease, grantInside.cpus));
|
|
241
|
+
}
|
|
242
|
+
let request;
|
|
243
|
+
let waitMs;
|
|
244
|
+
try {
|
|
245
|
+
request = resolveSlotRequest(pool.length, options.min, options.max, {
|
|
246
|
+
quota,
|
|
247
|
+
});
|
|
248
|
+
const minutes = options.waitTimeout === undefined
|
|
249
|
+
? DEFAULT_WAIT_MINUTES
|
|
250
|
+
: Number(options.waitTimeout);
|
|
251
|
+
if (!Number.isFinite(minutes) || minutes <= 0)
|
|
252
|
+
throw new Error("--wait-timeout must be a positive number of minutes");
|
|
253
|
+
waitMs = minutes * 60_000;
|
|
254
|
+
}
|
|
255
|
+
catch (error) {
|
|
256
|
+
io.err(`Loom slots: ${error instanceof Error ? error.message : String(error)}`);
|
|
257
|
+
return 120;
|
|
258
|
+
}
|
|
259
|
+
const lease = newLease();
|
|
260
|
+
const text = jobLabel(options.label, env);
|
|
261
|
+
const locks = new FlockSlotLocks(directory.path, flock);
|
|
262
|
+
const order = scanOrder(pool, readCoreTypes());
|
|
263
|
+
let ticket = null;
|
|
264
|
+
let interrupted = null;
|
|
265
|
+
const onSignal = (signal) => {
|
|
266
|
+
interrupted = signal;
|
|
267
|
+
};
|
|
268
|
+
const signals = ["SIGINT", "SIGTERM", "SIGHUP"];
|
|
269
|
+
for (const signal of signals)
|
|
270
|
+
process.on(signal, onSignal);
|
|
271
|
+
const started = Date.now();
|
|
272
|
+
let grant = null;
|
|
273
|
+
try {
|
|
274
|
+
const ticketLabel = ownLabel("ticket", lease, text, request);
|
|
275
|
+
ticket = takeTicket(directory.path, ticketLabel, flock);
|
|
276
|
+
let reported = 0;
|
|
277
|
+
while (!interrupted) {
|
|
278
|
+
const waiters = liveWaiters(directory.path, ticket.name, flock);
|
|
279
|
+
if (!waiters.some((one) => one.name === ticket?.name)) {
|
|
280
|
+
// Our ticket vanished (removed by hand, or the directory recreated):
|
|
281
|
+
// take a new one rather than wait unseen until the deadline.
|
|
282
|
+
dropTicket(directory.path, ticket);
|
|
283
|
+
ticket = null;
|
|
284
|
+
ticket = takeTicket(directory.path, ticketLabel, flock);
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
if (isHead(waiters, ticket.name))
|
|
288
|
+
grant = await scanForGrant(order, request, locks);
|
|
289
|
+
if (grant || interrupted)
|
|
290
|
+
break;
|
|
291
|
+
const waited = Date.now() - started;
|
|
292
|
+
if (waited >= waitMs) {
|
|
293
|
+
io.err(`Loom slots: no grant of ${request.min} CPUs within ${Math.round(waitMs / 60_000)} min; nothing ran (exit 122).`);
|
|
294
|
+
return 122;
|
|
295
|
+
}
|
|
296
|
+
if (!options.quiet && waited >= reported) {
|
|
297
|
+
const held = readSlots(directory.path, pool, flock).filter((slot) => slot.state === "held");
|
|
298
|
+
const holders = new Map();
|
|
299
|
+
for (const slot of held) {
|
|
300
|
+
const name = slot.label
|
|
301
|
+
? `${slot.label.label} (pid ${slot.label.pid})`
|
|
302
|
+
: "unlabelled";
|
|
303
|
+
holders.set(name, (holders.get(name) ?? 0) + 1);
|
|
304
|
+
}
|
|
305
|
+
const ahead = waiters.findIndex((one) => one.name === ticket?.name);
|
|
306
|
+
io.err(`Loom slots: waiting ${Math.round(waited / 1000)} s for ${request.min} of ${pool.length} CPUs` +
|
|
307
|
+
(ahead > 0 ? `, ${ahead} ahead in line` : "") +
|
|
308
|
+
(holders.size
|
|
309
|
+
? `; held by ${[...holders].map(([name, count]) => `${name}: ${count}`).join(", ")}`
|
|
310
|
+
: "") +
|
|
311
|
+
".");
|
|
312
|
+
reported = waited + REPORT_EVERY_MS;
|
|
313
|
+
}
|
|
314
|
+
await new Promise((resolve) => setTimeout(resolve, POLL_MS));
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
catch (error) {
|
|
318
|
+
if (!(error instanceof SlotsInterrupted)) {
|
|
319
|
+
locks.releaseAll();
|
|
320
|
+
io.err(`Loom slots: ${error instanceof Error ? error.message : String(error)} (exit 121).`);
|
|
321
|
+
return 121;
|
|
322
|
+
}
|
|
323
|
+
interrupted ??= "SIGINT";
|
|
324
|
+
}
|
|
325
|
+
finally {
|
|
326
|
+
if (ticket)
|
|
327
|
+
dropTicket(directory.path, ticket);
|
|
328
|
+
for (const signal of signals)
|
|
329
|
+
process.off(signal, onSignal);
|
|
330
|
+
if (!grant || interrupted)
|
|
331
|
+
locks.releaseAll();
|
|
332
|
+
}
|
|
333
|
+
if (!grant || interrupted) {
|
|
334
|
+
// Interrupted while waiting (or as the grant arrived): nothing runs.
|
|
335
|
+
process.kill(process.pid, interrupted ?? "SIGINT");
|
|
336
|
+
return 130;
|
|
337
|
+
}
|
|
338
|
+
locks.label(ownLabel("slot", lease, text, request));
|
|
339
|
+
note(`${grant.length} CPU${grant.length === 1 ? "" : "s"} (${describe(grant)}) after ${Math.round((Date.now() - started) / 1000)} s.`);
|
|
340
|
+
try {
|
|
341
|
+
const { file, args } = pinned(grant, command);
|
|
342
|
+
const result = await launch(file, args, cwd, {
|
|
343
|
+
env: grantEnv(env, lease, grant),
|
|
344
|
+
groupGraceMs: GROUP_GRACE_MS,
|
|
345
|
+
name: "Loom slots",
|
|
346
|
+
holdInterrupts: true,
|
|
347
|
+
});
|
|
348
|
+
locks.releaseAll();
|
|
349
|
+
if (result.signal)
|
|
350
|
+
process.kill(process.pid, result.signal);
|
|
351
|
+
return result.code;
|
|
352
|
+
}
|
|
353
|
+
finally {
|
|
354
|
+
locks.releaseAll();
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
async function slotsStatus(options, io) {
|
|
358
|
+
if (process.platform !== "linux") {
|
|
359
|
+
io.out(`No machine-wide slot pool on ${process.platform}.`);
|
|
360
|
+
return 0;
|
|
361
|
+
}
|
|
362
|
+
const directory = resolveSlotDirectory(process.env);
|
|
363
|
+
if (directory.status !== "ready") {
|
|
364
|
+
io.err(`Loom slots: the pool is unavailable: ${directory.reason}.`);
|
|
365
|
+
return 121;
|
|
366
|
+
}
|
|
367
|
+
let flock;
|
|
368
|
+
try {
|
|
369
|
+
flock = await executable("flock");
|
|
370
|
+
}
|
|
371
|
+
catch {
|
|
372
|
+
io.err("Loom slots: flock(1) is unavailable.");
|
|
373
|
+
return 121;
|
|
374
|
+
}
|
|
375
|
+
const report = await inspectTestResources({ profile: "local" });
|
|
376
|
+
const { machine, reserved, quota } = poolOf(report);
|
|
377
|
+
let pool;
|
|
378
|
+
try {
|
|
379
|
+
pool = testPool(process.env, report.cpu.online) ?? machine;
|
|
380
|
+
}
|
|
381
|
+
catch (error) {
|
|
382
|
+
io.err(`Loom slots: ${error instanceof Error ? error.message : String(error)}.`);
|
|
383
|
+
return 120;
|
|
384
|
+
}
|
|
385
|
+
const slots = readSlots(directory.path, pool, flock).map((slot) => ({
|
|
386
|
+
...slot,
|
|
387
|
+
holder: slot.state !== "held" || !slot.label
|
|
388
|
+
? null
|
|
389
|
+
: !holderAlive(slot.label)
|
|
390
|
+
? "label stale"
|
|
391
|
+
: /^[Tt]$/.test(readProcessStat(slot.label.pid)?.state ?? "")
|
|
392
|
+
? "stopped"
|
|
393
|
+
: "running",
|
|
394
|
+
}));
|
|
395
|
+
const waiters = liveWaiters(directory.path, null, flock);
|
|
396
|
+
if (options.json) {
|
|
397
|
+
io.out(JSON.stringify({
|
|
398
|
+
spec: SLOTS_SPEC,
|
|
399
|
+
directory: directory.path,
|
|
400
|
+
reserved,
|
|
401
|
+
pool,
|
|
402
|
+
quota: quota ?? null,
|
|
403
|
+
slots,
|
|
404
|
+
waiters,
|
|
405
|
+
}));
|
|
406
|
+
return 0;
|
|
407
|
+
}
|
|
408
|
+
const held = slots.filter((slot) => slot.state === "held");
|
|
409
|
+
io.out(`${SLOTS_SPEC} in ${directory.path}: ${pool.length} CPUs (${describe(pool)}), reserved ${describe(reserved) || "none"}; ${held.length} held.`);
|
|
410
|
+
const byLease = new Map();
|
|
411
|
+
for (const slot of held) {
|
|
412
|
+
const key = slot.label?.lease ?? `unlabelled-${slot.cpu}`;
|
|
413
|
+
const entry = byLease.get(key) ?? {
|
|
414
|
+
label: slot.label?.label ?? "unlabelled",
|
|
415
|
+
pid: slot.label?.pid ?? 0,
|
|
416
|
+
cpus: [],
|
|
417
|
+
since: slot.label?.startedAt ?? "",
|
|
418
|
+
note: slot.holder && slot.holder !== "running" ? ` [${slot.holder}]` : "",
|
|
419
|
+
};
|
|
420
|
+
entry.cpus.push(slot.cpu);
|
|
421
|
+
byLease.set(key, entry);
|
|
422
|
+
}
|
|
423
|
+
for (const entry of byLease.values())
|
|
424
|
+
io.out(` held: ${entry.label} (pid ${entry.pid}), ${entry.cpus.length} CPUs (${describe(entry.cpus)}), since ${entry.since}${entry.note}`);
|
|
425
|
+
const unknown = slots.filter((slot) => slot.state === "unknown");
|
|
426
|
+
if (unknown.length)
|
|
427
|
+
io.out(` unreadable: ${describe(unknown.map((slot) => slot.cpu))} (could not be probed)`);
|
|
428
|
+
waiters.forEach((waiter, index) => io.out(` waiting ${index + 1}: ${waiter.label?.label ?? "unlabelled"} (pid ${waiter.label?.pid ?? "?"}), wants ${waiter.label?.request ? `${waiter.label.request.min}–${waiter.label.request.max}` : "?"}, since ${waiter.label?.startedAt ?? "?"}${waiter.stopped ? " [stopped, skipped]" : ""}`));
|
|
429
|
+
return 0;
|
|
430
|
+
}
|
|
431
|
+
//# sourceMappingURL=machineSlotsCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"machineSlotsCommand.js","sourceRoot":"","sources":["../../../source/src/cli/machineSlotsCommand.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EACL,aAAa,EACb,UAAU,EACV,cAAc,EACd,WAAW,EACX,MAAM,EACN,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,WAAW,GAGZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,aAAa,EACb,eAAe,EACf,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,GAErB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAE7D,4EAA4E;AAC5E,MAAM,uBAAuB,GAAG;IAC9B,YAAY;IACZ,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AAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAChC,EAAE,CAAC,GAAG,CACJ,aAAa,KAAK,GAAG,CAAC,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,IAAI,YAAY,SAAS,MAAM,CAAC,KAAK,EAAE,GAAG,IAAI,GAAG,YAAY,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,WAAW,MAAM,CAAC,KAAK,EAAE,SAAS,IAAI,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,EAAE,CAC5R,CACF,CAAC;IACF,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** Where the per-user pool lives, and why it is or is not usable. */
|
|
2
|
+
export type SlotDirectory = {
|
|
3
|
+
status: "ready";
|
|
4
|
+
path: string;
|
|
5
|
+
} | {
|
|
6
|
+
status: "unavailable";
|
|
7
|
+
reason: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Resolves the pool directory: `/run/user/<uid>/loom/slots` when that runtime
|
|
11
|
+
* directory exists and is this user's (whatever `XDG_RUNTIME_DIR` says, so a
|
|
12
|
+
* scrubbed environment cannot split the pool), else `/tmp/loom-<uid>/slots`.
|
|
13
|
+
* `LOOM_SLOTS_DIR` overrides it for tests. Every level Loom creates is made
|
|
14
|
+
* mode 0700 and must be a real directory, owned by this user and writable by
|
|
15
|
+
* no one else; otherwise there is no pool.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveSlotDirectory(env?: Readonly<Record<string, string | undefined>>, uid?: number | undefined): SlotDirectory;
|
|
18
|
+
/**
|
|
19
|
+
* Opens a pool file without following a symlink and without truncating it,
|
|
20
|
+
* creating it (mode 0600) unless `existingOnly`. The open file must be a
|
|
21
|
+
* regular file owned by this user with exactly one link; anything else is
|
|
22
|
+
* closed and refused, so a planted link can never be written through.
|
|
23
|
+
* Returns null when `existingOnly` and the file is gone.
|
|
24
|
+
*/
|
|
25
|
+
export declare function openPoolFile(path: string, options?: {
|
|
26
|
+
existingOnly?: boolean;
|
|
27
|
+
exclusive?: boolean;
|
|
28
|
+
}, uid?: number | undefined): number | null;
|
|
29
|
+
/** A process's scheduler state and start time, from `/proc/<pid>/stat`. */
|
|
30
|
+
export interface ProcessStat {
|
|
31
|
+
/** Single-letter state; `T` and `t` are stopped. */
|
|
32
|
+
state: string;
|
|
33
|
+
/** Start time in clock ticks since boot; with the pid, a unique identity. */
|
|
34
|
+
start: string;
|
|
35
|
+
/** Parent pid. */
|
|
36
|
+
ppid: number;
|
|
37
|
+
}
|
|
38
|
+
/** Parses `/proc/<pid>/stat`, whose command name may hold spaces and parentheses. */
|
|
39
|
+
export declare function parseProcessStat(text: string): ProcessStat | null;
|
|
40
|
+
/** Reads a live process's stat, or null when it no longer exists. */
|
|
41
|
+
export declare function readProcessStat(pid: number): ProcessStat | null;
|
|
42
|
+
/**
|
|
43
|
+
* This process's ancestors as `pid:start` keys, walking `/proc` parent links,
|
|
44
|
+
* so a holder can be recognised as an ancestor even when the environment
|
|
45
|
+
* that named its grant was scrubbed on the way down.
|
|
46
|
+
*/
|
|
47
|
+
export declare function ancestorKeys(pid?: number, stat?: (pid: number) => ProcessStat | null): Set<string>;
|
|
48
|
+
/** Reads the hybrid core types Linux reports, as performance and efficiency CPU lists. */
|
|
49
|
+
export declare function readCoreTypes(read?: (path: string) => string | undefined): string[];
|
|
50
|
+
//# sourceMappingURL=machineSlotsHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"machineSlotsHost.d.ts","sourceRoot":"","sources":["../../../source/src/cli/machineSlotsHost.ts"],"names":[],"mappings":"AAUA,qEAAqE;AACrE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