mint-invite: members rows:null (Go nil slice) crashes the Members surface — GOTCHA #269 #1641
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
2 participants
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#1641
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?
Verdict
verdict.json— 19 legs, 18 green, 1 red,"firstRedLeg": "mint-invite", commit3e8311cd(= repo HEAD). Everything throughoidc-adminpassed, including the 889 sdeploy-takeover.This is NOT the known frontier. The brief names pairing-never-flips (the own-VPS carrier issue) as this drive's known red, but
legs.jsonrecords{"leg": "pair", "status": "green", "ms": 3966}and"skip": 0— there are no skipped legs and no skip reasons in this run at all. The frontier did not fire; this is a new, separate red.The live box at
134.199.150.105was reachable and answered every read-only probe (systemctl --failedreturned nothing;ss -tlnpshows caddy on 443, control-plane on 8080, idss-idp on 8465). Nothing is down — this is a pure render fault.The failure
legs.json/journey.json, themint-inviteleg:The selector is not slow — it never exists.
error-context.mdshows why: the Members surface rendered its error boundary, not its content:The chrome and tab strip are fine; the whole surface below them is gone. That string is
dashboard/src/components/SurfaceErrorBoundary.vue:37.The throw
trace.zip→2-trace.tracecarries the real fault on the console, twice:The null is on the wire. The trace's captured response body for
GET /api/v1/members(200, sha904f1522…) is:and the live box reproduces it byte-for-byte right now:
The roster data itself is healthy —
GET /api/v1/idip/rosteron the same box returns a real member:and the droplet journal confirms it registered cleanly:
The defect
Three links, all verified in-tree at the drive's commit:
Producer.
internal/member/member.go:181-201—Orchestrator.Members()doesview := MembersView{}thenview.Rows = append(view.Rows, row)per ledger member. With zero non-removed members,Rowsstays a nil slice, andencoding/jsonwrites nil slices asnull, never[].Rows []Row \json:"rows"`(member.go:51) has noomitempty, so the key ships as an explicitnull`.Contract.
dashboard/src/lib/api/generated.ts:1000declaresrows: MemberRow[]— non-nullable and required. The server is violating its own generated view type.Consumer.
dashboard/src/components/members/MembersScreen.vuedereferences it unguarded —:293props.view.rows.filter((r) => r.status === 'awaiting approval'),:329const n = props.view.rows.length,:331props.view.rows.filter(...).length. These are exactly the two TypeErrors in the trace (reading 'filter'at a chained computed,reading 'length'in render).Why that kills the roster:
MembersSurface.vuecomposes<MembersScreen>at line 65 and<IdipRosterPanel v-if="idip">at line 74 — siblings inside one surface, MembersScreen first. Both sit under the singleSurfaceErrorBoundaryatDashboardComposition.vue:40. MembersScreen throws, Vue unmounts the whole subtree, and the boundary swallows the sibling roster panel with it.[data-status="idip-roster"]is therefore never in the DOM, andmintInviteInDashboard(app/tests/e2e/fixtures/idip.ts:218) burns its full 30 s ceiling on a selector that cannot appear.Rows being empty is expected here, not a bug: the journal records
member identity provider: kanidm-tier member family resting — the IDIP bridge is the identity provider on this path (IDSS_IDP_URL set, no kanidm by construction). On the IDIP path the members live on the IDIP roster, so the kanidm-tier ledger is legitimately empty. The MembersView doc-comment's invariant ("the surface is never empty — the founder is row one") holds on the kanidm path but not this one. The defect is the null encoding of that empty list plus the unguarded read, not the emptiness.Suspected layer
Product (control-plane Go + dashboard Vue). Not harness: the locator, the 30 s ceiling and the fixture are all correct, and the assertion message is accurate about what it wanted. Not infra: no failed units, all ports listening, the roster endpoint healthy.
This is a verbatim recurrence of
docs/GOTCHAS.md#269 ("A Go NIL SLICE marshals to JSONnull, not[]— the Updates surface's three empty sections arrived asnull, the screen read.lengthoff one, and the whole surface fell to the display-fault boundary"), same symptom string and all. That entry's Rule — "a Go slice that crosses the wire as a LIST must be initialised empty ([]T{}), not declared nil… a TypeScript view type that saysT[]is a promise the producer keeps" — was applied toupdates.Orchestrator.State()but the codebase was never swept for the same append-onto-nil shape elsewhere.member.Orchestrator.Members()is the one that was missed.What plugging it needs
internal/member/member.go:181—view := MembersView{Rows: []Row{}}(and checkPending, which isomitemptyso it is safe, plusPendingGroup.Memberswhich is not).json.Marshal(o.Members())on an empty ledger must contain"rows":[]. Existing unit tests never caught this because they build fixtures by hand —dashboard/tests/unit/membersLive.test.ts:104uses a literal array and never marshals, and there is norows: nullcase anywhere indashboard/testsorinternal/.MembersScreen.vue:293/329/331should readprops.view.rows ?? [].Secondary, and not required to clear this leg: whether the Members surface should mirror the IDIP roster's members on the IDIP path (today it shows an empty list beside a populated roster panel) is a design question, not part of this fix.
drive
20260919T230228Zred atmint-invite:the IDIP roster panel must compose on the IDIP path expect(locator).toBeVisible() failed Locator: locator('[data-status="idip-roster"]') Expected: visible Timeout: 30000ms Error: element(s) not foundevidence:
/home/swarm/session-runner/idss/test-results/drive-idip/20260919T230228Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedClaimed by Ben's session (the hand debug IDIP drive is blocked on this). Fixing test-first:
Rowsinitialised empty + a marshalled-JSON assertion, thePendingGroup.Memberscheck, and the consumer guards inMembersScreen.vue/ the Overview members column. The orchestrator sweep (item 4) is NOT in this fix.Fixed in
2e89fac7:MembersView{Rows: []Row{}}with a red-first seam test on the MARSHALLED bytes, andHttpMembersClient.members()readsrows ?? [](red-first unit test replaying the live gateway's reply).PendingGroup.Membersis always built with at least one row, so it is safe. GOTCHAS #269 carries the recurrence. Not done here: the orchestrator sweep (item 4) — still owed. Seam-proven; the next debug IDIP fire proves it live.