feat(org): restore starts the bus; pages follow restart and quick setup (#1873) #1945

Merged
jason.woltje merged 2 commits from dev-restore-refresh into refactor 2026-11-12 02:46:23 +00:00
Owner

Dev readiness P1-4 and P1-5 (#1873): restore brings an organization back running, and pages follow state changes without a reload.

  • WebUI Restore restores and starts the bus, with one receipt naming both results. A bus start that fails after a good restore says so and offers Restart bus; a refused start names mosaic bus status ID and mosaic bus recover ID for a host that died.
  • CLI org restore ID --if-revision N also starts the bus, as mosaic bus start ID --dev-local-owner --detach would, after that verb's checks. The checks run before the restore, so a refusal changes nothing. A failed start after a good restore prints the restore receipt, names the start verb (and bus recover first for a stale lock) and exits 3.
  • --no-bus keeps the old behaviour. Inside an agent run, org restore refuses before any read unless --no-bus is given, as archive and delete do.
  • On a deployed or stamped instance the CLI restore refuses (exit 3, nothing changed) and names --no-bus, then bus start. The Console restore there starts the bus through the Console's own owner checks. Lead ruling: the CLI stays fail closed.
  • The sidebar lists a new organization after Quick Setup (org mode), and the dashboard shows the bus and System types after Restart bus or a restore, without a reload. The restore receipt is taken at mount so a failed reload cannot carry it to a later visit.
  • docs/TOOLS.md and the cli README list --no-bus.

Tests: new org-restore-bus (5) and org-refresh-browser (2); agent-guard, org, org-admin and org-archive-browser extended. Each new test is red on BASE 6d0e9f89b. Lane gate 5807/0. Lead check: 42 files on 8827905ba (touched tests, every reader of the org restore, org-admin and org-create paths, the org browser files, every refusal, path, json-redaction and last-values file), 468/0.

Review: build (Opus) approve, four P3; three fixed with tests, P3-2 ruled by the Lead (above). Security (daybreak-blue) approve, 0 findings: no new path lets an agent shell start a bus where the guard refuses today.

Deferred: env -i strips the agent markers (pre-existing, agent-guard follow-up; restore reaches nothing bus start would refuse). Single-organization Quick Setup still reloads the page. A Console with no action log restores without starting the bus, as Restart bus does. Two untouched tests flaked under load and pass alone: dev-local-owner "dev owner entry points refuse default dev marker before startup" and workspace-failures "deadline cancels in-flight child".

Dev readiness P1-4 and P1-5 (#1873): restore brings an organization back running, and pages follow state changes without a reload. - WebUI Restore restores and starts the bus, with one receipt naming both results. A bus start that fails after a good restore says so and offers Restart bus; a refused start names `mosaic bus status ID` and `mosaic bus recover ID` for a host that died. - CLI `org restore ID --if-revision N` also starts the bus, as `mosaic bus start ID --dev-local-owner --detach` would, after that verb's checks. The checks run before the restore, so a refusal changes nothing. A failed start after a good restore prints the restore receipt, names the start verb (and `bus recover` first for a stale lock) and exits 3. - `--no-bus` keeps the old behaviour. Inside an agent run, `org restore` refuses before any read unless `--no-bus` is given, as `archive` and `delete` do. - On a deployed or stamped instance the CLI restore refuses (exit 3, nothing changed) and names `--no-bus`, then `bus start`. The Console restore there starts the bus through the Console's own owner checks. Lead ruling: the CLI stays fail closed. - The sidebar lists a new organization after Quick Setup (org mode), and the dashboard shows the bus and System types after Restart bus or a restore, without a reload. The restore receipt is taken at mount so a failed reload cannot carry it to a later visit. - docs/TOOLS.md and the cli README list `--no-bus`. Tests: new org-restore-bus (5) and org-refresh-browser (2); agent-guard, org, org-admin and org-archive-browser extended. Each new test is red on BASE 6d0e9f89b. Lane gate 5807/0. Lead check: 42 files on 8827905ba (touched tests, every reader of the org restore, org-admin and org-create paths, the org browser files, every refusal, path, json-redaction and last-values file), 468/0. Review: build (Opus) approve, four P3; three fixed with tests, P3-2 ruled by the Lead (above). Security (daybreak-blue) approve, 0 findings: no new path lets an agent shell start a bus where the guard refuses today. Deferred: `env -i` strips the agent markers (pre-existing, agent-guard follow-up; restore reaches nothing `bus start` would refuse). Single-organization Quick Setup still reloads the page. A Console with no action log restores without starting the bus, as Restart bus does. Two untouched tests flaked under load and pass alone: dev-local-owner "dev owner entry points refuse default dev marker before startup" and workspace-failures "deadline cancels in-flight child".
jason.woltje added 2 commits 2026-11-12 02:46:17 +00:00
P1-4: org restore starts the bus as mosaic bus start ID --dev-local-owner
--detach would, and its receipt names the bus. Where that start is refused
(deployed or stamped instance, agent run) restore refuses before changing
anything; --no-bus keeps the old restore. The Console Restore action
restores and starts the bus with one receipt, and offers Restart bus when
the start fails after a good restore.

P1-5: Quick Setup refreshes the sidebar organization list, and the
organization dashboard redraws on the config event Restart bus already
dispatches, so the bus line and System types follow without a reload.
Build review P3-1, P3-3 and P3-4.
jason.woltje merged commit 8827905ba0 into refactor 2026-11-12 02:46:23 +00:00
Sign in to join this conversation.