founding: BUILD IT should hand the community over past a device fault (DDR 0241 dec 4), not gate the finish (#1417 reconciliation) #1461

Closed
opened 2026-09-12 21:59:11 +00:00 by matou-build-agent · 2 comments

Why

DDR 0241 decision 4: "Build it runs to completion or fails loudly; a device that cannot be provisioned fails that device's rows and leaves the rest of the build standing" — i.e. the community IS handed over, and the failed device is added later from the control panel (P4).

#1417's runJourneyDevicesAndFinish (internal/founding/deviceprovision.go) instead gates the finish on a device fault: if len(s.Standup.DeviceFaults) > 0 { return } — so the stand-up rests at deploying and the hand-off never opens while a machine is faulted. Its test TestRunJourneyDevicesAndFinish_FaultGatesTheHandoff pins that.

#1448 built the S12 hand-off to name the whole fleet including a failed machine (DDR 0241 dec 4; buildFleet renders one honestly), and its AC2 is proven at the BeginHandOff seam over a constructed faulted-seeded state. But because #1417 gates the finish, a REAL build never reaches the hand-off carrying a failed machine — so the failed-machine card, though built and tested, is unreachable end-to-end today.

What to build

Reconcile runJourneyDevicesAndFinish with DDR 0241 decision 4: a device fault should NOT halt the hand-off. The build stands the gateway + every reachable machine up, records the faulted machine in Standup.DeviceFaults, and proceeds to finish (seed + hand-off) — the hand-off names the failed machine as a red card (already supported by buildFleet / FleetMachine.status="failed"), and the operator re-adds it from P4.

Update TestRunJourneyDevicesAndFinish_FaultGatesTheHandoff and the fake's deviceFailsAt behaviour (app/src/lib/founding.ts — today it stops at a whole-standup fault) to the new semantics, and add an end-to-end test that a build with one faulted machine reaches the hand-off with that machine drawn failed.

Acceptance criteria

  • AC1 — a rented/own-vps/private build whose ONE added machine's leg fails still reaches StandupHandOff, with the gateway live and the faulted machine failed in handOff.fleet.
  • AC2 — the gateway and every machine that DID stand up stay standing; nothing is torn down (ADR 0047 per device).
  • AC3 — the S12 screen draws the failed machine's card (no RUNNING pills, its fault shown) — the TS fake's deviceFailsAt drives it end-to-end through the page.

Contract

DDR 0241 decisions 3–4; ADR 0047/0100; #1417 (the gate); #1448 (the fleet seam + screen that already renders failed).

Found while building #1448 (the hand-off fleet seam).

## Why DDR 0241 decision 4: *"Build it runs to completion or fails loudly; a device that cannot be provisioned fails **that device's** rows and leaves the rest of the build standing"* — i.e. the community IS handed over, and the failed device is added later from the control panel (P4). #1417's `runJourneyDevicesAndFinish` (`internal/founding/deviceprovision.go`) instead **gates** the finish on a device fault: `if len(s.Standup.DeviceFaults) > 0 { return }` — so the stand-up rests at `deploying` and the hand-off never opens while a machine is faulted. Its test `TestRunJourneyDevicesAndFinish_FaultGatesTheHandoff` pins that. #1448 built the S12 hand-off to name the whole fleet including a `failed` machine (DDR 0241 dec 4; `buildFleet` renders one honestly), and its AC2 is proven at the `BeginHandOff` seam over a constructed faulted-seeded state. But because #1417 gates the finish, a REAL build never reaches the hand-off carrying a `failed` machine — so the failed-machine card, though built and tested, is unreachable end-to-end today. ## What to build Reconcile `runJourneyDevicesAndFinish` with DDR 0241 decision 4: a device fault should NOT halt the hand-off. The build stands the gateway + every reachable machine up, records the faulted machine in `Standup.DeviceFaults`, and **proceeds to finish (seed + hand-off)** — the hand-off names the failed machine as a red card (already supported by `buildFleet` / `FleetMachine.status="failed"`), and the operator re-adds it from P4. Update `TestRunJourneyDevicesAndFinish_FaultGatesTheHandoff` and the fake's `deviceFailsAt` behaviour (`app/src/lib/founding.ts` — today it stops at a whole-standup `fault`) to the new semantics, and add an end-to-end test that a build with one faulted machine reaches the hand-off with that machine drawn failed. ## Acceptance criteria - AC1 — a rented/own-vps/private build whose ONE added machine's leg fails still reaches `StandupHandOff`, with the gateway `live` and the faulted machine `failed` in `handOff.fleet`. - AC2 — the gateway and every machine that DID stand up stay standing; nothing is torn down (ADR 0047 per device). - AC3 — the S12 screen draws the failed machine's card (no RUNNING pills, its fault shown) — the TS fake's `deviceFailsAt` drives it end-to-end through the page. ## Contract DDR 0241 decisions 3–4; ADR 0047/0100; #1417 (the gate); #1448 (the fleet seam + screen that already renders `failed`). Found while building #1448 (the hand-off fleet seam).
Author
Member

This was generated by AI during triage.

Triage: bug + ready-for-agent

Category — bug. The code contradicts its authoritative design contract. DDR 0241 decision 4 rules that "a device that cannot be provisioned fails that device's rows and leaves the rest of the build standing," and #1448 already shipped the S12 hand-off's failed-machine card (FleetMachine.Status="failed", buildFleet in internal/founding/handoff.go) specifically to name it. But #1417's gate at internal/founding/deviceprovision.go:321 (if len(s.Standup.DeviceFaults) > 0 { return }) halts the finish on any fault, so a real build never reaches the hand-off carrying a failed machine — the shipped card is unreachable end-to-end. Code diverges from the decision it was meant to satisfy → a defect, not a new feature.

Claim verified (no grilling needed):

  • The gate exists exactly as reported — deviceprovision.go:315-325, runJourneyDevicesAndFinish returns early when DeviceFaults is non-empty, with a doc comment citing the other reading of DDR 0241 dec 3.
  • The pinning test exists — TestRunJourneyDevicesAndFinish_FaultGatesTheHandoff (deviceprovision_internal_test.go:256).
  • The failed-card seam exists — FleetMachineFailed = "failed" and FleetMachine.Fault (handoff.go:289,322); #1448's close report (STATUS.md) flagged this reconciliation as a #1417-side follow-up.
  • The TS fake hook exists — deviceFailsAt (app/src/lib/founding.ts:2899, consumed at :4584).

Ruled by agent under ADR 0174 — veto anytime

Ruling: reconcile in the direction the issue states — remove the fault gate so runJourneyDevicesAndFinish proceeds to finish (seed + hand-off) even when Standup.DeviceFaults is non-empty, standing the gateway and every reachable machine up and naming the faulted machine as a failed card in handOff.fleet. Route ready-for-agent.

Why a two-way door: it flips one early-return condition (revertible by a one-line commit with zero product loss — the fallback is today's gate) and is proven by the three ACs below at the Go seam and through the TS fake. It touches none of the one-way-door list: no credentials, no security-posture widening, no member-facing trust accept, no data destruction, no spend. DDR 0241 dec 4 is the authoritative source and #1448's already-built failed card only becomes reachable under this reading, so the direction is not in genuine doubt.

What proves it: AC1 (a build whose one added machine's leg fails still reaches StandupHandOff, gateway live, machine failed), AC2 (gateway + stood-up machines stay standing, nothing torn down — ADR 0047 per device), AC3 (the S12 screen draws the failed card end-to-end via the fake's deviceFailsAt).

Agent brief

Change: in internal/founding/deviceprovision.go, runJourneyDevicesAndFinish — drop the if len(s.Standup.DeviceFaults) > 0 { return } gate (and fix the stale doc comment on the func, which still asserts the finish is withheld on a fault) so runJourneyFinish(ctx) runs regardless of per-device faults. Keep runDeviceProvisioning's per-device fault isolation untouched (a faulted machine still reds only its own rows and the machine stays resumable via re-drive).

Tests (red→green):

  • Rewrite TestRunJourneyDevicesAndFinish_FaultGatesTheHandoff to the new semantics (a fault no longer gates the hand-off) — AC1/AC2.
  • Add a Go seam test: a rented/own-vps/private build with one faulted added machine reaches StandupHandOff with the gateway live and the faulted machine FleetMachineFailed in handOff.fleet; the gateway and any other stood-up machine stay standing.
  • Update the TS fake's deviceFailsAt behaviour in app/src/lib/founding.ts (today it stops at a whole-standup fault) so a scripted per-device failure drives the page through to the hand-off, and add/adjust a founding vitest that the S12 screen draws the failed machine's card (no RUNNING pills, its fault shown) — AC3.

Verify: go build ./... && go test ./internal/founding/ green; app vue-tsc + the founding vitest suites + eslint green. Update STATUS.md (header line + milestone log) in the same commit per CLAUDE.md.

Contract: DDR 0241 decisions 3-4; ADR 0047/0100; #1417 (the gate); #1448 (the fleet seam + screen that already renders failed).

> *This was generated by AI during triage.* ## Triage: `bug` + `ready-for-agent` **Category — `bug`.** The code contradicts its authoritative design contract. DDR 0241 decision 4 rules that "a device that cannot be provisioned fails **that device's** rows and **leaves the rest of the build standing**," and #1448 already shipped the S12 hand-off's `failed`-machine card (`FleetMachine.Status="failed"`, `buildFleet` in `internal/founding/handoff.go`) specifically to name it. But #1417's gate at `internal/founding/deviceprovision.go:321` (`if len(s.Standup.DeviceFaults) > 0 { return }`) halts the finish on any fault, so a real build never reaches the hand-off carrying a failed machine — the shipped card is unreachable end-to-end. Code diverges from the decision it was meant to satisfy → a defect, not a new feature. **Claim verified (no grilling needed):** - The gate exists exactly as reported — `deviceprovision.go:315-325`, `runJourneyDevicesAndFinish` returns early when `DeviceFaults` is non-empty, with a doc comment citing the *other* reading of DDR 0241 dec 3. - The pinning test exists — `TestRunJourneyDevicesAndFinish_FaultGatesTheHandoff` (`deviceprovision_internal_test.go:256`). - The failed-card seam exists — `FleetMachineFailed = "failed"` and `FleetMachine.Fault` (`handoff.go:289,322`); #1448's close report (STATUS.md) flagged this reconciliation as a `#1417`-side follow-up. - The TS fake hook exists — `deviceFailsAt` (`app/src/lib/founding.ts:2899`, consumed at `:4584`). ## Ruled by agent under ADR 0174 — veto anytime **Ruling:** reconcile in the direction the issue states — **remove the fault gate** so `runJourneyDevicesAndFinish` proceeds to finish (seed + hand-off) even when `Standup.DeviceFaults` is non-empty, standing the gateway and every reachable machine up and naming the faulted machine as a `failed` card in `handOff.fleet`. Route `ready-for-agent`. **Why a two-way door:** it flips one early-return condition (revertible by a one-line commit with zero product loss — the fallback is today's gate) and is proven by the three ACs below at the Go seam and through the TS fake. It touches none of the one-way-door list: no credentials, no security-posture widening, no member-facing trust accept, no data destruction, no spend. DDR 0241 dec 4 is the authoritative source and #1448's already-built `failed` card only becomes reachable under this reading, so the direction is not in genuine doubt. **What proves it:** AC1 (a build whose one added machine's leg fails still reaches `StandupHandOff`, gateway `live`, machine `failed`), AC2 (gateway + stood-up machines stay standing, nothing torn down — ADR 0047 per device), AC3 (the S12 screen draws the failed card end-to-end via the fake's `deviceFailsAt`). ## Agent brief **Change:** in `internal/founding/deviceprovision.go`, `runJourneyDevicesAndFinish` — drop the `if len(s.Standup.DeviceFaults) > 0 { return }` gate (and fix the stale doc comment on the func, which still asserts the finish is withheld on a fault) so `runJourneyFinish(ctx)` runs regardless of per-device faults. Keep `runDeviceProvisioning`'s per-device fault isolation untouched (a faulted machine still reds only its own rows and the machine stays resumable via re-drive). **Tests (red→green):** - Rewrite `TestRunJourneyDevicesAndFinish_FaultGatesTheHandoff` to the new semantics (a fault no longer gates the hand-off) — AC1/AC2. - Add a Go seam test: a rented/own-vps/private build with one faulted added machine reaches `StandupHandOff` with the gateway `live` and the faulted machine `FleetMachineFailed` in `handOff.fleet`; the gateway and any other stood-up machine stay standing. - Update the TS fake's `deviceFailsAt` behaviour in `app/src/lib/founding.ts` (today it stops at a whole-standup fault) so a scripted per-device failure drives the page through to the hand-off, and add/adjust a founding vitest that the S12 screen draws the failed machine's card (no RUNNING pills, its fault shown) — AC3. **Verify:** `go build ./... && go test ./internal/founding/` green; app `vue-tsc` + the founding vitest suites + eslint green. Update `STATUS.md` (header line + milestone log) in the same commit per CLAUDE.md. **Contract:** DDR 0241 decisions 3-4; ADR 0047/0100; #1417 (the gate); #1448 (the fleet seam + screen that already renders `failed`).
Author
Member

swarm-claim host=matou-dev-server-01 run=22681
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=22681 (automated multi-host claim — lowest live claim id works this ticket)
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#1461
No description provided.