remove-archive: a zero-service deploy outcome clones its service rows to nil, so the removal serves "services": null and the dashboard's provisioning surface throws into the display-fault boundary #1282
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#1282
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?
The failure
Drive
20260907T004410Z(provision-brands.live.spec.ts, commitd192cc9b) went green through eight legs and redded on its FIRST removal leg,remove-archive, after sitting out the whole 1200sSERVICE_REMOVE_CEILING_MS:The evidence — the removal LANDED; the dashboard died on its outcome
From the run's Playwright trace (
report/data/a9ae6ba8….zip,1-trace.trace+1-trace.network), all times UTC:01:00:55.573—POST /api/v1/provision/deploy→ 202. The untick, the REMOVES row and the plain-Deploy confirm all drove clean (app/tests/e2e/fixtures/brandreach.ts:217-275).01:01:16.675— the lastGET /api/v1/provision/devices/gateway/deploy. Its body (trace resourced9fd33cd…json) is a finished, successful removal: four stepsdone,outcome.state: "active",completed_at: 2026-09-07T01:01:16.206Z— beside"services": null.01:01:16(t=961.8s) — console:[dashboard] surface display fault TypeError: Cannot read properties of null (reading 'find')./api/v1/enroll/pending3s) stopped dead. Only the harness's ownpage.requestfleet probe kept firing.The defect
internal/provision/health.go:228(pre-fix):healthGatebuilds the rows withmake([]ServiceHealth, len(sel.Services))(internal/provision/health.go:263), so unticking a co-host's LAST service handsclone()a non-nil empty slice — andappend(nil, empty...)returns nil, not an empty slice. Every served snapshot goes through that clone (internal/provision/deploy.go:777for the streamed frame,health.go:583forActiveState), so the zero-service outcome reached the wire as"services": null.Servicesis taggedjson:"services"with noomitempty, and the dashboard declares it non-nullable (dashboard/src/lib/provision.ts:659—services: ServiceHealth[]). Sodashboard/src/components/provisioning/SetupSurface.vue:599:— optional-chained through
outcome, not throughservices— threw onnull.find.dashboard/src/components/SurfaceErrorBoundary.vue:49-53caught it exactly as designed and replaced the provisioning surface with its display-fault frame, taking[data-field="active"],[data-status="deploy-progress"]and the surface's pollers with it.waitForDeployActive(app/tests/e2e/fixtures/provision.ts:369-437) then correctly reported what it could see: no bar, no active, budget gone.ActiveScreen.vue:49already guards its card list withv-if="outcome.services.length", so an EMPTY list is the case the UI always meant to render — onlynullwas never anticipated. Seven green installs and a green founding never hit it because only a deploy whose service list ends empty reaches the nil.Suspected layer
The Go outcome producer,
internal/provision. Fixed there rather than in the dashboard: the wire contract on both sides already saysservicesis always an array, so guarding?? []in the Vue would paper over a contract violation rather than close it.Two notes on evidence gaps found while diagnosing (not fixed here, out of this commit's scope)
provision-brands.live.spec.ts:121callsinstallLegCapture(live.app, live.runDir)without the() => dashgetter that the three sibling drives carry (#1244, commitb5cb2c30). Every leg frame inartifacts/legs/is therefore the byte-identical Electron shell — md5-identical across all nine legs — and the drive keeps no picture of the dashboard at the moment of the red.waitForDeployActive's wire probe usespage.request.get(...), a Node-sideAPIRequestContextthat does not honour the ceremony browser's--host-resolver-rules. It has failedgetaddrinfo ENOTFOUNDon every poll of every one of these drives, so the diagnostic that exists precisely to separate "stuck UI" from "stuck deploy" has never once worked — the very distinction this red turned on.Proposed ruling (Ruled by the healer under ADR 0174 — veto anytime)
Two-way door, and a mechanical repair rather than a design decision. MECHANICAL: the wire contract already declares this field an array on both sides —
internal/provision/health.go:177tags itjson:"services"with noomitempty, anddashboard/src/lib/provision.ts:659types itservices: ServiceHealth[]— andActiveScreen.vue:49already renders the empty case behindv-if="outcome.services.length". Emittingnullwas never what the code meant to do;append([]T(nil), empty...)returning nil is a Go slice trap, not a decision anyone made. The fix makes the code do what it already meant. REVERTIBLE: one line,append(make([]ServiceHealth, 0, len(o.Services)), o.Services...)back toappend([]ServiceHealth(nil), o.Services...)at internal/provision/health.go:236 — a later commit reverts it with no migration, no stored state, no operator-visible trace. PROVEN BY A TEST WRITTEN HERE:TestDeploy_AZeroServiceDeployCarriesAnEmptyServicesArrayNeverNull(internal/provision/health_test.go) drives a real deploy with an empty selection and asserts the outcome'sServicesis non-nil, that it marshals as"services":[], and thatActiveStateserves the array too — it fails before the fix on the exact symptom the drive hit (outcome.Services is nil) and passes after. NO DESIGN CONTENT: no message at a trust moment, no default, no route shape, no secrets shape, no security posture; nothing a community sees changes except that the surface which used to crash now renders the P4-S5 screen it was already written to render. Rules 1 and 2 both hold: no assertion, expectation, test or leg was edited, deleted or skipped (one test was ADDED), and the commit is 3 files with 49 changed non-test lines. Built on the workstation (never the drive host) and closed through the close-report gate — the same gate a swarm worker passes.drive
20260907T004410Zred atremove-archive(sig 363b2c05fde1) — self-fixed on the fast lane, commitfe6381e364d834ce85b6f134078148ebef849351; checks: targeted (red-first):go test ./internal/provision/ -run TestDeploy_AZeroServiceDeployCarriesAnEmptyServicesArrayNeverNull -v→ FAIL before the fix (health_test.go:1060: outcome.Services is nil — an empty selection must stay an empty SLICE, not a nil one), PASS after. package:go test ./internal/provision/→ ok. consumers:go test ./internal/controlapi/→ ok. whole tree:go test ./internal/...→ every package ok, no failures.go build ./...→ clean;gofmt -l internal/provision/→ clean.. evidence:/home/swarm/swarm/Matou/idss/test-results/private-path/20260907T004410Zon matou-workstation.close-report for #1282 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope