@cotal-ai/core 0.13.1 → 0.13.2

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.
@@ -256,10 +256,26 @@ export declare class CotalEndpoint extends EventEmitter {
256
256
  /** How soon a FAILED creds refresh retries. Successful refreshes schedule by lifetime fraction
257
257
  * (75% of iat→exp), not a fixed margin — standing creds span hours to days, bearers minutes. */
258
258
  private static readonly CREDS_RETRY_MS;
259
+ /** The disposable-preflight connect bound for the EXPLICIT reload proof (D5 class-2 adoption). A
260
+ * rogue or unreachable candidate must resolve well UNDER the manager's delivery-admin request
261
+ * bound, so this stays a few seconds and never blocks the responder. */
262
+ private static readonly PREFLIGHT_MS;
263
+ /** How long the resident wire swap is deferred past the reply on the EXPLICIT reload path. The
264
+ * delivery-admin responder rides THIS connection, so `nc.reconnect()` must not run until the
265
+ * reply has flushed on the still-live old cred; the old cred stays valid until its exp, so a short
266
+ * deferral is safe. */
267
+ private static readonly RESIDENT_SWAP_DEFER_MS;
268
+ /** The daemon-side deadline for the WHOLE prove-then-adopt transaction (source fetch + preflight +
269
+ * commit), kept strictly BELOW the manager's delivery-admin request bound so a slow or hung hosted
270
+ * store returns a structured component failure rather than an ambiguous client timeout, and a late
271
+ * fetch can never commit after the caller gave up. */
272
+ private static readonly RELOAD_DEADLINE_MS;
259
273
  /** Fetch fresh creds from the source, pin their identity to ours, cache them, and arm the next
260
274
  * refresh at 75% of the new JWT's lifetime. THROWS on fetch/pin failure — the callers decide the
261
275
  * failure posture (loud-and-retry for the timer, a structured error reply for an explicit
262
- * {@link reloadCreds}). */
276
+ * {@link reloadCreds}). This is the PASSIVE-BACKSTOP fetch; the explicit auditable path
277
+ * ({@link reloadCreds}) does its own fetch so it can preflight the candidate on a disposable
278
+ * connection BEFORE mutating this live cache. */
263
279
  private fetchFreshCreds;
264
280
  /** Swap the live connection onto the freshest cached cred with a controlled `nc.reconnect()`
265
281
  * (nats.js re-evaluates the creds getter per attempt). Swapping now, instead of waiting for the
@@ -269,20 +285,64 @@ export declare class CotalEndpoint extends EventEmitter {
269
285
  * supervise loop's to own (its rebuild re-fetches); an already-disconnected client is a no-op
270
286
  * (its own reconnect loop presents the fresh cred). */
271
287
  private swapConnectionOntoFreshCreds;
272
- /** The 75%-of-lifetime renewal timer tick (and rebuild re-fetch) the passive BACKSTOP behind the
273
- * explicit {@link reloadCreds}. Failure shape mirrors {@link refreshBearer}: THROWS when
274
- * `initial`, else emits "error" and retries. */
288
+ /** The connectAndBind PRE-CONNECT fetch: pull the freshest source cred and pin it into
289
+ * {@link currentCreds} so the connect() that immediately follows presents it — that connect IS the
290
+ * proof, so NO preflight and NO live swap here. THROWS when `initial` (no cred to start from), else
291
+ * emits and retries. The LIVE-SWAP paths — the 75% timer {@link renewCredsOnTimer} and the explicit
292
+ * {@link reloadCreds} — preflight the candidate on a disposable connection instead, so they never
293
+ * reconnect the live connection onto an unproven cred. */
275
294
  private refreshCreds;
