dashboard: SetupSurface's entire deploy journey is unguarded — a failed deploy silently returns to Assess or freezes the deploy screen #297

Closed
opened 2026-08-05 23:10:52 +00:00 by ben · 1 comment
Owner

dashboard/src/components/provisioning/SetupSurface.vue has no error ref anywhere; every seam call is unguarded. The documented idiom exists (packages/ui-kit/src/asyncGuard.ts, used by 6 components):

  • :204 runDeploy sets view.value = 'deploy' before awaiting props.source.deploy(…). A rejection before any frame streams leaves deployRun null, the final v-else branch wins, and the operator is dropped back on Assess/Select as though they never clicked Confirm. If frames streamed first, DeployScreen freezes on the last frame forever.
  • :137 onMounted(reload) — a failed assess leaves assessment null: blank pane after clicking "set up" on a fleet row.
  • :159 onRoleChange, :167 onReviewImpact, :217 onRetryService, :246 onResumeDeploy — dead buttons on rejection (unhandled promise, nothing changes on screen).

Acceptance

  • Every seam call routes through the async-guard idiom (or equivalent error ref) with a rendered error state + retry; a deploy rejection renders a failed-deploy state, never a silent bounce to Assess or a frozen frame.
  • Vitest per failure path.

Filed from the 2026-08-05 fail-loud audit (three-agent pre-production sweep; findings verified against code).

`dashboard/src/components/provisioning/SetupSurface.vue` has no error ref anywhere; every seam call is unguarded. The documented idiom exists (`packages/ui-kit/src/asyncGuard.ts`, used by 6 components): - **:204** `runDeploy` sets `view.value = 'deploy'` **before** awaiting `props.source.deploy(…)`. A rejection before any frame streams leaves `deployRun` null, the final `v-else` branch wins, and the operator is dropped back on Assess/Select as though they never clicked Confirm. If frames streamed first, DeployScreen freezes on the last frame forever. - **:137** `onMounted(reload)` — a failed assess leaves `assessment` null: blank pane after clicking "set up" on a fleet row. - **:159** onRoleChange, **:167** onReviewImpact, **:217** onRetryService, **:246** onResumeDeploy — dead buttons on rejection (unhandled promise, nothing changes on screen). **Acceptance** - Every seam call routes through the async-guard idiom (or equivalent error ref) with a rendered error state + retry; a deploy rejection renders a failed-deploy state, never a silent bounce to Assess or a frozen frame. - Vitest per failure path. --- _Filed from the 2026-08-05 fail-loud audit (three-agent pre-production sweep; findings verified against code)._
Author
Owner

Fixed in main 55b3e24.

SetupSurface.vue now routes every seam call through the async-guard idiom (useAsyncGuard + shared OcErrorState):

  • Deploy (the S4 hazard): the setup screens are gated behind view==="setup" (was the catch-all v-else), and runDeploy short-circuits on error before routing. A deploy rejection before any frame no longer bounces to Assess/Select — it keeps the surface on deploy and renders the failed-deploy state (data-status="setup-error") with a Try again that re-runs the deploy; a rejection after frames stream renders the same error over the checklist instead of a frozen last frame.
  • First assess (onMounted): a failure renders data-status="setup-unreachable" with a retry that re-reads — never the blank pane.
  • onRoleChange / onReviewImpact / onRetryService: each runs behind the guard and short-circuits before navigating; a failure renders setup-error beside the screen it acted on, never a dead button.

Vitest per failure path: dashboard/tests/unit/provisionSetupGuard.test.ts (8 tests, incl. reject-before-frames, reject-after-frames, and a Try-again that re-runs the deploy and lands Active). Full dashboard suite 961 green, vue-tsc clean.

Fixed in main `55b3e24`. `SetupSurface.vue` now routes every seam call through the async-guard idiom (`useAsyncGuard` + shared `OcErrorState`): - **Deploy (the S4 hazard):** the setup screens are gated behind `view==="setup"` (was the catch-all `v-else`), and `runDeploy` short-circuits on `error` before routing. A deploy rejection **before** any frame no longer bounces to Assess/Select — it keeps the surface on `deploy` and renders the failed-deploy state (`data-status="setup-error"`) with a Try again that re-runs the deploy; a rejection **after** frames stream renders the same error over the checklist instead of a frozen last frame. - **First assess** (`onMounted`): a failure renders `data-status="setup-unreachable"` with a retry that re-reads — never the blank pane. - **onRoleChange / onReviewImpact / onRetryService:** each runs behind the guard and short-circuits before navigating; a failure renders `setup-error` beside the screen it acted on, never a dead button. Vitest per failure path: `dashboard/tests/unit/provisionSetupGuard.test.ts` (8 tests, incl. reject-before-frames, reject-after-frames, and a Try-again that re-runs the deploy and lands Active). Full dashboard suite 961 green, `vue-tsc` clean.
ben closed this issue 2026-08-06 01:05:25 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#297
No description provided.