- 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)
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 file owner check has its own test through a file-owner seam, for
route.json on read and write and for route-receipts.jsonl on write. The
directory, temp file and a new receipts file get their modes on the open
descriptor, so a narrow umask cannot leave a route the next read refuses;
an existing receipts file is never repaired. A failed temp write refuses
and removes the temp file. A failure after the rename refuses as
triage-route-unrecorded and names the new revision. The input zone check
uses the stored cap's rule, so +05:00 refuses as an unknown zone. A
changed cap keeps its since, as an organization's token limits do, so
lowering the cap never drops tokens already counted (#1873, lane
triage-route-store).
<dataRoot>/triage/route.json holds Triage's model route and daily cap as names only:
a catalogue model key, a harness name and a daily-quota cap leaf, with no env value
and no key. The directory is 0700 and the file 0600, owned by the running user; a
link, a hard link, a non-file, a wrong mode or owner, an unknown field or an unknown
time zone refuses. A write is compare-and-set on revision under an exclusive lock,
atomic (temp file, fsync, rename, directory fsync), and appends one receipt line.
The reset is 00:00 in a zone the owner gives, with no default. The file location,
field names and reset rule each live in one place.
mosaic triage route show|set are human verbs and refuse an agent run before any read.
Nothing is wired into the Triage host: the Console keeps route: null. Held for
Jason's ruling on the design's four questions (#1873, lane triage-route-store).
The workflows read listed the triage template, which only the client hid.
The read handler now drops every template the organization vocabulary marks
system-only, and the Console's read supplier in cli.mjs drops them too. The
client filter stays. (#1873, lane triage-followups)
Claude Code 2.1.319, 2.1.322 and 2.1.325 can run the Stop hook before they
write the turn to the transcript. The hook then read the last turn's reply,
logged it a second time, and missed this turn's reply. That made
claude-session.test.mjs row 66 red in most runs.
The hook now reads the transcript again, for up to 2 s, until its last reply
matches last_assistant_message. If it never does, it checks
last_assistant_message alone with an empty entryId, never the last turn
again. (#1873, lane triage-followups)
The test helper opens the drawer after the page's first render has focused its heading, as a person
would. A drawer opened before that loses focus to the heading (bus.js); that is left as a follow-up.
The drawer reads GET /api/triage only while open. A poll keeps the draft and the reader's scroll place.
Every field is set as text. Cards show the command with no Run button, and the dropped count.
The send box shows only when config triageSend and the read's send are both true. It names each
answer in plain words, never resends, and keeps the draft after a refusal.
Workflows: Save with only the state changed in an add form says the step is not added yet and keeps
the form. The step picker no longer offers the system-only triage template.
P1-1: the organizations branch lets the instance owner's own session through to the two Triage paths;
everyone else still gets this Console's unknown /api/ answer.
P1-2: each start clears turns/, so the runner's numbered turn files do not collide on restart.
P2-1: on exit, a message the session took and never marked read leaves the queue with a host line.
P2-2: member, signed-out, organizations-Console and org-selected route tests.
P3-1: bus-start cards carry --dev-local-owner on a dev local owner Console.
P3-2: a failed start writes a host line; the queue index is guarded.
P3-3: one shared refresh, a unique temp name per write, four organizations read at a time.
P3-4: the restart path waits for stop() inside its two-second exit.
P3-5: ANTHROPIC_API_KEY no longer passes from the route.
The Console holds <dataRoot>/triage/ (0700): health/ mounted read-only at
work/health inside the session, agent/ the session's own run directory, and
host/ with the 0600 transcript and the runner's log, never mounted. The seat
package's new hostedBinds and hostedArgv give the session the system part,
the runner's files, the adapter and those two directories, and nothing else
of the data root: no org root, bus socket, config or secrets, and no git
identity. Each source inside agent/ is made fresh at start (rm never follows
a link), and hostedBinds refuses a link in place of any of them.
The spawn environment is PATH (fixed), LANG, LC_ALL, TZ, TERM and the
route's ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY; bwrap
sets HOME and TMPDIR. A route answer whose harnessEnv names MOSAIC_CONFIG,
a MOSAIC_BUS_ variable or a founder credential variable is refused.
The relay is the only broker the runner reaches. It answers the runner's
lifecycle verbs with fixed answers, hands over the owner's messages, and keeps
a message.send only when it is addressed to "human": its text goes to the
transcript with its cards checked. Every other verb, a send to anyone else
and a call without the capability are refused with triage-refused.
The model route is injected; without one nothing launches (triage-no-route),
and a route over its cap refuses with triage-over-cap and its until. The
tests run the session end to end under bwrap with a stub adapter.
The snapshot is one 0600 JSON file with a fixed field list: the Console's
answer, the model proxy unit, the system config check, and each active org's
bus state, last start, processing and org config check. States, times, counts
and codes only; a read that fails or hangs says "not read". The system config
check runs scripts/mosaic-config.mjs validate in a child with stdout ignored and
keeps the exit code and one fixed refusal code; the org config check keeps its
exit code only. Cards are { step, org } with a known step and a registered org;
the server renders the command and drops anything else.
One list, SYSTEM_ONLY in vocabulary.mjs, names triage; every path by which an
organization could gain one refuses with the one code template-system-only:
hire prepare at org, project and root level and a change onto it (hire.raise,
hire.start.console, decision.raise naming role.hire or role.change); the hire
and definitions template lists omit it; definition import; a definition copied
from it; organization roles, root agents and project agents; a pack record
pinning it; a starter pack defining it, so pack preview and apply refuse an
installed pack that names it; instances.set add and change for the human and
the tester, and the instances add list omits it. The broker passes the code
through and the webui tables map it. The template itself still loads and
validates. Red-first tests in organization and bus system-only.test.mjs; the
channel-proof hash of webui bus.mjs and the broker import pin are updated.
roles/triage.json: read, grep, find and ls; network none; message.send within role and nothing
cross-role; no credentials; messaging to and from the human only. Every grant is a subset of the
chief of staff's, so no line is flagged above the chief. No web grant, so the REQ-HARN-2 pin holds.
roles/triage.md: Triage reads health, explains, and proposes existing mosaic verbs as cards the
person runs. It never hires, raises a hire, applies or drafts a pack apply, or reads a secret; of
the system config it reports only whether the check passed. Carries the proactive line every
contract pins. Template only, per Jason's 2026-11-16 ruling; no new grant, verb or transport.
Appends six docs/SESSIONS.md lines (2026-11-10 to 2026-11-15, actor Sage
(Lead)), three BUILD-LOG.md phase entries (starter packs replace system
types; applying a pack is the hire decision, with the route fallback and
the exit 127 fix; single pane sp1 to sp14 with the sp15 correction) and
one docs/plans/CURRENT.md completed-log entry on the single pane state at
c26879637. Sources: uidev/LEAD-1110.md and git. Append only; no existing
line changed. Lane docs-1116.