feat(cli): mosaic triage key issue|rotate|retire|status, Triage's own model proxy key (#1873) #1991

Merged
jason.woltje merged 2 commits from triage-key into refactor 2026-11-18 19:56:42 +00:00
2 Commits
Author SHA1 Message Date
jason.woltje d531d7181d fix(triage): review round for the triage key verbs
- The grace is the earliest retire time, not a timer: rotate, status and the
  README say the old key stays live until retire runs after it.
- A temp file left by a kill before the rename is removed under the lock by
  the next issue, rotate or retire; status counts it.
- The receipts file is checked under the lock before any change
  (triage-key-receipts-unsafe); a receipt that fails after the change is
  triage-key-unrecorded.
- A failed directory sync after the rename is triage-key-unsynced, after the
  receipt is written, not triage-key-unwritten.
- proxy-lock-busy points at mosaic proxy fence status.
- Tests: a sentinel lost on the read-back, FIFO key and receipts files, a stale
  lock reaped, a crash before the rename, the receipts checks, the sync
  failure; the no-op assertion is gone. (#1873)
2026-11-18 13:54:13 -06:00
jason.woltje 67e1ff193d feat(triage): mosaic triage key issue|rotate|retire|status, Triage's own model proxy key
issue adds one mst-<tag>-triage- key under the instance proxy lock (read,
sentinel, re-read, fence, PUT, read back, confirm) and writes it to
<configDir>/secrets/triage/model (directory 0700, file 0600, the running
user's; a link, a non-file, a second link, a wrong mode or owner refuses).
rotate adds a new key and keeps the old one until now plus the bus's
rotateGraceMinutes from proxy.json; retire removes retiring keys once due.
status reads the file and the list, takes no lock and writes nothing.
Outputs, errors and receipts carry key ids only. A crash at each step
leaves a state status names and the next verb clears. Org and no-org bus
reconciles leave the key alone. Nothing wires the key into the host (#1873)
2026-11-18 13:54:13 -06:00