app: device-add consent calls are unguarded — a transport failure is a dead button #303

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

app/src/components/device-add/ThisComputerScreen.vue:98 and LinuxInstallModeScreen.vue:96 — both bind @click="setUp" to an async fn whose await props.gate.consent(…) is unguarded. The screens carefully render a rejection (reply.rejection → held state with check rows), but a transport failure reaching the agent gate throws past all of it: the button does nothing, no rejection row flips, no message.

Acceptance

  • A transport failure renders an error state (distinct from a policy rejection) with retry.
  • Vitest: rejecting gate ⇒ error state on both screens.

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

`app/src/components/device-add/ThisComputerScreen.vue:98` and `LinuxInstallModeScreen.vue:96` — both bind `@click="setUp"` to an async fn whose `await props.gate.consent(…)` is unguarded. The screens carefully render a *rejection* (reply.rejection → held state with check rows), but a transport failure reaching the agent gate throws past all of it: the button does nothing, no rejection row flips, no message. **Acceptance** - A transport failure renders an error state (distinct from a policy rejection) with retry. - Vitest: rejecting gate ⇒ error state on both screens. --- _Filed from the 2026-08-05 fail-loud audit (three-agent pre-production sweep; findings verified against code)._
Author
Owner

Fixed in f455d7c (on origin/main).

ThisComputerScreen.vue and LinuxInstallModeScreen.vue now wrap the gate.consent(…) attempt in useAsyncGuard. A transport failure (the gate promise rejecting) renders a distinct data-field="transport-error" block — accent-toned, separate from the warning oc-hold of a policy rejection — with a data-action="retry-set-up" Try again; the held rejection clears at the start of each attempt so a failure never leaves a stale ✕, and both set-up buttons disable while in flight.

FakeConsentGate grew an Error reply arm. Red-first Vitest per screen in app/tests/unit/consentGate.test.ts (throw ⇒ error state + retry pairs on the same code; throw-after-rejection ⇒ hold replaced by error): 13 green, vue-tsc clean.

Fixed in f455d7c (on origin/main). `ThisComputerScreen.vue` and `LinuxInstallModeScreen.vue` now wrap the `gate.consent(…)` attempt in `useAsyncGuard`. A transport failure (the gate promise rejecting) renders a distinct `data-field="transport-error"` block — accent-toned, separate from the warning `oc-hold` of a policy rejection — with a `data-action="retry-set-up"` Try again; the held rejection clears at the start of each attempt so a failure never leaves a stale ✕, and both set-up buttons disable while in flight. `FakeConsentGate` grew an `Error` reply arm. Red-first Vitest per screen in `app/tests/unit/consentGate.test.ts` (throw ⇒ error state + retry pairs on the same code; throw-after-rejection ⇒ hold replaced by error): 13 green, `vue-tsc` clean.
ben closed this issue 2026-08-06 00:23:15 +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#303
No description provided.