295
+ /** Serializes every prove-then-adopt transaction (the 75% timer and the explicit reload) so a timer
296
+ * tick and an explicit reload can never interleave their fetch/preflight/commit — the design's
297
+ * single-flight requirement. Runs `fn` after any in-flight transaction settles, whatever its
298
+ * outcome; the internal chain never rejects. */
299
+ private credsTxn;
300
+ private runCredsTxn;
301
+ /** Race `p` against a `ms` deadline so a slow/hung SecretStore fetch (or preflight) cannot exceed
302
+ * the daemon transaction bound. The underlying promise is not cancellable, so callers also FENCE a
303
+ * late commit by re-checking the deadline before mutating {@link currentCreds}. */
304
+ private static withDeadline;
305
+ /** The one PROVE-then-adopt transaction shared by the 75% timer and the explicit reload (run under
306
+ * {@link runCredsTxn}). Fetch (deadline-bounded) → identity-pin → optional `expected` fingerprint →
307
+ * PREFLIGHT the candidate on a disposable connection → fence a late commit against the deadline →
308
+ * commit {@link currentCreds} → arm the next 75% timer. Because currentCreds is written ONLY after
309
+ * the preflight proves broker acceptance, the resident authenticator getter can never present an
310
+ * unproven cred (not even on an incidental reconnect), and a rejected candidate leaves the resident
311
+ * connection untouched on BOTH the timer and explicit paths. THROWS (structured) on any failure. */
312
+ private adoptFreshCreds;
313
+ /** The 75%-of-lifetime renewal timer tick: prove + adopt + swap the LIVE connection. Preflights (it
314
+ * reconnects a live connection, so the candidate must be broker-proven first) and is serialized
315
+ * with the explicit reload. Never throws — a failed renewal logs and retries while the old cred
316
+ * stays live until its expiry. */
317
+ private renewCredsOnTimer;
276
318
  /** EXPLICIT credential reload — the auditable adoption step of D5 class-2 standing renewal (served
277
- * to the renewal owner via the delivery-admin rail). Re-invokes the source NOW, pins + adopts the
278
- * fresh cred on the live connection, and returns the adopted JWT's window so the caller can record
279
- * proof of adoption. THROWS (structured for the reply) when the source fails e.g. the creds file
280
- * was not actually re-signed so "file written" can never masquerade as "daemon adopted". */
281
- reloadCreds(): Promise<{
319
+ * to the renewal owner via the delivery-admin rail). The PROOF-OF-RECORD is a DISPOSABLE PREFLIGHT
320
+ * connection that presents exactly the candidate: it succeeds only when the BROKER accepts this
321
+ * re-signed generation, and it runs BEFORE the live cache is touched. So a cred the broker refuses
322
+ * throws HERE (structured), the resident connection and the delivery-admin rail this very reply
323
+ * rides — is never disturbed, and "file re-signed" can never masquerade as "daemon adopted".
324
+ * `expected` is the renewal owner's generation token (SHA-256 of the JWT it re-signed): a re-read
325
+ * that does not match is rejected before the preflight even runs. On success the candidate becomes
326
+ * the resident connection's next-presented cred; the wire swap is NOT forced here — the caller
327
+ * ({@link handleDeliveryAdmin}) schedules it AFTER the aggregate reply, because the responder rides
328
+ * this connection and reconnecting before the reply flushes would strand it (see
329
+ * adoption-false-green.smoke.ts). Returns the BROKER-ACCEPTED generation's window (identity/iat/exp):
330
+ * the resident wire swap is best-effort and self-healing (the 75% timer + the broker's expiry-close),
331
+ * NOT witnessed, so the caller must claim broker acceptance, not verified resident reauth. NEVER a
332
+ * fingerprint. */
333
+ reloadCreds(expected?: string): Promise<{
282
334
  identity: string;
283
335
  iat?: number;
284
336
  exp?: number;
285
337
  }>;
338
+ /** Arm the resident wire swap for the delivery-admin `reloadCreds` path. Called by
339
+ * {@link handleDeliveryAdmin} ONLY after BOTH component proofs have settled and immediately before
340
+ * the reply is returned+responded — never from inside {@link reloadCreds} while the aggregate is
341
+ * still open, or a slow co-component proof would let `nc.reconnect()` reconnect the admin rail
342
+ * before the reply flushes and silently strand it. The short deferral lets the reply flush on the
343
+ * still-live old cred first. Best-effort — the proof was the preflight; a transient swap failure is
344
+ * retried by the 75% timer and the broker's own expiry-close, both presenting the adopted candidate. */
345
+ private scheduleResidentSwap;
286
346
  private armCredsRefresh;
287
347
  /** Open the connection and bind everything that hangs off it: status watch, presence
288
348
  * watch + heartbeat, channel registry, and the durable consumers. Re-runnable — a
@@ -697,7 +757,7 @@ export declare class CotalEndpoint extends EventEmitter {
697
757
  * {@link armPlane3} on EVERY (re)connect — a reconnect drains the old connection, so re-binding both
698
758
  * is required, not optional (the responder would otherwise be lost on a broker blip). */
699
759
  startPlane3(aclFor: (owner: string, lifecycleUid: string) => MaybePromise<string[] | undefined>, opts?: {
700
- reloadMembershipCreds?: () => Promise<unknown>;
760
+ reloadMembershipCreds?: (expected?: string) => Promise<unknown>;
701
761
  evictPrincipal?: (principal: string) => Promise<unknown>;
702
762
  planeConnLiveness?: (query: unknown) => Promise<unknown>;
703
763
  }): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"endpoint.d.ts","sourceRoot":"","sources":["../src/endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAkC3C,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EAEb,YAAY,EACZ,cAAc,EACd,kBAAkB,EAElB,WAAW,EAEX,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,aAAa,EACb,WAAW,EACX,YAAY,EACZ,aAAa,EAIb,kBAAkB,EAEnB,MAAM,YAAY,CAAC;AAYpB,OAAO,EAAwB,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,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package/dist/endpoint.js CHANGED
@@ -2,7 +2,7 @@ import { EventEmitter } from "node:events";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { createConnection } from "node:net";
4
4
  import { connect, credsAuthenticator, headers, tokenAuthenticator, nanos, AuthorizationError, PermissionViolationError, UserAuthenticationExpiredError, NoRespondersError, RequestError, } from "@nats-io/transport-node";
5
- import { credsClaims, idFromCreds } from "./identity.js";
5
+ import { credsClaims, credsFingerprint, credsRenewalDelayMs, idFromCreds } from "./identity.js";
6
6
  import { inspectCredHealth } from "./provision.js";
7
7
  import { assertValidName } from "./resolve.js";
8
8
  import { createSpaceStreams, dmDurableConfig, dlvDurableConfig, taskDurableConfig, fanoutDurableConfig, inboxReaderConfig, MAX_MSGS_PER_SUBJECT, MANAGER_LEASE_TTL_MS } from "./streams.js";
@@ -331,10 +331,26 @@ export class CotalEndpoint extends EventEmitter {
331
331
  /** How soon a FAILED creds refresh retries. Successful refreshes schedule by lifetime fraction
332
332
  * (75% of iat→exp), not a fixed margin — standing creds span hours to days, bearers minutes. */
333
333
  static CREDS_RETRY_MS = 60_000;
334
+ /** The disposable-preflight connect bound for the EXPLICIT reload proof (D5 class-2 adoption). A
335
+ * rogue or unreachable candidate must resolve well UNDER the manager's delivery-admin request
336
+ * bound, so this stays a few seconds and never blocks the responder. */
337
+ static PREFLIGHT_MS = 4_000;
338
+ /** How long the resident wire swap is deferred past the reply on the EXPLICIT reload path. The
339
+ * delivery-admin responder rides THIS connection, so `nc.reconnect()` must not run until the
340
+ * reply has flushed on the still-live old cred; the old cred stays valid until its exp, so a short
341
+ * deferral is safe. */
342
+ static RESIDENT_SWAP_DEFER_MS = 250;
343
+ /** The daemon-side deadline for the WHOLE prove-then-adopt transaction (source fetch + preflight +
344
+ * commit), kept strictly BELOW the manager's delivery-admin request bound so a slow or hung hosted
345
+ * store returns a structured component failure rather than an ambiguous client timeout, and a late
346
+ * fetch can never commit after the caller gave up. */
347
+ static RELOAD_DEADLINE_MS = 12_000;
334
348
  /** Fetch fresh creds from the source, pin their identity to ours, cache them, and arm the next
335
349
  * refresh at 75% of the new JWT's lifetime. THROWS on fetch/pin failure — the callers decide the
336
350
  * failure posture (loud-and-retry for the timer, a structured error reply for an explicit
337
- * {@link reloadCreds}). */
351
+ * {@link reloadCreds}). This is the PASSIVE-BACKSTOP fetch; the explicit auditable path
352
+ * ({@link reloadCreds}) does its own fetch so it can preflight the candidate on a disposable
353
+ * connection BEFORE mutating this live cache. */
338
354
  async fetchFreshCreds() {
339
355
  const creds = await this.credsSource();
340
356
  const id = idFromCreds(creds);
@@ -356,14 +372,15 @@ export class CotalEndpoint extends EventEmitter {
356
372
  if (this.nc && !this.stopped)
357
373
  await this.nc.reconnect().catch(() => { });
358
374
  }
359
- /** The 75%-of-lifetime renewal timer tick (and rebuild re-fetch) the passive BACKSTOP behind the
360
- * explicit {@link reloadCreds}. Failure shape mirrors {@link refreshBearer}: THROWS when
361
- * `initial`, else emits "error" and retries. */
375
+ /** The connectAndBind PRE-CONNECT fetch: pull the freshest source cred and pin it into
376
+ * {@link currentCreds} so the connect() that immediately follows presents it — that connect IS the
377
+ * proof, so NO preflight and NO live swap here. THROWS when `initial` (no cred to start from), else
378
+ * emits and retries. The LIVE-SWAP paths — the 75% timer {@link renewCredsOnTimer} and the explicit
379
+ * {@link reloadCreds} — preflight the candidate on a disposable connection instead, so they never
380
+ * reconnect the live connection onto an unproven cred. */
362
381
  async refreshCreds(initial = false) {
363
382
  try {
364
383
  await this.fetchFreshCreds();
365
- if (!initial)
366
- await this.swapConnectionOntoFreshCreds();
367
384
  }
368
385
  catch (e) {
369
386
  if (initial)
@@ -372,25 +389,133 @@ export class CotalEndpoint extends EventEmitter {
372
389
  this.armCredsRefresh(CotalEndpoint.CREDS_RETRY_MS);
373
390
  }
374
391
  }
392
+ /** Serializes every prove-then-adopt transaction (the 75% timer and the explicit reload) so a timer
393
+ * tick and an explicit reload can never interleave their fetch/preflight/commit — the design's
394
+ * single-flight requirement. Runs `fn` after any in-flight transaction settles, whatever its
395
+ * outcome; the internal chain never rejects. */
396
+ credsTxn = Promise.resolve();
397
+ runCredsTxn(fn) {
398
+ const next = this.credsTxn.then(fn, fn);
399
+ this.credsTxn = next.then(() => undefined, () => undefined);
400
+ return next;
401
+ }
402
+ /** Race `p` against a `ms` deadline so a slow/hung SecretStore fetch (or preflight) cannot exceed
403
+ * the daemon transaction bound. The underlying promise is not cancellable, so callers also FENCE a
404
+ * late commit by re-checking the deadline before mutating {@link currentCreds}. */
405
+ static async withDeadline(p, ms, msg) {
406
+ let timer;
407
+ const timeout = new Promise((_, rej) => { timer = setTimeout(() => rej(new Error(msg)), Math.max(1, ms)); });
408
+ try {
409
+ return await Promise.race([p, timeout]);
410
+ }
411
+ finally {
412
+ if (timer)
413
+ clearTimeout(timer);
414
+ }
415
+ }
416
+ /** The one PROVE-then-adopt transaction shared by the 75% timer and the explicit reload (run under
417
+ * {@link runCredsTxn}). Fetch (deadline-bounded) → identity-pin → optional `expected` fingerprint →
418
+ * PREFLIGHT the candidate on a disposable connection → fence a late commit against the deadline →
419
+ * commit {@link currentCreds} → arm the next 75% timer. Because currentCreds is written ONLY after
420
+ * the preflight proves broker acceptance, the resident authenticator getter can never present an
421
+ * unproven cred (not even on an incidental reconnect), and a rejected candidate leaves the resident
422
+ * connection untouched on BOTH the timer and explicit paths. THROWS (structured) on any failure. */
423
+ async adoptFreshCreds(opts = {}) {
424
+ // ABSOLUTE deadline, captured at the CALLER's entry (reloadCreds / renewCredsOnTimer) BEFORE the
425
+ // single-flight enqueue, so the queue wait behind an in-flight transaction counts against it. A
426
+ // reload queued behind a hung-store timer tick can never receive a FRESH budget and commit after
427
+ // the renewal owner's request bound already elapsed.
428
+ const deadline = opts.deadline ?? Date.now() + CotalEndpoint.RELOAD_DEADLINE_MS;
429
+ // Fence BEFORE any source I/O: if the queue wait already burned the budget, fail structured now and
430
+ // never touch the store, the preflight, or currentCreds.
431
+ if (Date.now() > deadline)
432
+ throw new Error("reloadCreds: the request deadline elapsed while queued behind another credential transaction; nothing adopted");
433
+ const candidate = await CotalEndpoint.withDeadline(this.credsSource(), deadline - Date.now(), "reloadCreds: the creds source did not return before the daemon deadline; nothing adopted");
434
+ const id = idFromCreds(candidate);
435
+ if (id !== this.connId)
436
+ throw new Error(`creds source returned identity ${id}, expected ${this.connId} - renewal may not swap the connection's nkey`);
437
+ // Non-material message ON PURPOSE: this text flows to the manager's persisted
438
+ // `RenewalRecord.adoption.error`, so neither the observed nor the expected digest may appear.
439
+ if (opts.expected !== undefined && credsFingerprint(candidate) !== opts.expected)
440
+ throw new Error("reloadCreds: re-read credential generation did not match the expected re-signed generation (a different store, or a torn/stale read); nothing adopted");
441
+ // PREFLIGHT = the proof. A disposable connection presenting exactly the candidate BEFORE the live
442
+ // cache is touched; a refused cred throws here, leaving the resident connection untouched.
443
+ const probe = await probeConnect(this.servers, { creds: candidate, tls: this.tls, timeoutMs: Math.max(500, Math.min(CotalEndpoint.PREFLIGHT_MS, deadline - Date.now())) });
444
+ if (!probe.ok)
445
+ throw new Error(`reloadCreds: the broker did not accept the re-signed credential (${probe.reason}); nothing adopted`);
446
+ if (Date.now() > deadline)
447
+ throw new Error("reloadCreds: the proof exceeded the daemon deadline; nothing adopted"); // fence a late commit
448
+ // Validate the bounded-window renewal delay BEFORE the commit: credsRenewalDelayMs throws on a cred
449
+ // lacking a numeric `exp`, and that throw must not leave currentCreds flipped to a candidate the
450
+ // authenticator would present on the next reconnect (a post-preflight validation failure is a no-op).
451
+ const delay = credsRenewalDelayMs(candidate);
452
+ this.currentCreds = candidate;
453
+ this.armCredsRefresh(delay);
454
+ return credsClaims(candidate);
455
+ }
456
+ /** The 75%-of-lifetime renewal timer tick: prove + adopt + swap the LIVE connection. Preflights (it
457
+ * reconnects a live connection, so the candidate must be broker-proven first) and is serialized
458
+ * with the explicit reload. Never throws — a failed renewal logs and retries while the old cred
459
+ * stays live until its expiry. */
460
+ async renewCredsOnTimer() {
461
+ // Deadline captured HERE, before the enqueue, for the same reason as the explicit reload.
462
+ const deadline = Date.now() + CotalEndpoint.RELOAD_DEADLINE_MS;
463
+ try {
464
+ await this.runCredsTxn(() => this.adoptFreshCreds({ deadline }));
465
+ await this.swapConnectionOntoFreshCreds();
466
+ }
467
+ catch (e) {
468
+ this.emit("error", new Error(`creds refresh failed (${e instanceof Error ? e.message : String(e)}) - retrying; this connection dies at its current JWT's expiry if renewal keeps failing`));
469
+ this.armCredsRefresh(CotalEndpoint.CREDS_RETRY_MS);
470
+ }
471
+ }
375
472
  /** EXPLICIT credential reload — the auditable adoption step of D5 class-2 standing renewal (served
376
- * to the renewal owner via the delivery-admin rail). Re-invokes the source NOW, pins + adopts the
377
- * fresh cred on the live connection, and returns the adopted JWT's window so the caller can record
378
- * proof of adoption. THROWS (structured for the reply) when the source fails e.g. the creds file
379
- * was not actually re-signed so "file written" can never masquerade as "daemon adopted". */
380
- async reloadCreds() {
473
+ * to the renewal owner via the delivery-admin rail). The PROOF-OF-RECORD is a DISPOSABLE PREFLIGHT
474
+ * connection that presents exactly the candidate: it succeeds only when the BROKER accepts this
475
+ * re-signed generation, and it runs BEFORE the live cache is touched. So a cred the broker refuses
476
+ * throws HERE (structured), the resident connection and the delivery-admin rail this very reply
477
+ * rides is never disturbed, and "file re-signed" can never masquerade as "daemon adopted".
478
+ * `expected` is the renewal owner's generation token (SHA-256 of the JWT it re-signed): a re-read
479
+ * that does not match is rejected before the preflight even runs. On success the candidate becomes
480
+ * the resident connection's next-presented cred; the wire swap is NOT forced here — the caller
481
+ * ({@link handleDeliveryAdmin}) schedules it AFTER the aggregate reply, because the responder rides
482
+ * this connection and reconnecting before the reply flushes would strand it (see
483
+ * adoption-false-green.smoke.ts). Returns the BROKER-ACCEPTED generation's window (identity/iat/exp):
484
+ * the resident wire swap is best-effort and self-healing (the 75% timer + the broker's expiry-close),
485
+ * NOT witnessed, so the caller must claim broker acceptance, not verified resident reauth. NEVER a
486
+ * fingerprint. */
487
+ async reloadCreds(expected) {
381
488
  if (!this.credsSource)
382
489
  throw new Error("reloadCreds: this endpoint has no creds source (a static cred cannot be renewed in place)");
383
- const { iat, exp } = await this.fetchFreshCreds();
384
- await this.swapConnectionOntoFreshCreds();
490
+ // Capture the ABSOLUTE deadline at ENTRY, before enqueue, so a reload queued behind a hung-store
491
+ // 75% timer tick is bounded by the SAME window (queue wait included) and cannot commit/swap after
492
+ // the renewal owner's request bound has already elapsed and it recorded "no responder".
493
+ const deadline = Date.now() + CotalEndpoint.RELOAD_DEADLINE_MS;
494
+ // The prove-then-adopt transaction (fetch + preflight + commit) runs under the single-flight so it
495
+ // cannot interleave with the 75% timer; the wire swap is scheduled by {@link handleDeliveryAdmin}
496
+ // after the aggregate reply (the responder rides this connection).
497
+ const { iat, exp } = await this.runCredsTxn(() => this.adoptFreshCreds({ expected, deadline }));
385
498
  return { identity: this.connId, iat, exp };
386
499
  }
500
+ /** Arm the resident wire swap for the delivery-admin `reloadCreds` path. Called by
501
+ * {@link handleDeliveryAdmin} ONLY after BOTH component proofs have settled and immediately before
502
+ * the reply is returned+responded — never from inside {@link reloadCreds} while the aggregate is
503
+ * still open, or a slow co-component proof would let `nc.reconnect()` reconnect the admin rail
504
+ * before the reply flushes and silently strand it. The short deferral lets the reply flush on the
505
+ * still-live old cred first. Best-effort — the proof was the preflight; a transient swap failure is
506
+ * retried by the 75% timer and the broker's own expiry-close, both presenting the adopted candidate. */
507
+ scheduleResidentSwap() {
508
+ if (this.stopped)
509
+ return;
510
+ setTimeout(() => { void this.swapConnectionOntoFreshCreds(); }, CotalEndpoint.RESIDENT_SWAP_DEFER_MS).unref?.();
511
+ }
387
512
  armCredsRefresh(delayMs) {
388
513
  if (this.stopped)
389
514
  return;
390
515
  clearTimeout(this.credsTimer);
391
516
  // 1s floor (vs the bearer's 5s): standing-renewal smokes exercise second-scale TTLs; production
392
517
  // lifetimes are hours+ so the floor never engages there.
393
- this.credsTimer = setTimeout(() => void this.refreshCreds(), Math.max(1_000, delayMs));
518
+ this.credsTimer = setTimeout(() => void this.renewCredsOnTimer(), Math.max(1_000, delayMs));
394
519
  this.credsTimer.unref?.();
395
520
  }
396
521
  /** Open the connection and bind everything that hangs off it: status watch, presence
@@ -1938,14 +2063,34 @@ export class CotalEndpoint extends EventEmitter {
1938
2063
  * structured failure (e.g. the file was never re-signed), never a silent partial. */
1939
2064
  async handleDeliveryAdmin(req) {
1940
2065
  if (req.op === "reloadCreds") {
1941
- try {
1942
- const delivery = await this.reloadCreds();
1943
- const membership = this.plane3?.reloadMembershipCreds ? await this.plane3.reloadMembershipCreds() : undefined;
1944
- return { ok: true, data: { delivery, ...(membership !== undefined ? { membership } : {}) } };
1945
- }
1946
- catch (e) {
1947
- return { ok: false, error: e.message };
1948
- }
2066
+ // The renewal owner's EXPECTED-generation tokens (SHA-256 of each JWT it re-signed), per
2067
+ // component. A missing entry means "no expectation" (the passive backstop still adopts).
2068
+ const expected = (req.args?.expected ?? {});
2069
+ // Prove BOTH components INDEPENDENTLY (non-short-circuit): one failing must neither hide the
2070
+ // other's outcome nor be masked by it. Top-level `ok` is false if EITHER proof failed, so the
2071
+ // manager can never record a green adoption while a component was refused.
2072
+ // Each component's outcome claims only what is PROVEN: `brokerAccepted` (the preflight) carries
2073
+ // the accepted generation's window; `residentSwap` records that the wire swap is best-effort and
2074
+ // self-healing, NOT witnessed. Neither claims verified resident reauth (that would need a
2075
+ // generation-tied reconnect witness on both connections).
2076
+ const [delivery, membership] = await Promise.all([
2077
+ this.reloadCreds(expected.delivery).then((brokerAccepted) => ({ ok: true, brokerAccepted, residentSwap: "scheduled" }), (e) => ({ ok: false, error: e.message })),
2078
+ this.plane3?.reloadMembershipCreds
2079
+ ? this.plane3.reloadMembershipCreds(expected.membership).then((result) => ({ ok: true, ...result }), (e) => ({ ok: false, error: e.message }))
2080
+ : Promise.resolve({ ok: true, skipped: "no-membership-hook" }),
2081
+ ]);
2082
+ const failures = [
2083
+ delivery.ok ? undefined : `delivery: ${delivery.error}`,
2084
+ membership.ok ? undefined : `membership: ${membership.error}`,
2085
+ ].filter((m) => m !== undefined);
2086
+ // Arm the resident wire swap ONLY now — after BOTH proofs settled, right before the reply is
2087
+ // returned+responded — so a slow membership proof can never let the delivery reconnect strand
2088
+ // this reply. Only when delivery actually adopted a new candidate (currentCreds was updated).
2089
+ if (delivery.ok)
2090
+ this.scheduleResidentSwap();
2091
+ return failures.length
2092
+ ? { ok: false, error: failures.join("; "), data: { delivery, membership } }
2093
+ : { ok: true, data: { delivery, membership } };
1949
2094
  }
1950
2095
  if (req.op === "evictPrincipal") {
1951
2096
  // The LIVE-EVICTION executor (D5 slice 6): force-drop a denied principal's connections.
@@ -3158,19 +3303,6 @@ function authOpts(a) {
3158
3303
  * bearer) is the real boundary, so a client that lied to itself would just be denied. Per the token
3159
3304
  * claim semantics the OWNER is the JWT `sub` (`act.owner` merely restates it) and the ACTOR is
3160
3305
  * `act.actor`. Throws on a structurally-unusable bearer (fail-loud). */
3161
- /** Ms until a source-fed cred's RENEWAL point — 75% of its iat→exp lifetime (the cert-manager-style
3162
- * renew-early convention: the remaining 25% is the loud-failure window, wide for day-scale standing
3163
- * creds). Negative when already past it. A source-fed cred WITHOUT a numeric `exp` is fail-loud:
3164
- * the renewal seam exists precisely for bounded creds, so an unbounded one signals a matrix/caller
3165
- * mismatch, not a cred to keep silently forever. */
3166
- function credsRenewalDelayMs(creds) {
3167
- const claims = credsClaims(creds); // throws on a structurally-unusable file (fail-loud)
3168
- if (typeof claims.exp !== "number")
3169
- throw new Error("creds source returned a cred without a numeric exp - a standing-renewal endpoint requires bounded creds (mint with a lifetime, or pass a static string instead of a source)");
3170
- const iatMs = (typeof claims.iat === "number" ? claims.iat : Date.now() / 1000) * 1000;
3171
- const expMs = claims.exp * 1000;
3172
- return iatMs + 0.75 * (expMs - iatMs) - Date.now();
3173
- }
3174
3306
  /** The bearer's `exp` as epoch ms — what the refresh schedule keys on. A bearer without a numeric
3175
3307
  * `exp` is structurally unusable for a refreshing endpoint (fail-loud, like the principal decode). */
3176
3308
  function bearerExpiryMs(bearer) {