feat(webui, model-proxy): three instance-owner reads for Model setup: service log lines with secrets removed, the service key's made-at time, and setup history with paging (#1873)
#2006
Settings backend slice A1 (lane settings-backend-a1): three reads the new Model setup page needs. Server half only. All three are under /api/proxy/admin/ and only the instance owner may call them.
log. The model service's last log lines, with keys and secrets removed. A line that cannot be shown safely is dropped. A secret split across lines drops every line. If the journal cannot be read, the route says so with an existing code and uses no other source.
service-key. When the service key was made, from the setup file's modified time. Nothing in the file is read, and no part of the key is returned.
history. Setup history across sessions, one page at a time. Account changes made through /api/proxy/* and through an organization's proxy routes are recorded by label only. An entry whose fields together still hold a secret is answered as { withheld: true }.
Redaction. The redaction from #2003 now removes Mosaic's own key prefixes (mso-, mst-, msk-, msp-), including a short key stuck to a word.
No route loads the model service's management key. No new bus verb, refusal code, grant, role, schema or config format. No change to display.js or bus.js. The response shape of each route is in the lane report for the page lane.
Tests
Each route refuses every caller but the instance owner. Keys of each prefix planted in a fixture journal and a fixture history never reach an answer. A missing or unreadable source fails closed. Paging returns each entry once. The redaction stays linear on a long run. Tests read a fixture journal, never the live one.
The lane ran 28 mutants of the new checks. The tests catch every one.
Lane gate on 1e99c24dc: 439 files, 4337 pass, 0 fail, 7 skip (the same seven skip on the base).
Lead check in a clean environment on the rebased tip: tip 37c385484, 484 files, 4910 pass, 1 fail, 8 skip. The one red is packages/conversation/tests/flows.test.mjs, which fails the same way on the base: the clean environment has no Python jsonschema.
Review
A fresh claude-opus-5-5 reviewer approved with ten small findings. The lane fixed two in code and added comments for two more. A second fresh reviewer approved and raised three small points, none needing a code change.
Left for later
A management key that is a plain passphrase cannot be removed from the log, because the Console may not load the key.
A history page can come back empty and still have a next page.
The redaction also removes harmless words such as omsk-labs.
One loose test assertion.
The page halves of these reads, after the Settings layout slice 5 lands.
Slices A2 (programs and access health across organizations) and A3 (provider list from the plugin).
## What changes
Settings backend slice A1 (lane settings-backend-a1): three reads the new Model setup page needs. Server half only. All three are under `/api/proxy/admin/` and only the instance owner may call them.
- **`log`.** The model service's last log lines, with keys and secrets removed. A line that cannot be shown safely is dropped. A secret split across lines drops every line. If the journal cannot be read, the route says so with an existing code and uses no other source.
- **`service-key`.** When the service key was made, from the setup file's modified time. Nothing in the file is read, and no part of the key is returned.
- **`history`.** Setup history across sessions, one page at a time. Account changes made through `/api/proxy/*` and through an organization's proxy routes are recorded by label only. An entry whose fields together still hold a secret is answered as `{ withheld: true }`.
- **Redaction.** The redaction from #2003 now removes Mosaic's own key prefixes (`mso-`, `mst-`, `msk-`, `msp-`), including a short key stuck to a word.
No route loads the model service's management key. No new bus verb, refusal code, grant, role, schema or config format. No change to `display.js` or `bus.js`. The response shape of each route is in the lane report for the page lane.
## Tests
- Each route refuses every caller but the instance owner. Keys of each prefix planted in a fixture journal and a fixture history never reach an answer. A missing or unreadable source fails closed. Paging returns each entry once. The redaction stays linear on a long run. Tests read a fixture journal, never the live one.
- The lane ran 28 mutants of the new checks. The tests catch every one.
- Lane gate on 1e99c24dc: 439 files, 4337 pass, 0 fail, 7 skip (the same seven skip on the base).
- Lead check in a clean environment on the rebased tip: tip 37c385484, 484 files, 4910 pass, 1 fail, 8 skip. The one red is `packages/conversation/tests/flows.test.mjs`, which fails the same way on the base: the clean environment has no Python `jsonschema`.
## Review
A fresh claude-opus-5-5 reviewer approved with ten small findings. The lane fixed two in code and added comments for two more. A second fresh reviewer approved and raised three small points, none needing a code change.
## Left for later
- A management key that is a plain passphrase cannot be removed from the log, because the Console may not load the key.
- A history page can come back empty and still have a next page.
- The redaction also removes harmless words such as `omsk-labs`.
- One loose test assertion.
- The page halves of these reads, after the Settings layout slice 5 lands.
- Slices A2 (programs and access health across organizations) and A3 (provider list from the plugin).
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
Settings backend slice A1 (lane settings-backend-a1): three reads the new Model setup page needs. Server half only. All three are under
/api/proxy/admin/and only the instance owner may call them.log. The model service's last log lines, with keys and secrets removed. A line that cannot be shown safely is dropped. A secret split across lines drops every line. If the journal cannot be read, the route says so with an existing code and uses no other source.service-key. When the service key was made, from the setup file's modified time. Nothing in the file is read, and no part of the key is returned.history. Setup history across sessions, one page at a time. Account changes made through/api/proxy/*and through an organization's proxy routes are recorded by label only. An entry whose fields together still hold a secret is answered as{ withheld: true }.mso-,mst-,msk-,msp-), including a short key stuck to a word.No route loads the model service's management key. No new bus verb, refusal code, grant, role, schema or config format. No change to
display.jsorbus.js. The response shape of each route is in the lane report for the page lane.Tests
37c385484, 484 files, 4910 pass, 1 fail, 8 skip. The one red ispackages/conversation/tests/flows.test.mjs, which fails the same way on the base: the clean environment has no Pythonjsonschema.Review
A fresh claude-opus-5-5 reviewer approved with ten small findings. The lane fixed two in code and added comments for two more. A second fresh reviewer approved and raised three small points, none needing a code change.
Left for later
omsk-labs.