add-member: the by-hand create sends kanidm a person with no displayname — a MUST attribute of its person class — so P6-S2 can never land a member on a real box #1560
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#1560
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
20260917T025557Z(targetrented-services) went red at legadd-member, 868 ms in, after 27 green legs (artifacts/legs.json,artifacts/verdict.json—firstRedLeg: add-member, commit1c52085a). The fault the harness recorded:The evidence
The seam's refusal rendered in the dialog and the fixture quoted it verbatim —
app/tests/e2e/fixtures/panelMembers.ts:80-84(frame:artifacts/roles/add-member-proof-member-refused.png). kanidm says why, in its own words —logs/droplet-journal.txt:1994-1995:The preceding
GET /v1/person/proof-memberanswered 200-with-null (the idempotency probe, correctly reading absence —logs/droplet-journal.txt:1985), thenPOST /v1/person→ 400 (:1990).The chain, in the checkout:
docs/ux/wireframes/p6-members/p6-s2-invite.html:29— the by-hand path is "a username + temporary password" and nothing else. The UI is per contract:dashboard/src/components/members/InviteScreen.vue:128-146offers exactly those two inputs.internal/member/byhand.go:15-24—ByHandSpec's own doc calls the display name optional;:75-80passes it straight through.internal/kanidm/kanidm.go:635-639(createEntity) — omitsdisplaynamefrom the POST body entirely when it is empty. Real kanidm's person class makes it a MUST attribute, so the entity is unconstructable.add-memberis a new leg (#1547) and this was its first reach past the dialog — the previous red on this signature died earlier, at the locator. The defect has been latent since the by-hand path was written.The suspected layer — and why it shipped
The adapter (
internal/kanidm), plus the fixture that hid it: the in-process double atinternal/kanidm/fakekanidm_test.go:263accepted a person with no display name, so every adapter contract test passed against a server the real one does not resemble. The double is documented as "a faithful kanidm REST DOUBLE" — here it was not faithful.The fix
internal/kanidm/fakekanidm_test.go— the double now refuses a person create with nodisplaynamewith a 400, exactly as kanidm does, citing this drive.internal/kanidm/kanidm.go— newdisplayNameOrhelper; both person-create verbs (CreatePerson,CreatePendingPerson) fall back to the account name.internal/kanidm/kanidm_test.go— two new tests, one per verb.Proposed ruling (Ruled by the healer under ADR 0174 — veto anytime)
Two-way door. The whole product-code change is one 5-line pure helper (
displayNameOr) and two call sites that now passdisplayNameOr(spec.DisplayName, spec.Username)instead ofspec.DisplayName—git revert ff35660restores the previous bytes exactly. No schema, no dependency, no secrets, no route, no infra state; nothing outside this checkout.Proven by a test written here, red first.
TestCreatePerson_NoDisplayName_FallsBackToTheAccountNameandTestCreatePendingPerson_NoDisplayName_FallsBackToTheAccountName(internal/kanidm/kanidm_test.go) fail before the fix with the drive's error string verbatim —kanidm: create person "proof-member": unexpected status 400— once the double is made faithful to kanidm's MUST attribute, and pass after.Mechanical repair, not a design decision. It changes nothing a community sees. The member list already falls back to the person id when the idp carries no name —
Name: m.PersonID, // fall back to the id if the idp has no name (never a dead end)(internal/member/member.go:188), and the same fallback repeats indetail.go:223,komiti.go:240,removal.go:600,signup.go:297,reset.go:291. Writingdisplayname = <account name>at create time therefore renders the identical string; the only difference is that kanidm's schema is satisfied and the create lands instead of being refused. No message at a trust moment changes, no default posture changes, no new field is asked of an operator — the wireframe contract (username + temporary password, nothing else) is preserved, which is precisely why the adapter must own kanidm's schema rather than push a name-collection field back onto P6-S2. The alternative reading — ask the operator for a display name — would be the design decision; this is not it. Built on the workstation (never the drive host) and closed through the close-report gate — the same gate a swarm worker passes.drive
20260917T025557Zred atadd-member(sig e5567d778c73) — self-fixed on the fast lane, commit7da8ab07bfbe11d8a9322470e255cf6724cae676; checks: Targeted (red-first):GOWORK=/home/dev/rehearsal-heal/idss/go.work go test ./internal/kanidm -run 'TestCreatePerson_NoDisplayName_FallsBackToTheAccountName|TestCreatePendingPerson_NoDisplayName_FallsBackToTheAccountName'— RED before the fix, reproducing the drive's exact error (CreatePerson(no display name) = (…, created false, kanidm: create person "proof-member": unexpected status 400), want created; same forperson-7), thenok git.matou.nz/Matou/idss/internal/kanidm 0.011safter. Package tests:GOWORK=… go test ./internal/kanidm ./internal/member ./internal/controlapi—ok internal/kanidm 0.158s,ok internal/member 0.248s,ok internal/controlapi 0.732s, all green.gofmt -l internal/kanidm/clean;go vet ./internal/kanidmclean. Diff: 3 files, 73 insertions / 2 deletions — the only 2 removed lines are the twocreateEntitycall sites; no assertion or test touched. The live leg needs a rented droplet and re-proves on the next drive.. evidence:/home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260917T025557Zon matou-workstation.close-report for #1560 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope