founding: BUILD IT should hand the community over past a device fault (DDR 0241 dec 4), not gate the finish (#1417 reconciliation) #1461
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1461
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 atdeployingand the hand-off never opens while a machine is faulted. Its testTestRunJourneyDevicesAndFinish_FaultGatesTheHandoffpins that.#1448 built the S12 hand-off to name the whole fleet including a
failedmachine (DDR 0241 dec 4;buildFleetrenders one honestly), and its AC2 is proven at theBeginHandOffseam over a constructed faulted-seeded state. But because #1417 gates the finish, a REAL build never reaches the hand-off carrying afailedmachine — so the failed-machine card, though built and tested, is unreachable end-to-end today.What to build
Reconcile
runJourneyDevicesAndFinishwith 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 inStandup.DeviceFaults, and proceeds to finish (seed + hand-off) — the hand-off names the failed machine as a red card (already supported bybuildFleet/FleetMachine.status="failed"), and the operator re-adds it from P4.Update
TestRunJourneyDevicesAndFinish_FaultGatesTheHandoffand the fake'sdeviceFailsAtbehaviour (app/src/lib/founding.ts— today it stops at a whole-standupfault) 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
StandupHandOff, with the gatewayliveand the faulted machinefailedinhandOff.fleet.deviceFailsAtdrives 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).
Triage:
bug+ready-for-agentCategory —
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'sfailed-machine card (FleetMachine.Status="failed",buildFleetininternal/founding/handoff.go) specifically to name it. But #1417's gate atinternal/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):
deviceprovision.go:315-325,runJourneyDevicesAndFinishreturns early whenDeviceFaultsis non-empty, with a doc comment citing the other reading of DDR 0241 dec 3.TestRunJourneyDevicesAndFinish_FaultGatesTheHandoff(deviceprovision_internal_test.go:256).FleetMachineFailed = "failed"andFleetMachine.Fault(handoff.go:289,322); #1448's close report (STATUS.md) flagged this reconciliation as a#1417-side follow-up.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
runJourneyDevicesAndFinishproceeds to finish (seed + hand-off) even whenStandup.DeviceFaultsis non-empty, standing the gateway and every reachable machine up and naming the faulted machine as afailedcard inhandOff.fleet. Routeready-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
failedcard 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, gatewaylive, machinefailed), 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'sdeviceFailsAt).Agent brief
Change: in
internal/founding/deviceprovision.go,runJourneyDevicesAndFinish— drop theif 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) sorunJourneyFinish(ctx)runs regardless of per-device faults. KeeprunDeviceProvisioning'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):
TestRunJourneyDevicesAndFinish_FaultGatesTheHandoffto the new semantics (a fault no longer gates the hand-off) — AC1/AC2.StandupHandOffwith the gatewayliveand the faulted machineFleetMachineFailedinhandOff.fleet; the gateway and any other stood-up machine stay standing.deviceFailsAtbehaviour inapp/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; appvue-tsc+ the founding vitest suites + eslint green. UpdateSTATUS.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).swarm-claim host=matou-dev-server-01 run=22681
(automated multi-host claim — lowest live claim id works this ticket)