@wjarka/cezarion 0.14.9-dev.915 → 0.14.9-dev.936

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.
@@ -41,17 +41,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
41
41
  "/api/v1/tools/ci-wait": {
42
42
  $post: {
43
43
  output: {
44
- prUrl: string;
45
- repository: string;
46
- prNumber: number;
47
- headSha: string;
48
- waitId: string;
49
- registeredAt: string;
50
- deadline: string;
51
- phase: "delivered" | "parked" | "registered" | "wake-pending" | "withdrawn";
44
+ code: "authentication" | "capacity" | "command_failed" | "gh_missing" | "inaccessible_pr" | "invalid_request" | "malformed_data" | "output_limit" | "persistence" | "query_timeout" | "unauthorized" | "unavailable" | "unsupported_host" | "wait_conflict";
45
+ message: string;
52
46
  };
53
47
  outputFormat: "json";
54
- status: import("hono/utils/http-status").ContentfulStatusCode;
48
+ status: 503;
55
49
  input: {
56
50
  json: {
57
51
  pr: string;
@@ -60,11 +54,17 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
60
54
  };
61
55
  } | {
62
56
  output: {
63
- code: "authentication" | "capacity" | "command_failed" | "gh_missing" | "inaccessible_pr" | "invalid_request" | "malformed_data" | "output_limit" | "persistence" | "query_timeout" | "unauthorized" | "unavailable" | "unsupported_host" | "wait_conflict";
64
- message: string;
57
+ prUrl: string;
58
+ repository: string;
59
+ prNumber: number;
60
+ headSha: string;
61
+ waitId: string;
62
+ registeredAt: string;
63
+ deadline: string;
64
+ phase: "delivered" | "parked" | "registered" | "wake-pending" | "withdrawn";
65
65
  };
66
66
  outputFormat: "json";
67
- status: 503;
67
+ status: import("hono/utils/http-status").ContentfulStatusCode;
68
68
  input: {
69
69
  json: {
70
70
  pr: string;
@@ -44,6 +44,10 @@ export interface RuntimeAuthFailureReport {
44
44
  status: 'disconnected';
45
45
  authFailureId: string;
46
46
  };
47
+ /** The incident's generation at report time. A self-check that starts asynchronously (the
48
+ * runtime watcher resolves the failing account first) carries it through so the check can
49
+ * stand down when a newer failure replaced the incident it was triggered by. */
50
+ generation: number;
47
51
  /** True only for the global latch edge, so callers can fan out one coarse
48
52
  * status update while every affected task still records its own callout. */
49
53
  transitioned: boolean;
@@ -53,14 +57,26 @@ export declare class ProviderAuthService {
53
57
  private readonly now;
54
58
  private readonly platform;
55
59
  private readonly createAuthFailureId;
60
+ private readonly scheduleRuntimeRetry;
56
61
  private readonly runtimeFailures;
62
+ /** One self-check at a time per provider, and not more often than the cooldown. Both guard the
63
+ * same thing — a CLI spawn per auth-shaped error line — from the two directions it can arrive
64
+ * from: concurrently, and in quick succession. */
65
+ private readonly verifyingRuntimeFailures;
66
+ private readonly lastRuntimeVerification;
67
+ /** One pending cooldown-expiry re-check per provider, cancellable. See
68
+ * {@link ProviderAuthService.scheduleRuntimeVerification}. */
69
+ private readonly deferredRuntimeVerifications;
57
70
  private nextRuntimeFailureGeneration;
58
71
  private nextProbeGeneration;
59
72
  private completed?;
60
73
  private inFlight?;
61
74
  /** Per-account probe results, keyed by `profileCacheKey` (spec 2026-07-29-agent-profiles).
62
75
  * Separate from `completed` because a second Claude login is a different answer to the same
63
- * question, and sharing one slot would let whichever probe ran last speak for both. */
76
+ * question, and sharing one slot would let whichever probe ran last speak for both. Each
77
+ * entry carries the generation of the probe that wrote it, so an older probe landing after a
78
+ * newer verification cannot overwrite the correction — the fence `completed` gets from
79
+ * `startFreshProbe`/`rememberProbedRow`, on this cache's own key. */
64
80
  private readonly completedProfiles;
65
81
  private readonly inFlightProfiles;
66
82
  constructor(options?: {
@@ -68,6 +84,7 @@ export declare class ProviderAuthService {
68
84
  now?: () => number;
69
85
  platform?: NodeJS.Platform;
70
86
  createAuthFailureId?: () => string;
87
+ scheduleRuntimeRetry?: (fn: () => void, delayMs: number) => () => void;
71
88
  });
72
89
  /**
73
90
  * Every provider's authentication state — STALE-WHILE-REVALIDATE, the same policy the health
@@ -90,6 +107,87 @@ export declare class ProviderAuthService {
90
107
  /** Clear only the incident the caller actually observed. A stale retry must
91
108
  * never erase a rejection that arrived after the user began recovery. */
92
109
  clearRuntimeAuthFailure(provider: ProviderId, authFailureId: string): boolean;
110
+ /**
111
+ * Ask the provider's OWN CLI whether a runtime rejection was real, and drop the incident when it
112
+ * was not. Resolves to the recovered row when it cleared one, `null` otherwise.
113
+ *
114
+ * `profile` aims the self-check at the account the failing step actually ran under (spec
115
+ * 2026-07-29-agent-profiles). Probing the bare default instead would answer a question nobody
116
+ * asked: a named account can be rejected while the default login is fine, and clearing the latch
117
+ * on the default's answer lets every future run on the broken account fail again. A named
118
+ * verification writes the per-account cache and stamps its row `profileId`; the default
119
+ * verification keeps folding into the whole-response cache exactly as before. The CALLER decides
120
+ * what to do when the recorded account cannot be resolved — for the runtime watcher that is
121
+ * "keep the latch" (an unverifiable incident is not a recovered one).
122
+ *
123
+ * A latch is raised by matching a runner's error text against
124
+ * {@link isRuntimeProviderAuthFailure} — a heuristic over vendor prose — and it then outranks every
125
+ * probe (`withRuntimeFailures`). Before this existed, `clearRuntimeAuthFailure` had exactly one
126
+ * caller, `POST /providers/:provider/retry`, so the only way out of a latch was a human opening
127
+ * Settings and pressing "Try again". That button clears the incident and re-probes, and it works,
128
+ * which is the whole diagnosis: the credentials were still there. A transient 401 and a false
129
+ * positive of the text match were both indistinguishable from a real logout, and both parked the
130
+ * cockpit until someone clicked.
131
+ *
132
+ * So the latch stays authoritative — it is raised instantly, and `provider-action-gate` keeps
133
+ * refusing to start runs against it — but it no longer stands unexamined. This is deliberately the
134
+ * same two steps the retry route performs, minus the human: probe, then clear.
135
+ *
136
+ * What it will NOT do:
137
+ * - clear an incident it did not observe. The id is captured before the probe and handed to
138
+ * `clearRuntimeAuthFailure`, so a rejection that arrives mid-probe survives the answer to an
139
+ * older question.
140
+ * - clear on anything but `connected`. `disconnected`, `not-installed` and `unknown` all leave the
141
+ * latch alone; an inconclusive probe is not evidence of health.
142
+ * - spawn more than one probe per provider per {@link RUNTIME_AUTH_VERIFY_COOLDOWN_MS}. A
143
+ * verification skipped by that cooldown returns `null`, leaves the latch standing, and arms ONE
144
+ * deferred re-verification at cooldown expiry
145
+ * ({@link ProviderAuthService.scheduleRuntimeVerification}) — the runtime watcher fires only on
146
+ * the latch edge, so without it a re-latch inside the window could never be re-checked.
147
+ *
148
+ * `observed` names the incident generation the CALLER saw when it decided to check. The runtime
149
+ * watcher resolves the failing account asynchronously before calling this, and a newer failure
150
+ * can replace the incident during that wait — a check for the older question then stands down
151
+ * at the door (no probe) instead of answering the newer one with the older aim.
152
+ */
153
+ verifyRuntimeAuthFailure(provider: ProviderId, profile?: {
154
+ id: string;
155
+ configDir: string | null;
156
+ }, observed?: {
157
+ generation: number;
158
+ }): Promise<ProviderStatus | null>;
159
+ /**
160
+ * A verification declined by the cooldown must not become a dead end. The runtime watcher fires
161
+ * only on the latch edge — a rejection that re-latches right after a successful check gets its
162
+ * check declined here, and nothing would ever re-ask the CLI: later error lines see a latch that
163
+ * already stands, and only Settings' Try again could clear it. So the declined request arms ONE
164
+ * deferred re-verification at cooldown expiry; later declined requests re-arm it (never stack
165
+ * it), the newest aim and generation winning. The retry is bound to the incident it was
166
+ * scheduled against: a newer failure that arrived meanwhile (a non-transition line the watcher
167
+ * skips) stands when it fires, because the queued aim may no longer be the account that failed
168
+ * and its answer must not clear what it was never asked about. Firing after the latch is gone
169
+ * is equally a no-op — {@link ProviderAuthService.verifyRuntimeAuthFailure} returns before
170
+ * probing — so the chain ends the moment the incident is answered.
171
+ */
172
+ private scheduleRuntimeVerification;
173
+ /**
174
+ * Fold ONE freshly probed row into the cached response.
175
+ *
176
+ * Without this, dropping a latch would uncover whatever the last full probe happened to say about
177
+ * that provider — which can be older than the answer we just got, and on a cold-ish cache can be
178
+ * `unknown`. Clearing an incident only to reveal a stale contradiction would trade a red banner for
179
+ * a grey one. The cache TIMESTAMP is deliberately untouched: this corrects one row, it is not a
180
+ * full probe, and it must not extend the whole response's lifetime.
181
+ *
182
+ * The row also carries a FRESH generation, and a generation alone is not enough when the cache is
183
+ * cold: a full probe already in flight would land afterwards and, being a complete response, would
184
+ * replace the correction with rows gathered before the recovery was known (or discard it outright
185
+ * when `completed` is still unset). So when nothing is cached yet, the merge waits for the
186
+ * in-flight probe to land and folds over ITS answer — still generation-stamped, so a probe that
187
+ * started even later wins on its own merits.
188
+ */
189
+ private rememberProbedRow;
190
+ private mergeProbedRow;
93
191
  /**
94
192
  * The command that logs `provider` in, as a copyable one-liner.
95
193
  *
@@ -47,6 +47,18 @@ const COMMAND_TIMEOUT_MS = 10_000;
47
47
  */
48
48
  const CONNECTED_TTL_MS = 10 * 60_000;
49
49
  const UNSETTLED_TTL_MS = 60_000;
50
+ /**
51
+ * How long before the same provider may be self-checked again after a runtime rejection
52
+ * (`verifyRuntimeAuthFailure`).
53
+ *
54
+ * A latch is raised from a PATTERN MATCH on a runner's error text, and a single failing run can emit
55
+ * several auth-shaped lines in a row. Without a floor, each line that re-latches after a successful
56
+ * self-check would buy its own CLI spawn. One self-check a minute is plenty for the case this exists
57
+ * for — a rejection that was transient against credentials that are still valid — and it bounds the
58
+ * pathological case (a CLI that reports logged in while the vendor keeps rejecting the token) to one
59
+ * probe per minute instead of one per error line.
60
+ */
61
+ const RUNTIME_AUTH_VERIFY_COOLDOWN_MS = 60_000;
50
62
  /** The lifetime for a set of rows: minutes only when EVERY row is connected. A mixed answer takes
51
63
  * the short window, because the not-connected row in it is the one that might self-heal.
52
64
  *
@@ -274,19 +286,38 @@ function descriptorFor(provider) {
274
286
  throw new Error(`Unknown provider: ${provider}`);
275
287
  return descriptor;
276
288
  }
289
+ /** One deferred re-verification when the cooldown declines a check. Detached and unref'd by
290
+ * default; tests capture the retry instead of waiting out the window. */
291
+ function defaultScheduleRuntimeRetry(fn, delayMs) {
292
+ const timer = setTimeout(fn, delayMs);
293
+ timer.unref();
294
+ return () => clearTimeout(timer);
295
+ }
277
296
  export class ProviderAuthService {
278
297
  runCommand;
279
298
  now;
280
299
  platform;
281
300
  createAuthFailureId;
301
+ scheduleRuntimeRetry;
282
302
  runtimeFailures = new Map();
303
+ /** One self-check at a time per provider, and not more often than the cooldown. Both guard the
304
+ * same thing — a CLI spawn per auth-shaped error line — from the two directions it can arrive
305
+ * from: concurrently, and in quick succession. */
306
+ verifyingRuntimeFailures = new Set();
307
+ lastRuntimeVerification = new Map();
308
+ /** One pending cooldown-expiry re-check per provider, cancellable. See
309
+ * {@link ProviderAuthService.scheduleRuntimeVerification}. */
310
+ deferredRuntimeVerifications = new Map();
283
311
  nextRuntimeFailureGeneration = 0;
284
312
  nextProbeGeneration = 0;
285
313
  completed;
286
314
  inFlight;
287
315
  /** Per-account probe results, keyed by `profileCacheKey` (spec 2026-07-29-agent-profiles).
288
316
  * Separate from `completed` because a second Claude login is a different answer to the same
289
- * question, and sharing one slot would let whichever probe ran last speak for both. */
317
+ * question, and sharing one slot would let whichever probe ran last speak for both. Each
318
+ * entry carries the generation of the probe that wrote it, so an older probe landing after a
319
+ * newer verification cannot overwrite the correction — the fence `completed` gets from
320
+ * `startFreshProbe`/`rememberProbedRow`, on this cache's own key. */
290
321
  completedProfiles = new Map();
291
322
  inFlightProfiles = new Map();
292
323
  constructor(options) {
@@ -294,6 +325,7 @@ export class ProviderAuthService {
294
325
  this.now = options?.now ?? Date.now;
295
326
  this.platform = options?.platform ?? process.platform;
296
327
  this.createAuthFailureId = options?.createAuthFailureId ?? randomUUID;
328
+ this.scheduleRuntimeRetry = options?.scheduleRuntimeRetry ?? defaultScheduleRuntimeRetry;
297
329
  }
298
330
  /**
299
331
  * Every provider's authentication state — STALE-WHILE-REVALIDATE, the same policy the health
@@ -349,6 +381,7 @@ export class ProviderAuthService {
349
381
  hint: RUNTIME_AUTH_HINT,
350
382
  authFailureId: failure.authFailureId,
351
383
  },
384
+ generation: failure.generation,
352
385
  transitioned: current === undefined,
353
386
  };
354
387
  }
@@ -361,6 +394,167 @@ export class ProviderAuthService {
361
394
  this.runtimeFailures.delete(provider);
362
395
  return true;
363
396
  }
397
+ /**
398
+ * Ask the provider's OWN CLI whether a runtime rejection was real, and drop the incident when it
399
+ * was not. Resolves to the recovered row when it cleared one, `null` otherwise.
400
+ *
401
+ * `profile` aims the self-check at the account the failing step actually ran under (spec
402
+ * 2026-07-29-agent-profiles). Probing the bare default instead would answer a question nobody
403
+ * asked: a named account can be rejected while the default login is fine, and clearing the latch
404
+ * on the default's answer lets every future run on the broken account fail again. A named
405
+ * verification writes the per-account cache and stamps its row `profileId`; the default
406
+ * verification keeps folding into the whole-response cache exactly as before. The CALLER decides
407
+ * what to do when the recorded account cannot be resolved — for the runtime watcher that is
408
+ * "keep the latch" (an unverifiable incident is not a recovered one).
409
+ *
410
+ * A latch is raised by matching a runner's error text against
411
+ * {@link isRuntimeProviderAuthFailure} — a heuristic over vendor prose — and it then outranks every
412
+ * probe (`withRuntimeFailures`). Before this existed, `clearRuntimeAuthFailure` had exactly one
413
+ * caller, `POST /providers/:provider/retry`, so the only way out of a latch was a human opening
414
+ * Settings and pressing "Try again". That button clears the incident and re-probes, and it works,
415
+ * which is the whole diagnosis: the credentials were still there. A transient 401 and a false
416
+ * positive of the text match were both indistinguishable from a real logout, and both parked the
417
+ * cockpit until someone clicked.
418
+ *
419
+ * So the latch stays authoritative — it is raised instantly, and `provider-action-gate` keeps
420
+ * refusing to start runs against it — but it no longer stands unexamined. This is deliberately the
421
+ * same two steps the retry route performs, minus the human: probe, then clear.
422
+ *
423
+ * What it will NOT do:
424
+ * - clear an incident it did not observe. The id is captured before the probe and handed to
425
+ * `clearRuntimeAuthFailure`, so a rejection that arrives mid-probe survives the answer to an
426
+ * older question.
427
+ * - clear on anything but `connected`. `disconnected`, `not-installed` and `unknown` all leave the
428
+ * latch alone; an inconclusive probe is not evidence of health.
429
+ * - spawn more than one probe per provider per {@link RUNTIME_AUTH_VERIFY_COOLDOWN_MS}. A
430
+ * verification skipped by that cooldown returns `null`, leaves the latch standing, and arms ONE
431
+ * deferred re-verification at cooldown expiry
432
+ * ({@link ProviderAuthService.scheduleRuntimeVerification}) — the runtime watcher fires only on
433
+ * the latch edge, so without it a re-latch inside the window could never be re-checked.
434
+ *
435
+ * `observed` names the incident generation the CALLER saw when it decided to check. The runtime
436
+ * watcher resolves the failing account asynchronously before calling this, and a newer failure
437
+ * can replace the incident during that wait — a check for the older question then stands down
438
+ * at the door (no probe) instead of answering the newer one with the older aim.
439
+ */
440
+ async verifyRuntimeAuthFailure(provider, profile, observed) {
441
+ if (process.env.CEZ_DRY_RUN === '1' || providerAuthChecksDisabled())
442
+ return null;
443
+ const failure = this.runtimeFailures.get(provider);
444
+ if (!failure)
445
+ return null;
446
+ const expectedGeneration = observed?.generation ?? failure.generation;
447
+ if (failure.generation !== expectedGeneration)
448
+ return null;
449
+ if (this.verifyingRuntimeFailures.has(provider))
450
+ return null;
451
+ const lastVerifiedAt = this.lastRuntimeVerification.get(provider);
452
+ if (lastVerifiedAt !== undefined && this.now() - lastVerifiedAt < RUNTIME_AUTH_VERIFY_COOLDOWN_MS) {
453
+ this.scheduleRuntimeVerification(provider, profile, RUNTIME_AUTH_VERIFY_COOLDOWN_MS - (this.now() - lastVerifiedAt), expectedGeneration);
454
+ return null;
455
+ }
456
+ this.verifyingRuntimeFailures.add(provider);
457
+ let probed;
458
+ try {
459
+ this.lastRuntimeVerification.set(provider, this.now());
460
+ probed = await this.probe(descriptorFor(provider), profile?.configDir);
461
+ }
462
+ finally {
463
+ this.verifyingRuntimeFailures.delete(provider);
464
+ }
465
+ if (probed.status !== 'connected')
466
+ return null;
467
+ // Fence the clear against the captured GENERATION, not just the id: while the latch stands a
468
+ // new failure report keeps the same `authFailureId`, so an id comparison alone would let this
469
+ // answer — gathered for the incident as it was — clear a newer failure reported mid-probe,
470
+ // one the latch-edge watcher will never re-check. Generations are unique per report.
471
+ const current = this.runtimeFailures.get(provider);
472
+ if (!current || current.generation !== expectedGeneration)
473
+ return null;
474
+ if (!this.clearRuntimeAuthFailure(provider, failure.authFailureId))
475
+ return null;
476
+ if (profile) {
477
+ // Per-account knowledge goes to the per-account cache. Folding it into the whole-response
478
+ // cache would let a named account's answer speak for the default row for the TTL that
479
+ // follows — the same sharing bug the `(provider, profileId)` key was introduced to prevent.
480
+ // The FRESH generation fences the write against an older per-account probe that is still in
481
+ // flight and lands afterwards.
482
+ const stamped = { ...probed, profileId: profile.id };
483
+ this.completedProfiles.set(profileCacheKey(provider, profile.id), {
484
+ status: stamped,
485
+ timestamp: this.now(),
486
+ generation: ++this.nextProbeGeneration,
487
+ });
488
+ return stamped;
489
+ }
490
+ this.rememberProbedRow(probed);
491
+ return probed;
492
+ }
493
+ /**
494
+ * A verification declined by the cooldown must not become a dead end. The runtime watcher fires
495
+ * only on the latch edge — a rejection that re-latches right after a successful check gets its
496
+ * check declined here, and nothing would ever re-ask the CLI: later error lines see a latch that
497
+ * already stands, and only Settings' Try again could clear it. So the declined request arms ONE
498
+ * deferred re-verification at cooldown expiry; later declined requests re-arm it (never stack
499
+ * it), the newest aim and generation winning. The retry is bound to the incident it was
500
+ * scheduled against: a newer failure that arrived meanwhile (a non-transition line the watcher
501
+ * skips) stands when it fires, because the queued aim may no longer be the account that failed
502
+ * and its answer must not clear what it was never asked about. Firing after the latch is gone
503
+ * is equally a no-op — {@link ProviderAuthService.verifyRuntimeAuthFailure} returns before
504
+ * probing — so the chain ends the moment the incident is answered.
505
+ */
506
+ scheduleRuntimeVerification(provider, profile, delayMs, generation) {
507
+ this.deferredRuntimeVerifications.get(provider)?.();
508
+ const cancel = this.scheduleRuntimeRetry(() => {
509
+ this.deferredRuntimeVerifications.delete(provider);
510
+ void this.verifyRuntimeAuthFailure(provider, profile, { generation }).catch(() => { });
511
+ }, Math.max(delayMs, 0));
512
+ this.deferredRuntimeVerifications.set(provider, cancel);
513
+ }
514
+ /**
515
+ * Fold ONE freshly probed row into the cached response.
516
+ *
517
+ * Without this, dropping a latch would uncover whatever the last full probe happened to say about
518
+ * that provider — which can be older than the answer we just got, and on a cold-ish cache can be
519
+ * `unknown`. Clearing an incident only to reveal a stale contradiction would trade a red banner for
520
+ * a grey one. The cache TIMESTAMP is deliberately untouched: this corrects one row, it is not a
521
+ * full probe, and it must not extend the whole response's lifetime.
522
+ *
523
+ * The row also carries a FRESH generation, and a generation alone is not enough when the cache is
524
+ * cold: a full probe already in flight would land afterwards and, being a complete response, would
525
+ * replace the correction with rows gathered before the recovery was known (or discard it outright
526
+ * when `completed` is still unset). So when nothing is cached yet, the merge waits for the
527
+ * in-flight probe to land and folds over ITS answer — still generation-stamped, so a probe that
528
+ * started even later wins on its own merits.
529
+ */
530
+ rememberProbedRow(status) {
531
+ const generation = ++this.nextProbeGeneration;
532
+ if (this.completed) {
533
+ this.mergeProbedRow(status, generation);
534
+ return;
535
+ }
536
+ const inFlight = this.inFlight;
537
+ if (!inFlight)
538
+ return;
539
+ void inFlight.raw.catch(() => { }).then(() => {
540
+ // A newer full probe landing first (its generation outranks ours) makes this a no-op: its
541
+ // rows are the fresher answer and must not be patched by an older correction.
542
+ if (!this.completed || this.completed.generation >= generation)
543
+ return;
544
+ this.mergeProbedRow(status, generation);
545
+ });
546
+ }
547
+ mergeProbedRow(status, generation) {
548
+ if (!this.completed)
549
+ return;
550
+ this.completed = {
551
+ ...this.completed,
552
+ generation,
553
+ response: {
554
+ providers: this.completed.response.providers.map((row) => (row.provider === status.provider ? status : row)),
555
+ },
556
+ };
557
+ }
364
558
  /**
365
559
  * The command that logs `provider` in, as a copyable one-liner.
366
560
  *
@@ -444,10 +638,17 @@ export class ProviderAuthService {
444
638
  const pending = this.inFlightProfiles.get(key);
445
639
  if (pending)
446
640
  return pending;
641
+ const generation = ++this.nextProbeGeneration;
447
642
  const probe = this.probe(descriptorFor(provider), profile.configDir)
448
643
  .then((status) => {
449
644
  const stamped = { ...status, profileId: profile.id };
450
- this.completedProfiles.set(key, { status: stamped, timestamp: this.now() });
645
+ const current = this.completedProfiles.get(key);
646
+ // A verification (or newer probe) that wrote while this probe was in flight keeps its
647
+ // place: an older answer must not overwrite a fresher row, the same fence the default
648
+ // cache's generation guard provides. The caller still gets this probe's own answer.
649
+ if (current === undefined || generation >= current.generation) {
650
+ this.completedProfiles.set(key, { status: stamped, timestamp: this.now(), generation });
651
+ }
451
652
  return stamped;
452
653
  })
453
654
  .finally(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"provider-auth.js","sourceRoot":"","sources":["../../src/core/provider-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,CAAU,CAAC;AA0CrF;;;;;;;GAOG;AACH,MAAM,UAAU,0BAA0B,CACxC,GAAG,GAAsB,OAAO,CAAC,GAAG;IAEpC,OAAO,GAAG,CAAC,uBAAuB,CAAC,KAAK,GAAG,CAAC;AAC9C,CAAC;AAWD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,gBAAgB,GAAG,EAAE,GAAG,MAAM,CAAC;AACrC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEhC;;;;;;oDAMoD;AACpD,SAAS,WAAW,CAAC,IAA+B;IAClD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC;AAC/F,CAAC;AACD,MAAM,YAAY,GAAG,kDAAkD,CAAC;AACxE,MAAM,YAAY,GAAG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B,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;QAC5E,CAAC;QACD,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,MAAM,KAAK,IAAI;YAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC;QAChE,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;IAC5E,CAAC;CACF"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Synchronous, dependency-free proof that a crashed worker generation's processes are gone
3
+ * (#469, spec 2026-09-26-worker-orphan-finalization). Sync so `continueRun` stays sync.
4
+ * Every uncertainty answers "alive" or "unknown", never "gone".
5
+ */
6
+ export type RecordedProcess = {
7
+ pid: number;
8
+ startToken?: string;
9
+ };
10
+ export type WorkerProcessRecord = {
11
+ generation: string;
12
+ controller: RecordedProcess;
13
+ processes: RecordedProcess[];
14
+ };
15
+ export type GenerationLiveness = 'gone' | 'alive' | 'unknown';
16
+ /** `/proc/<pid>/stat` field 22 (`starttime`); `comm` may hold spaces and `)`, so parse after the LAST `)`. */
17
+ export declare function parseProcStat(stat: string): {
18
+ state: string;
19
+ startToken: string;
20
+ } | undefined;
21
+ /** One process incarnation, so a reused PID never matches. Absent when the platform cannot say. */
22
+ export declare function processStartToken(pid: number, platform?: NodeJS.Platform): string | undefined;
23
+ /** Live and the same incarnation. A token-less entry (or an unreadable current token) counts while the PID exists. */
24
+ export declare function recordedProcessLive(entry: RecordedProcess): boolean;
25
+ export declare function isCurrentProcess(entry: RecordedProcess): boolean;
26
+ /** The `/proc` reads the Linux scan makes; injectable because EACCES cannot be staged for real. */
27
+ export type ProcReader = {
28
+ readdir: () => string[];
29
+ readlink: (pid: string) => string;
30
+ ownerUid: (pid: string) => number | undefined;
31
+ startedAtMs: (pid: string) => number | undefined;
32
+ };
33
+ /** The darwin scan: `lsof` for working directories, `ps` for our own user's processes. */
34
+ export type DarwinReader = {
35
+ lsof: () => {
36
+ ok: boolean;
37
+ stdout: string;
38
+ };
39
+ ownProcesses: () => Array<{
40
+ pid: number;
41
+ startedAtMs?: number;
42
+ }> | undefined;
43
+ };
44
+ /** PIDs (never this process) whose working directory is one of `dirs` or beneath it, in one scan
45
+ * pass; `unknown` when no scan can run. cezar's own short-lived git children in a worktree make
46
+ * this read "alive" briefly: conservative, and a retry self-heals. `since` (epoch ms) is the
47
+ * earliest moment the generation's processes can have started; see the EACCES rule below. */
48
+ export declare function processesWithCwdUnder(dirs: string | readonly string[], platform?: NodeJS.Platform, proc?: ProcReader, since?: number, darwin?: DarwinReader): number[] | 'unknown';
49
+ export type GenerationProbe = {
50
+ liveness: GenerationLiveness;
51
+ controller?: number;
52
+ pids: number[];
53
+ };
54
+ /** A missing record (legacy) relies on the working-directory scan alone. `paths` are the
55
+ * worktree and every scratch location, which finalization deletes. A live foreign controller
56
+ * short-circuits the scan; otherwise `pids` names every live recorded or scanned process. */
57
+ export declare function inspectGeneration({ record, paths, since }: {
58
+ record?: WorkerProcessRecord;
59
+ paths: readonly string[];
60
+ since?: number;
61
+ }): GenerationProbe;
62
+ export declare function probeGeneration(input: {
63
+ record?: WorkerProcessRecord;
64
+ paths: readonly string[];
65
+ since?: number;
66
+ }): GenerationLiveness;