komiti: creating a komiti before files is deployed 400s on the claim-map 404 — and the retry silently "succeeds" leaving the komiti permanently unmapped #1407
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#1407
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?
Symptom
Creating a komiti on a community that has no files service deployed yet fails:
Found by the #1373 Portal member-journey drive (
20260912T034016Zon elitebook, legportal-s1e, 17.2m in). The leg creates a komiti before co-hosting files — deliberately, because PT-S1e is the honest empty home and needs a member with nothing open to them.Cause
internal/member/komiti.goCreateKomitiwrites the files claim-map unconditionally:AddFilesKomitiClaimMap(internal/kanidm/kanidm.go:511) writes to the claim-map path of the OAuth2 clientnextcloud. That client is created by the files render (internal/clan/files.go). With files not deployed the client does not exist, kanidm answers 404, and the whole call fails.The worse half — a retry "succeeds" and leaves the komiti permanently broken
The group is created before the claim-map write, and the create is idempotent. So:
CreateKomitireturnscreated=false→return nil→ API returns success.AddFilesKomitiClaimMapis never reached.The komiti now exists, reports created, and has no ocgroups claim-map entry — so when files is later deployed, members of that komiti silently do not get files access, and nothing in the system says why. The failure is invisible from that point on.
Why it has not been seen before
Every existing journey creates komiti after a deploy (
invite-memberruns post-deploy), so the pre-deploy order was never exercised. It is a perfectly ordinary operator order though: set up your groups, then deploy your services.Suggested shape (not a ruling)
created.Repro
On a founded community with no files service:
POST /api/v1/komiti {"name":"anything"}→ 400. Then repeat the same POST → 200, and the komiti has no claim-map entry.Evidence:
test-results/drive-droplet/20260912T034016Zonelitebook-distributed-server-03; drive log/home/swarm/swarm/drive-logs/portal-1373-hand-20260912T034008Z.log.Duplicate of #1406 — closing this one. #1406 was filed at 04:03Z, four minutes before this, on the same drive (
20260912T034016Z), and is the better ticket: it carries the live kanidm journal showing the exactPOST /v1/oauth2/nextcloud/_claimmap/...404 and theno candidates match filtererror, confirms three ways that no files OAuth2 client exists on the box, and already names the same three remedies including reconciling claim-maps on deploy. It also covers the non-atomic create and the!createdearly return that hides the gap on retry.Nothing here is additive. #1373 is blocked on #1406, which is where the work is.
For the record, the drive that surfaced it was launched by hand from
elitebook-distributed-server-03at 03:40Z after clearing four separate blockers (the slug collision #1401, the wildcard claimability guardd64e3ac5, a session waiter whose process check matched its own command line, and a payload refresh that writes to a different directory than the drive reads). It reached 19 legs, 18 green, and this was the only red.