Re-sign the daemon creds files for their EXISTING nkeys (a renewal must never swap a daemon's
identity — the daemon side pins it). Reads and writes through the secret-store seam; store is
the renewal owner's injection point, SYMMETRIC with the daemon's runDelivery(args, store?).
The manager — the D5 standing-renewal owner, and a hosted-path caller (manager.ts calls this
unconditionally) — passes the SAME store it gives the daemon (its ManagerOptions.secretStore),
so a hosted composition re-signs into the store the daemon renews from, never a divergent one; no
store means the local workspace FS composition (keys = the paths under .cotal/).
The creds are PER-SPACE as of P7, so every store op is addressed by the entry's
key(expectedSpace) builder (§3.1) while every RESULT still reports the entry's kind.
expectedSpace (the caller's known space — the manager's this.space, doctor's resolved space) is
a REQUIRED positional and is validated against the store's signer: the daemon creds are SPACE-SCOPED,
so a store whose signer is for a DIFFERENT space (a swap after start, a misconfigured hosted mount)
must NOT re-sign — that would overwrite each last-good cred with one the space's broker rejects,
breaking the daemon on a value that looks freshly renewed. It is required (not optional) so the
unsafe no-space call cannot compile — the same claim-exceeds-enforcement trap the cross-space fix
would otherwise leave for the next caller. A signer that fails validation fails EVERY file
(ok:false), leaving the standing creds intact toward their loud expiry rather than clobbering them.
The store's ATOMIC put is load-bearing here, because the daemons re-read these values LIVE (the
delivery endpoint's 75% source refresh, the membership feed's 75% renewal fetch).
The last-good cred is NEVER overwritten with an UNPROVEN one — a bundle's JWT chain is self-bound,
not broker-bound (two createSpaceAuth(space) calls yield same-named, DIFFERENT-account chains), so
a same-label alternate signer could mint a broker-dead cred and CLOBBER the last-good (availability
loss). Proof before overwrite is one of: (1) opts.preflight — a disposable "does the broker accept
this cred" probe the caller owns (the manager passes a probeConnect over this.servers),
which gates EVERY candidate when supplied; or (2) AUTHORITY CONTINUITY — the candidate is signed by
the SAME account signing key (iss) as the current (last-good, already broker-accepted) cred, the
same authority the broker trusts, which the OFFLINE local repair (doctor auth --fix) relies on. A
same-label alternate account breaks continuity, so with no preflight it is refused, not clobbered.
Structured per-file results, never throws: a failed remint leaves the old cred running toward its
loud expiry and the caller records/reports the failure.
Re-sign the daemon creds files for their EXISTING nkeys (a renewal must never swap a daemon's identity — the daemon side pins it). Reads and writes through the secret-store seam;
storeis the renewal owner's injection point, SYMMETRIC with the daemon'srunDelivery(args, store?). The manager — the D5 standing-renewal owner, and a hosted-path caller (manager.ts calls this unconditionally) — passes the SAME store it gives the daemon (itsManagerOptions.secretStore), so a hosted composition re-signs into the store the daemon renews from, never a divergent one; no store means the local workspace FS composition (keys = the paths under.cotal/).The creds are PER-SPACE as of P7, so every store op is addressed by the entry's
key(expectedSpace)builder (§3.1) while every RESULT still reports the entry'skind.expectedSpace(the caller's known space — the manager'sthis.space, doctor's resolved space) is a REQUIRED positional and is validated against the store's signer: the daemon creds are SPACE-SCOPED, so a store whose signer is for a DIFFERENT space (a swap after start, a misconfigured hosted mount) must NOT re-sign — that would overwrite each last-good cred with one the space's broker rejects, breaking the daemon on a value that looks freshly renewed. It is required (not optional) so the unsafe no-space call cannot compile — the same claim-exceeds-enforcement trap the cross-space fix would otherwise leave for the next caller. A signer that fails validation fails EVERY file (ok:false), leaving the standing creds intact toward their loud expiry rather than clobbering them. The store's ATOMIC put is load-bearing here, because the daemons re-read these values LIVE (the delivery endpoint's 75% source refresh, the membership feed's 75% renewal fetch).The last-good cred is NEVER overwritten with an UNPROVEN one — a bundle's JWT chain is self-bound, not broker-bound (two
createSpaceAuth(space)calls yield same-named, DIFFERENT-account chains), so a same-label alternate signer could mint a broker-dead cred and CLOBBER the last-good (availability loss). Proof before overwrite is one of: (1)opts.preflight— a disposable "does the broker accept this cred" probe the caller owns (the manager passes a probeConnect overthis.servers), which gates EVERY candidate when supplied; or (2) AUTHORITY CONTINUITY — the candidate is signed by the SAME account signing key (iss) as the current (last-good, already broker-accepted) cred, the same authority the broker trusts, which the OFFLINE local repair (doctor auth --fix) relies on. A same-label alternate account breaks continuity, so with no preflight it is refused, not clobbered.Structured per-file results, never throws: a failed remint leaves the old cred running toward its loud expiry and the caller records/reports the failure.