Triage gets its own model proxy client key, issued by a human CLI verb. Nothing reads the key yet: the Console still passes route: null, so Triage still does not start.
Verbs.mosaic triage key issue|rotate|retire|status in packages/cli/src/triage.mjs, with the work in a new triage-key.mjs. Every verb refuses an agent run before it reads anything.
Key.mst-<tag>-triage-<secret>, where <tag> is the instance's own sentinel tag. It is stored in <configDir>/secrets/triage/model, file 0600 and directory 0700, owned by the running user. A wrong mode or owner, a link, a FIFO or a non-file refuses.
Writes. issue, rotate and retire take the instance proxy lock the org buses take. Each reads the key list, refuses without this instance's sentinel, reads again and refuses if the list moved, sets the fence, writes, reads back, clears the fence, writes the file and appends one receipt line of key ids.
Rotate. It adds a new key and marks the old one retiring. The grace comes from proxy.rotateGraceMinutes, where the bus reads it. The lifetime is 30 days, as for a bus key.
Retire. A fourth verb, not in the brief. Nothing runs on a timer, so the old key stays live in the proxy until someone runs mosaic triage key retire at or after the grace ends. The words in rotate, status and the README say so.
Status. It prints issued or not, the key id and its age. It takes no lock and writes nothing.
No key in output. No verb output, error, receipt or log line holds a key. A test scans every output of every verb.
Org buses. A test starts a real broker and runs a no-org reconcile while an mst- key is in the list. The key survives both. No bus change.
Jason approved the key verb and its file on 2026-11-18 ("route as recommended").
No bus schema, vocabulary, policy or HTTP route change.
Tests
triage-key.test.mjs: 22 tests, with a crash test at each step. Mutants: 55 of 56 red. The survivor is a guard against removing a key outside the Triage namespace, which no code path can reach.
Lane gate before the rebase: 144 files, 1861 pass, 0 fail, 1 skipped (federation-acceptance).
Lead check after the rebase, in a clean environment: 32 test files (the triage, verb, guard and proxy CLI tests, every model-proxy test and the webui triage tests), 334 pass, 0 fail.
Review
One fresh claude-opus-5-5 reviewer: changes, one P2 (the rotate grace was recorded but nothing enforced it) and ten P3s. The P2 and seven P3s are fixed in the second commit. No reviewer read that commit.
Left for later
Retire runs only by hand. A timer or the host could run it.
The 30-day lifetime and the 120-minute default grace are copied from the bus, which exports neither. A test pins both to the bus.
A no-org bus writes the key list with no lock and no second read. A Triage write racing it can be lost, and the next status says so. The fix is a bus change with its own row.
Wiring the key into the Triage host is the next change.
## What changes
Triage gets its own model proxy client key, issued by a human CLI verb. Nothing reads the key yet: the Console still passes `route: null`, so Triage still does not start.
- **Verbs.** `mosaic triage key issue|rotate|retire|status` in `packages/cli/src/triage.mjs`, with the work in a new `triage-key.mjs`. Every verb refuses an agent run before it reads anything.
- **Key.** `mst-<tag>-triage-<secret>`, where `<tag>` is the instance's own sentinel tag. It is stored in `<configDir>/secrets/triage/model`, file 0600 and directory 0700, owned by the running user. A wrong mode or owner, a link, a FIFO or a non-file refuses.
- **Writes.** issue, rotate and retire take the instance proxy lock the org buses take. Each reads the key list, refuses without this instance's sentinel, reads again and refuses if the list moved, sets the fence, writes, reads back, clears the fence, writes the file and appends one receipt line of key ids.
- **Rotate.** It adds a new key and marks the old one retiring. The grace comes from `proxy.rotateGraceMinutes`, where the bus reads it. The lifetime is 30 days, as for a bus key.
- **Retire.** A fourth verb, not in the brief. Nothing runs on a timer, so the old key stays live in the proxy until someone runs `mosaic triage key retire` at or after the grace ends. The words in rotate, status and the README say so.
- **Status.** It prints issued or not, the key id and its age. It takes no lock and writes nothing.
- **No key in output.** No verb output, error, receipt or log line holds a key. A test scans every output of every verb.
- **Org buses.** A test starts a real broker and runs a no-org reconcile while an `mst-` key is in the list. The key survives both. No bus change.
Jason approved the key verb and its file on 2026-11-18 ("route as recommended").
## How
- `packages/cli/src/triage-key.mjs` (new), `packages/cli/src/triage.mjs`, `packages/cli/README.md`, `packages/cli/tests/triage-key.test.mjs`.
- No bus schema, vocabulary, policy or HTTP route change.
## Tests
- `triage-key.test.mjs`: 22 tests, with a crash test at each step. Mutants: 55 of 56 red. The survivor is a guard against removing a key outside the Triage namespace, which no code path can reach.
- Lane gate before the rebase: 144 files, 1861 pass, 0 fail, 1 skipped (`federation-acceptance`).
- Lead check after the rebase, in a clean environment: 32 test files (the triage, verb, guard and proxy CLI tests, every model-proxy test and the webui triage tests), 334 pass, 0 fail.
## Review
One fresh claude-opus-5-5 reviewer: changes, one P2 (the rotate grace was recorded but nothing enforced it) and ten P3s. The P2 and seven P3s are fixed in the second commit. No reviewer read that commit.
## Left for later
- Retire runs only by hand. A timer or the host could run it.
- The 30-day lifetime and the 120-minute default grace are copied from the bus, which exports neither. A test pins both to the bus.
- A no-org bus writes the key list with no lock and no second read. A Triage write racing it can be lost, and the next `status` says so. The fix is a bus change with its own row.
- Wiring the key into the Triage host is the next change.
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)
- 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)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What changes
Triage gets its own model proxy client key, issued by a human CLI verb. Nothing reads the key yet: the Console still passes
route: null, so Triage still does not start.mosaic triage key issue|rotate|retire|statusinpackages/cli/src/triage.mjs, with the work in a newtriage-key.mjs. Every verb refuses an agent run before it reads anything.mst-<tag>-triage-<secret>, where<tag>is the instance's own sentinel tag. It is stored in<configDir>/secrets/triage/model, file 0600 and directory 0700, owned by the running user. A wrong mode or owner, a link, a FIFO or a non-file refuses.proxy.rotateGraceMinutes, where the bus reads it. The lifetime is 30 days, as for a bus key.mosaic triage key retireat or after the grace ends. The words in rotate, status and the README say so.mst-key is in the list. The key survives both. No bus change.Jason approved the key verb and its file on 2026-11-18 ("route as recommended").
How
packages/cli/src/triage-key.mjs(new),packages/cli/src/triage.mjs,packages/cli/README.md,packages/cli/tests/triage-key.test.mjs.Tests
triage-key.test.mjs: 22 tests, with a crash test at each step. Mutants: 55 of 56 red. The survivor is a guard against removing a key outside the Triage namespace, which no code path can reach.federation-acceptance).Review
One fresh claude-opus-5-5 reviewer: changes, one P2 (the rotate grace was recorded but nothing enforced it) and ten P3s. The P2 and seven P3s are fixed in the second commit. No reviewer read that commit.
Left for later
statussays so. The fix is a bus change with its own row.