@cotal-ai/workspace 0.57.0 → 0.59.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/dist/auth-paths.d.ts +60 -0
- package/dist/auth-paths.d.ts.map +1 -1
- package/dist/auth-paths.js +141 -1
- package/dist/auth-paths.js.map +1 -1
- package/dist/colors.d.ts +7 -2
- package/dist/colors.d.ts.map +1 -1
- package/dist/colors.js +24 -11
- package/dist/colors.js.map +1 -1
- package/dist/connect.d.ts +28 -3
- package/dist/connect.d.ts.map +1 -1
- package/dist/connect.js +82 -54
- package/dist/connect.js.map +1 -1
- package/dist/extensions.d.ts +6 -0
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +10 -1
- package/dist/extensions.js.map +1 -1
- package/dist/mesh-registry.d.ts +5 -0
- package/dist/mesh-registry.d.ts.map +1 -1
- package/dist/mesh-registry.js +3 -1
- package/dist/mesh-registry.js.map +1 -1
- package/dist/mesh-target.js +6 -6
- package/dist/mesh-target.js.map +1 -1
- package/dist/pid.d.ts +51 -9
- package/dist/pid.d.ts.map +1 -1
- package/dist/pid.js +168 -14
- package/dist/pid.js.map +1 -1
- package/package.json +2 -2
package/dist/pid.d.ts
CHANGED
|
@@ -32,6 +32,11 @@ export declare function parsePid(raw: string): number | undefined;
|
|
|
32
32
|
* suite still printed a passing banner: a wrong implementation reading green. A pure mapping has
|
|
33
33
|
* no fixture to skip. Found by review, not by me. */
|
|
34
34
|
export declare function livenessFromErrno(code: string | undefined): "alive" | "dead" | "unknown";
|
|
35
|
+
/** The liveness probe as a DEPENDENCY. `unknown` is only producible by kernel policy (a seccomp
|
|
36
|
+
* `SECCOMP_RET_ERRNO` filter, an LSM answering `security_task_kill`), so no test input can reach it
|
|
37
|
+
* and the branch that handles it would otherwise be guarded by nothing executable. Callers take
|
|
38
|
+
* this so that branch can be driven directly. Production passes nothing and gets the real one. */
|
|
39
|
+
export type LivenessProbe = (pid: number) => "alive" | "dead" | "unknown";
|
|
35
40
|
/** Tri-state liveness against the real kernel.
|
|
36
41
|
*
|
|
37
42
|
* CALLERS MUST PICK A DIRECTION, because the two questions pull opposite ways:
|
|
@@ -40,11 +45,6 @@ export declare function livenessFromErrno(code: string | undefined): "alive" | "
|
|
|
40
45
|
* A presence check written as `!== "dead"` turns an `unknown` into a permanent, silent, retry-proof
|
|
41
46
|
* false-up. Reviewed against a repro that wedged three control-plane retries against an
|
|
42
47
|
* unreachable manager. */
|
|
43
|
-
/** The liveness probe as a DEPENDENCY. `unknown` is only producible by kernel policy (a seccomp
|
|
44
|
-
* `SECCOMP_RET_ERRNO` filter, an LSM answering `security_task_kill`), so no test input can reach it
|
|
45
|
-
* and the branch that handles it would otherwise be guarded by nothing executable. Callers take
|
|
46
|
-
* this so that branch can be driven directly. Production passes nothing and gets the real one. */
|
|
47
|
-
export type LivenessProbe = (pid: number) => "alive" | "dead" | "unknown";
|
|
48
48
|
export declare function probeLiveness(pid: number): "alive" | "dead" | "unknown";
|
|
49
49
|
/** What was read about ONE pid's command line, three-valued for the same reason liveness is:
|
|
50
50
|
* "it is something else" and "I could not look" are different facts and only the first may be
|
|
@@ -217,8 +217,9 @@ export declare function identityLegacyWarning(label: string, pidfilePath: string
|
|
|
217
217
|
* clean, meshes, the web dashboard, smoke suites, and any operator script - keeps working, and a
|
|
218
218
|
* bare-pid pidfile remains a LEGACY record this change must handle with a loud warning, not break. The creation
|
|
219
219
|
* identity therefore lives in a SIBLING file `<pidfile>.identity` (the `manager.delivery-aware`
|
|
220
|
-
* marker pattern), holding the {@link formatRecord} two-field pin
|
|
221
|
-
* present-but-garbled = torn write, refuse;
|
|
220
|
+
* marker pattern), holding the {@link formatRecord} two-field pin, one line per record. Missing
|
|
221
|
+
* sibling = legacy record; present-but-garbled = torn write, refuse; no line for the pidfile's pid =
|
|
222
|
+
* torn pairing, refuse.
|
|
222
223
|
*/
|
|
223
224
|
export declare function identityPinPath(pidfilePath: string): string;
|
|
224
225
|
/** Write the sibling pin for a pid this launch just spawned. Called AFTER the pidfile write, with
|
|
@@ -227,6 +228,41 @@ export declare function identityPinPath(pidfilePath: string): string;
|
|
|
227
228
|
* or a pid whose creation time could not be read) writes NO pin. Windows writes a pin whenever
|
|
228
229
|
* {@link win32ProcessCreationToken} returns a FILETIME (#1437). */
|
|
229
230
|
export declare function writeIdentityPin(pidfilePath: string, pid: number, tokenAt?: ProcessStartTokenReader): void;
|
|
231
|
+
/** One step of {@link writePidPair}'s publish, passed to `onStep` right after it completes. Production
|
|
232
|
+
* passes no `onStep`; tests use it to plant a crash between two named steps and read what survives. */
|
|
233
|
+
export type PidPairStep = "temporaries" | "bridge-pin" | "publish-pid" | "publish-pin";
|
|
234
|
+
/** Publish the pidfile and its identity pin as ONE transition (issue #1238). The pidfile rename is the
|
|
235
|
+
* single commit point. Just before it, a BRIDGE pin is renamed into place holding the old record's
|
|
236
|
+
* line and the new one, so whichever pid the pidfile names at any instant, the pin carries that pid's
|
|
237
|
+
* own line and {@link verifyIdentityPin} checks it as the complete record it belongs to. After the
|
|
238
|
+
* commit, the settled pin (the new line alone) replaces the bridge.
|
|
239
|
+
*
|
|
240
|
+
* Reachable on-disk states, in order: before `bridge-pin`, the OLD complete record (or nothing, on a
|
|
241
|
+
* first start). After `bridge-pin`, the OLD pid checked against its own line, so a pin that was
|
|
242
|
+
* refusing a reused pid keeps refusing it. After `publish-pid`, the NEW pid checked against its own
|
|
243
|
+
* line. After `publish-pin`, the NEW complete record. No state is torn and none drops to the unpinned
|
|
244
|
+
* legacy shape. A legacy old record (a pidfile with no pin) is carried as a {@link NO_START_TOKEN}
|
|
245
|
+
* line, so it stays legacy until the commit. An old pin that is torn or has no line for the old pid
|
|
246
|
+
* has nothing to carry, so until the commit it refuses as a torn pairing, as it already did.
|
|
247
|
+
*
|
|
248
|
+
* When `identityRecord` cannot establish a token (ps-less host, or a pid whose start could not be
|
|
249
|
+
* read - same rule as {@link writeIdentityPin}), the new line carries {@link NO_START_TOKEN} and
|
|
250
|
+
* `publish-pin` removes the pin, leaving the legacy shape `writeIdentityPin` would have left. A crash
|
|
251
|
+
* after the commit reads that same legacy record, never the new pid paired with the old pin.
|
|
252
|
+
*
|
|
253
|
+
* Writers of one path are serialized by an advisory lock (`${path}.publish.lock`) held from the read
|
|
254
|
+
* of the old line to the settled pin: the launcher and the daemon it starts both publish the same
|
|
255
|
+
* record, and an unserialized bridge or settle could overwrite a newer publish. Teardown removes a
|
|
256
|
+
* record under the same lock ({@link removePidPair}). A crashed holder's lock is reclaimed by the
|
|
257
|
+
* next writer.
|
|
258
|
+
*
|
|
259
|
+
* On any throw, the temporaries are removed (`finally`, best-effort) and the error rethrown; the
|
|
260
|
+
* temporary names are never read by any reader (`${path}.publish.<pid>.<hex>`, the same claim-file
|
|
261
|
+
* pattern {@link claimAuthPidSlot} uses for `.claim.`). */
|
|
262
|
+
export declare function writePidPair(pidfilePath: string, pid: number, opts?: {
|
|
263
|
+
tokenAt?: ProcessStartTokenReader;
|
|
264
|
+
onStep?: (step: PidPairStep) => void;
|
|
265
|
+
}): void;
|
|
230
266
|
/** What {@link verifyIdentityPin} found for one pidfile. */
|
|
231
267
|
export type PinVerdict = {
|
|
232
268
|
kind: "legacy";
|
|
@@ -261,8 +297,14 @@ export type PinVerdict = {
|
|
|
261
297
|
* from it here so the pairing check cannot drift from however the caller read the pid.
|
|
262
298
|
*/
|
|
263
299
|
export declare function verifyIdentityPin(pidfilePath: string, tokenAt?: ProcessStartTokenReader): PinVerdict;
|
|
264
|
-
/** Remove
|
|
265
|
-
*
|
|
300
|
+
/** Remove a record whose process is PROVEN gone: the pin, then the pidfile. Never called on a refused
|
|
301
|
+
* stop: the preserved record keeps its pin so the next attempt re-adjudicates. It holds the lock
|
|
302
|
+
* {@link writePidPair} holds and removes only while the pidfile still reads `recorded` (trimmed), the
|
|
303
|
+
* record the caller adjudicated. A publish that committed a successor meanwhile is left whole, never
|
|
304
|
+
* stripped to a pidfile with no pin (#1238). With no pidfile, a stray pin is removed. */
|
|
305
|
+
export declare function removePidPair(pidfilePath: string, recorded: string): void;
|
|
306
|
+
/** @deprecated Use {@link removePidPair}. Removes the sibling pin alone, with no lock and no check
|
|
307
|
+
* for a successor's record. Kept for existing consumers for one minor line. */
|
|
266
308
|
export declare function removeIdentityPin(pidfilePath: string): void;
|
|
267
309
|
/** The loud torn/unpinned refusal, in the same shape as {@link identityRefusal}: name the component,
|
|
268
310
|
* the file, what was found, and the operator's next step. Legacy records do not reach this helper:
|
package/dist/pid.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pid.d.ts","sourceRoot":"","sources":["../src/pid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"pid.d.ts","sourceRoot":"","sources":["../src/pid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAOH;;;wCAGwC;AACxC,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGxD;AAED;;;;;;;;sDAQsD;AACtD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAIxF;AAED;;;mGAGmG;AACnG,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAE1E;;;;;;;2BAO2B;AAC3B,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAOvE;AAWD;;gBAEgB;AAChB,MAAM,MAAM,cAAc;AACxB,gDAAgD;AAC9C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE;AACtC,iGAAiG;GAC/F;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE;AAClB,oFAAoF;GAClF;IAAE,IAAI,EAAE,YAAY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D,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,KAAK,CAqBzG"}
|
package/dist/pid.js
CHANGED
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
* module they may depend on, never a core export.
|
|
19
19
|
*/
|
|
20
20
|
import { execFileSync, spawnSync } from "node:child_process";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
21
|
+
import { randomBytes } from "node:crypto";
|
|
22
|
+
import { existsSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
23
|
+
import { acquireLock, processStartToken as posixStartToken } from "./advisory-lock.js";
|
|
23
24
|
/** A Node/POSIX-signalable pid: a positive INTEGER within the signed 32-bit range `process.kill`
|
|
24
25
|
* accepts (it throws `ERR_INVALID_ARG_TYPE`/`ERR_OUT_OF_RANGE` outside it). Anything else -
|
|
25
26
|
* fractional, non-numeric, non-positive, oversized - is undefined: UNATTRIBUTABLE, never a pid to
|
|
@@ -44,6 +45,14 @@ export function livenessFromErrno(code) {
|
|
|
44
45
|
return "alive"; // exists, just not ours to signal
|
|
45
46
|
return "unknown"; // ERR_INVALID_ARG_TYPE / ERR_OUT_OF_RANGE / anything else - cannot attribute
|
|
46
47
|
}
|
|
48
|
+
/** Tri-state liveness against the real kernel.
|
|
49
|
+
*
|
|
50
|
+
* CALLERS MUST PICK A DIRECTION, because the two questions pull opposite ways:
|
|
51
|
+
* destructive ("may I delete this record?") -> preserve on doubt: `!== "dead"`
|
|
52
|
+
* presence ("is it up, may I skip starting?") -> require proof: `=== "alive"`
|
|
53
|
+
* A presence check written as `!== "dead"` turns an `unknown` into a permanent, silent, retry-proof
|
|
54
|
+
* false-up. Reviewed against a repro that wedged three control-plane retries against an
|
|
55
|
+
* unreachable manager. */
|
|
47
56
|
export function probeLiveness(pid) {
|
|
48
57
|
try {
|
|
49
58
|
process.kill(pid, 0);
|
|
@@ -233,8 +242,9 @@ export function identityLegacyWarning(label, pidfilePath) {
|
|
|
233
242
|
* clean, meshes, the web dashboard, smoke suites, and any operator script - keeps working, and a
|
|
234
243
|
* bare-pid pidfile remains a LEGACY record this change must handle with a loud warning, not break. The creation
|
|
235
244
|
* identity therefore lives in a SIBLING file `<pidfile>.identity` (the `manager.delivery-aware`
|
|
236
|
-
* marker pattern), holding the {@link formatRecord} two-field pin
|
|
237
|
-
* present-but-garbled = torn write, refuse;
|
|
245
|
+
* marker pattern), holding the {@link formatRecord} two-field pin, one line per record. Missing
|
|
246
|
+
* sibling = legacy record; present-but-garbled = torn write, refuse; no line for the pidfile's pid =
|
|
247
|
+
* torn pairing, refuse.
|
|
238
248
|
*/
|
|
239
249
|
export function identityPinPath(pidfilePath) {
|
|
240
250
|
return `${pidfilePath}.identity`;
|
|
@@ -250,6 +260,117 @@ export function writeIdentityPin(pidfilePath, pid, tokenAt = defaultStartToken)
|
|
|
250
260
|
return; // no start could be established: leave the legacy bare-pid shape, loud
|
|
251
261
|
writeFileSync(identityPinPath(pidfilePath), formatRecord(rec));
|
|
252
262
|
}
|
|
263
|
+
/** A pin's records, one per line. A settled pin holds one line; only {@link writePidPair}'s bridge
|
|
264
|
+
* holds two, the old record's and the new one's. `undefined` when the pin is empty or any line is
|
|
265
|
+
* not a record: a torn or tampered write. */
|
|
266
|
+
function parsePinLines(raw) {
|
|
267
|
+
const records = [];
|
|
268
|
+
for (const line of raw.split("\n")) {
|
|
269
|
+
if (line.trim() === "")
|
|
270
|
+
continue;
|
|
271
|
+
const parsed = parseRecord(line);
|
|
272
|
+
if (parsed.kind !== "record")
|
|
273
|
+
return undefined;
|
|
274
|
+
records.push(parsed.record);
|
|
275
|
+
}
|
|
276
|
+
return records.length === 0 ? undefined : records;
|
|
277
|
+
}
|
|
278
|
+
/** The token of a bridge line for a record in the legacy shape: a pid published with no start token,
|
|
279
|
+
* or an old pidfile that had no pin. The line reads as legacy, never as a torn pairing. */
|
|
280
|
+
const NO_START_TOKEN = "-";
|
|
281
|
+
/** The pin line of the pid the pidfile names right now. A pidfile with no pin at all is a legacy
|
|
282
|
+
* record, so its line carries {@link NO_START_TOKEN} and the bridge keeps it legacy. A pin that is
|
|
283
|
+
* unreadable or has no line for that pid has nothing to carry. */
|
|
284
|
+
function currentPinLine(pidfilePath) {
|
|
285
|
+
let current;
|
|
286
|
+
try {
|
|
287
|
+
current = parsePid(readFileSync(pidfilePath, "utf8"));
|
|
288
|
+
}
|
|
289
|
+
catch {
|
|
290
|
+
return undefined; // no pidfile: a first start, there is no old line to carry
|
|
291
|
+
}
|
|
292
|
+
if (current === undefined)
|
|
293
|
+
return undefined;
|
|
294
|
+
let rawPin;
|
|
295
|
+
try {
|
|
296
|
+
rawPin = readFileSync(identityPinPath(pidfilePath), "utf8");
|
|
297
|
+
}
|
|
298
|
+
catch (e) {
|
|
299
|
+
return e.code === "ENOENT" ? { pid: current, token: NO_START_TOKEN } : undefined;
|
|
300
|
+
}
|
|
301
|
+
return parsePinLines(rawPin)?.find((r) => r.pid === current);
|
|
302
|
+
}
|
|
303
|
+
/** The lock that serializes every writer of one pid record: {@link writePidPair} and {@link removePidPair}. */
|
|
304
|
+
function lockPidRecord(pidfilePath) {
|
|
305
|
+
return acquireLock(`${pidfilePath}.publish.lock`, { label: `the publish lock for ${pidfilePath}`, waitMs: 30_000, pollMs: 20 });
|
|
306
|
+
}
|
|
307
|
+
/** Publish the pidfile and its identity pin as ONE transition (issue #1238). The pidfile rename is the
|
|
308
|
+
* single commit point. Just before it, a BRIDGE pin is renamed into place holding the old record's
|
|
309
|
+
* line and the new one, so whichever pid the pidfile names at any instant, the pin carries that pid's
|
|
310
|
+
* own line and {@link verifyIdentityPin} checks it as the complete record it belongs to. After the
|
|
311
|
+
* commit, the settled pin (the new line alone) replaces the bridge.
|
|
312
|
+
*
|
|
313
|
+
* Reachable on-disk states, in order: before `bridge-pin`, the OLD complete record (or nothing, on a
|
|
314
|
+
* first start). After `bridge-pin`, the OLD pid checked against its own line, so a pin that was
|
|
315
|
+
* refusing a reused pid keeps refusing it. After `publish-pid`, the NEW pid checked against its own
|
|
316
|
+
* line. After `publish-pin`, the NEW complete record. No state is torn and none drops to the unpinned
|
|
317
|
+
* legacy shape. A legacy old record (a pidfile with no pin) is carried as a {@link NO_START_TOKEN}
|
|
318
|
+
* line, so it stays legacy until the commit. An old pin that is torn or has no line for the old pid
|
|
319
|
+
* has nothing to carry, so until the commit it refuses as a torn pairing, as it already did.
|
|
320
|
+
*
|
|
321
|
+
* When `identityRecord` cannot establish a token (ps-less host, or a pid whose start could not be
|
|
322
|
+
* read - same rule as {@link writeIdentityPin}), the new line carries {@link NO_START_TOKEN} and
|
|
323
|
+
* `publish-pin` removes the pin, leaving the legacy shape `writeIdentityPin` would have left. A crash
|
|
324
|
+
* after the commit reads that same legacy record, never the new pid paired with the old pin.
|
|
325
|
+
*
|
|
326
|
+
* Writers of one path are serialized by an advisory lock (`${path}.publish.lock`) held from the read
|
|
327
|
+
* of the old line to the settled pin: the launcher and the daemon it starts both publish the same
|
|
328
|
+
* record, and an unserialized bridge or settle could overwrite a newer publish. Teardown removes a
|
|
329
|
+
* record under the same lock ({@link removePidPair}). A crashed holder's lock is reclaimed by the
|
|
330
|
+
* next writer.
|
|
331
|
+
*
|
|
332
|
+
* On any throw, the temporaries are removed (`finally`, best-effort) and the error rethrown; the
|
|
333
|
+
* temporary names are never read by any reader (`${path}.publish.<pid>.<hex>`, the same claim-file
|
|
334
|
+
* pattern {@link claimAuthPidSlot} uses for `.claim.`). */
|
|
335
|
+
export function writePidPair(pidfilePath, pid, opts = {}) {
|
|
336
|
+
const tokenAt = opts.tokenAt ?? defaultStartToken;
|
|
337
|
+
const onStep = opts.onStep ?? (() => { });
|
|
338
|
+
const pinPath = identityPinPath(pidfilePath);
|
|
339
|
+
const suffix = `${process.pid}.${randomBytes(4).toString("hex")}`;
|
|
340
|
+
const pidTemp = `${pidfilePath}.publish.${suffix}`;
|
|
341
|
+
const pinTemp = `${pinPath}.publish.${suffix}`;
|
|
342
|
+
const bridgeTemp = `${pinPath}.publish.${suffix}.bridge`;
|
|
343
|
+
const rec = identityRecord(pid, tokenAt);
|
|
344
|
+
const line = "token" in rec ? rec : { pid, token: NO_START_TOKEN };
|
|
345
|
+
try {
|
|
346
|
+
writeFileSync(pidTemp, String(pid));
|
|
347
|
+
if ("token" in rec)
|
|
348
|
+
writeFileSync(pinTemp, formatRecord(rec));
|
|
349
|
+
const held = lockPidRecord(pidfilePath);
|
|
350
|
+
try {
|
|
351
|
+
const old = currentPinLine(pidfilePath);
|
|
352
|
+
writeFileSync(bridgeTemp, (old !== undefined && old.pid !== pid ? [old, line] : [line]).map(formatRecord).join("\n"));
|
|
353
|
+
onStep("temporaries");
|
|
354
|
+
renameSync(bridgeTemp, pinPath);
|
|
355
|
+
onStep("bridge-pin");
|
|
356
|
+
renameSync(pidTemp, pidfilePath);
|
|
357
|
+
onStep("publish-pid");
|
|
358
|
+
if ("token" in rec)
|
|
359
|
+
renameSync(pinTemp, pinPath);
|
|
360
|
+
else
|
|
361
|
+
rmSync(pinPath, { force: true });
|
|
362
|
+
onStep("publish-pin");
|
|
363
|
+
}
|
|
364
|
+
finally {
|
|
365
|
+
held.release();
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
finally {
|
|
369
|
+
rmSync(pidTemp, { force: true });
|
|
370
|
+
rmSync(pinTemp, { force: true });
|
|
371
|
+
rmSync(bridgeTemp, { force: true });
|
|
372
|
+
}
|
|
373
|
+
}
|
|
253
374
|
/**
|
|
254
375
|
* THE open-verify step every teardown runs BEFORE signalling (#969). Read the pidfile's bare pid,
|
|
255
376
|
* then the sibling pin, and adjudicate the pairing:
|
|
@@ -287,22 +408,55 @@ export function verifyIdentityPin(pidfilePath, tokenAt = defaultStartToken) {
|
|
|
287
408
|
// When the pid is ESRCH-dead there is nothing to signal, so the record is clearable whatever
|
|
288
409
|
// state the pin is in: a torn pin must not wedge the cleanup of a process that no longer exists.
|
|
289
410
|
const dead = probeLiveness(pidRead) === "dead";
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
if (
|
|
294
|
-
return dead ? { kind: "gone" } : { kind: "torn-
|
|
295
|
-
const
|
|
411
|
+
// The pidfile's pid is checked against its OWN line, so a bridge a crashed publish left behind
|
|
412
|
+
// adjudicates as the complete record whose pid the pidfile names (#1238).
|
|
413
|
+
const lines = parsePinLines(rawPin);
|
|
414
|
+
if (lines === undefined)
|
|
415
|
+
return dead ? { kind: "gone" } : { kind: "torn-pin", raw: rawPin.trim() };
|
|
416
|
+
const own = lines.find((r) => r.pid === pidRead);
|
|
417
|
+
if (own === undefined)
|
|
418
|
+
return dead ? { kind: "gone" } : { kind: "torn-pairing", pinPid: lines[0].pid };
|
|
419
|
+
if (own.token === NO_START_TOKEN)
|
|
420
|
+
return dead ? { kind: "gone" } : { kind: "legacy" }; // a no-token publish's line
|
|
421
|
+
const verdict = assertRecordIdentity(own, tokenAt);
|
|
296
422
|
if (verdict.kind === "match")
|
|
297
|
-
return { kind: "match", record:
|
|
423
|
+
return { kind: "match", record: own };
|
|
298
424
|
if (verdict.kind === "gone")
|
|
299
425
|
return { kind: "gone" };
|
|
300
426
|
if (verdict.kind === "mismatch")
|
|
301
|
-
return { kind: "mismatch", record:
|
|
427
|
+
return { kind: "mismatch", record: own, liveToken: verdict.liveToken };
|
|
302
428
|
return { kind: "unpinned" };
|
|
303
429
|
}
|
|
304
|
-
/** Remove
|
|
305
|
-
*
|
|
430
|
+
/** Remove a record whose process is PROVEN gone: the pin, then the pidfile. Never called on a refused
|
|
431
|
+
* stop: the preserved record keeps its pin so the next attempt re-adjudicates. It holds the lock
|
|
432
|
+
* {@link writePidPair} holds and removes only while the pidfile still reads `recorded` (trimmed), the
|
|
433
|
+
* record the caller adjudicated. A publish that committed a successor meanwhile is left whole, never
|
|
434
|
+
* stripped to a pidfile with no pin (#1238). With no pidfile, a stray pin is removed. */
|
|
435
|
+
export function removePidPair(pidfilePath, recorded) {
|
|
436
|
+
const pinPath = identityPinPath(pidfilePath);
|
|
437
|
+
if (!existsSync(pidfilePath) && !existsSync(pinPath))
|
|
438
|
+
return; // nothing recorded: take no lock, create no directory
|
|
439
|
+
const held = lockPidRecord(pidfilePath);
|
|
440
|
+
try {
|
|
441
|
+
let now;
|
|
442
|
+
try {
|
|
443
|
+
now = readFileSync(pidfilePath, "utf8").trim();
|
|
444
|
+
}
|
|
445
|
+
catch (e) {
|
|
446
|
+
if (e.code !== "ENOENT")
|
|
447
|
+
throw e;
|
|
448
|
+
}
|
|
449
|
+
if (now !== undefined && now !== recorded)
|
|
450
|
+
return; // a successor's record: not this removal's
|
|
451
|
+
rmSync(pinPath, { force: true });
|
|
452
|
+
rmSync(pidfilePath, { force: true });
|
|
453
|
+
}
|
|
454
|
+
finally {
|
|
455
|
+
held.release();
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
/** @deprecated Use {@link removePidPair}. Removes the sibling pin alone, with no lock and no check
|
|
459
|
+
* for a successor's record. Kept for existing consumers for one minor line. */
|
|
306
460
|
export function removeIdentityPin(pidfilePath) {
|
|
307
461
|
rmSync(identityPinPath(pidfilePath), { force: true });
|
|
308
462
|
}
|
package/dist/pid.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pid.js","sourceRoot":"","sources":["../src/pid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,iBAAiB,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1E;;;wCAGwC;AACxC,MAAM,UAAU,QAAQ,CAAC,GAAW;IAClC,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAC7B,OAAO,MAAM,CAAC,SAAS,CAAC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D,CAAC;AAED;;8DAE8D;AAC9D,MAAM,UAAU,0BAA0B,CAAC,KAAa,EAAE,WAAmB,EAAE,OAAmB;IAChG,MAAM,GAAG,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;IACzC,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU;QAC7B,OAAO,IAAI,KAAK,CACd,oBAAoB,KAAK,OAAO,WAAW,sBAAsB,GAAG,iCAAiC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,yDAAyD;YACzL,wKAAwK,CACzK,CAAC;IACJ,IAAI,OAAO,CAAC,IAAI,KAAK,cAAc;QACjC,OAAO,IAAI,KAAK,CACd,oBAAoB,KAAK,OAAO,WAAW,sBAAsB,GAAG,cAAc,OAAO,CAAC,MAAM,qDAAqD;YACrJ,oOAAoO,CACrO,CAAC;IACJ,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU;QAC7B,OAAO,IAAI,KAAK,CACd,oBAAoB,KAAK,OAAO,WAAW,6IAA6I;YACxL,8GAA8G,CAC/G,CAAC;IACJ,OAAO,IAAI,KAAK,CACd,oBAAoB,KAAK,OAAO,WAAW,wCAAwC,OAAO,CAAC,IAAI,+BAA+B;QAC9H,8GAA8G,CAC/G,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cotal-ai/workspace",
|
|
3
3
|
"description": "Cotal machine-local workstation layer: the ~/.cotal mesh registry, target resolution, preflight, on-disk auth-path I/O, and the command-copy renderer — operator concerns over a local checkout, kept separate from the wire protocol in @cotal-ai/core.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.59.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@cotal-ai/core": "0.
|
|
21
|
+
"@cotal-ai/core": "0.59.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@cotal-ai/smoke-kit": "0.0.0"
|