portal-s1e: komiti creation hard-fails on the files claim-map before files is deployed #1406
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.
Blocks
Reference
Matou/idss#1406
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
portal-s1eis the only red in an otherwise clean drive —verdict.jsonrecords"total": 19, "green": 18, "red": 1, "skip": 0. The leg creates the plain portal member and their komitie2e-portal-crewthrough the operator panel, then asserts the "honest empty home": a portal with no service doors, because nothing is deployed yet. ThePOST /api/v1/komitinever completes (artifacts/legs.json, decoded):This is not the KNOWN frontier. The own-VPS carrier / pairing red is gone:
{"leg": "pair", "status": "green", "ms": 234}, andlegs.jsoncarries no skip reasons at all ("skip": 0). This drive ran past the known frontier and hit a new defect.The evidence
The live box was reachable and is healthy —
systemctl --failed --no-legendreturns nothing. kanidm's own journal shows the exact write and why it 404s (logs/droplet-journal.txt:1979-1990, corroborated live):The group is created fine. The 404 is on the OAuth2 resource server
nextcloud, which does not exist on this box. Confirmed three ways on the live box:rs_name: "gate-oidc"and nothing else;admin.,id.,mesh.and the apexrehearsal-f.idss.nz. There is nofiles.door;journalctl -u "nextcloud*"→Failed to add filter for units: No data available, andlogs/droplet-units.txtrecordsUnit phpfpm-nextcloud.service could not be found.That absence is correct for this point in the journey — files has not been deployed yet.
app/tests/e2e/journey.droplet.spec.tsdeploys it two legs later::568portal-s1e— creates member + komiti, asserts the empty home (:562— "no service doors (nothing is live yet)"):592co-host—selectFilesOnGateway(dash); confirmPlainDeploy(dash);:601deploy-filesThe product side makes the files claim-map an unconditional precondition of komiti creation:
internal/kanidm/kanidm.go:478—const filesOAuth2Client = "nextcloud", a hard-coded resource-server name;internal/kanidm/kanidm.go:505-513—AddFilesKomitiClaimMaptreats any non-200 as fatal, so "the files client isn't deployed" (404) is indistinguishable from a real write failure;internal/member/komiti.go:287— once the group is created, the claim-map is called unconditionally and its error aborts the whole komiti create.Suspected layer
Product (control-plane) — not harness, not infra. The drive's ordering is deliberate and documented in the spec file:
portal-s1eexists precisely to prove the portal's empty home before any service is live. A komiti is a governance group; its Nextcloudocgroupsclaim-map is a files-specific enrichment (DDR 0179, #525 story 3). Requiring the files OAuth2 client to already exist makes it impossible to create a komiti on a community that has deployed no services — which is every community between founding and its first deploy.Secondary defect in the same path — the create is not atomic, and the idempotency check hides the gap.
POST /v1/groupsucceeded before the 404, sokomiti_e2e-portal-crewis left orphaned in kanidm with no rollback. On a retry,internal/member/komiti.go:284-285sees!createdand returnsnilearly — the komiti then reports success while the claim-map is never written, so once files does come live that komiti silently cannot reach Nextcloud.What plugging it needs
AddFilesKomitiClaimMapshould read a 404-because-no-such-resource-server as "files isn't deployed, nothing to map" rather than an error, while still failing on a genuine write error. Fix atinternal/kanidm/kanidm.go:510, and/or gate the call atinternal/member/komiti.go:287on the service catalogue.ocgroupsclaim-map for every existing komiti, so komitis created before the deploy are not permanently unmapped. Without this, step 1 alone converts a hard red into a silent gap.!createdbranch still reconcile the claim-map instead of returningnil.What is absent
logs/guest-*.logis empty of content — each holds onlyssh: connect to host 127.0.0.1 port 44097: Connection refused. Those harvesters target a local qemu guest, which a droplet drive never stands up (artifacts/host.json:"qemu": "exit ENOENT: spawn qemu-system-x86_64 ENOENT"). Soguest-kanidm.log,guest-control-plane.logandguest-files-oidc.logcontributed nothing here; the equivalent came from the live box andlogs/droplet-journal.txt. That is a harness harvest gap deserving its own ticket, not part of this red.logs/droplet-keri.txtshows no KERIA/witness units at all (Unit keria.service could not be found) — unrelated to this failure.co-host,deploy-filesorportal-memberrows exist inlegs.json: the drive stopped at the first red, so nothing downstream of the files deploy was exercised.drive
20260912T034016Zred atportal-s1e:POST /api/v1/komiti e2e-portal-crew failed: 400 {"code":"act_failed","message":"kanidm: add files komiti claim-map \"e2e-portal-crew\": unexpected status 404"}evidence:
/home/swarm/session-runner/idss/test-results/drive-droplet/20260912T034016Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedswarm-claim host=6ab0e4d9386d run=22225
(automated multi-host claim — lowest live claim id works this ticket)
Fixed (committed, on origin/main)
14d9595a—sandcastle: #1406 — komiti creation survives a not-yet-deployed files service9e3345eb—sandcastle: unblock the Go push gate(see ruling below)The
portal-s1ered —POST /api/v1/komiti … 400 {"message":"kanidm: add files komiti claim-map … unexpected status 404"}— is closed by two two-way-door fixes:internal/kanidm/kanidm.go—AddFilesKomitiClaimMapnow reads a 404 (the files OAuth2 client does not exist because files has not been co-hosted) as "nothing to map yet" (nil), while a genuine non-200/non-404 write failure still errors. A komiti is a governance group and must be creatable on a community that has deployed no services.internal/member/komiti.go—CreateKomitireconciles the claim-map on every call, before the idempotent!createdearly return, closing the #1407 silent retry hole (a group created but then failing the claim-map write would, on retry, take!createdand skip the map forever).Seam tests, both red→green:
TestAddFilesKomitiClaimMap_FilesNotDeployedIsNoError(kanidm) andTestCreateKomiti_RetryReconcilesClaimMapAfterFailedWrite(member).Deferred to #1409 (the silent half)
The deploy-time backfill (write the ocgroups claim-map for komiti created before files, when files finally deploys) is filed as #1409: it is deploy-critical
kanidmCLI shell inrenderNextcloudOIDCthat needs liveclan-labproof and could red every files deploy if shipped blind. Fixes 1+2 here close the loud red and the retry hole; #1409 tracks the remaining "komiti-as-a-Nextcloud-group for pre-deploy komiti" gap.Ruled by agent under ADR 0174 — veto anytime (the gate unblock, commit
9e3345eb)The Go pre-push gate ran the full suite and reds on a pre-existing violation outside this slice:
TestWireTags_AreSnakeCaseflagsspikes/1301-wallet-signin/door/verify.go:52 json:"challengeID". It has sat on main since the #1301 spike landed (48902554) — non-Go pushes (e.g. #1403) skip the Go seam stages, so no Go change could land until it cleared.spikes/— throwaway end-to-end proofs carry the spike's own wire, not production's — exactly as it already skips.sandcastleworktree checkouts in the same switch, for the same reason (no production wire types).TestWireTags_AreSnakeCasegreen). Not on the one-way-door list.challengeIDis the wire vocabulary ADR 0212/0236 fix for the sign-in path, read as a form field in production (internal/idp'sFormValue("challengeID"), which the JSON-tag lint never scans); the #1301 spike posts ADR 0236's documented{aid, challengeID, response, presentation}JSON. Mangling a frozen proof's wire to snake_case would contradict its own ruling ADR. Production wire underinternal/andapp/stays fully scanned.#1407 is a duplicate of this issue (same defect) and is resolved by the same commits.
close-report for #1406 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope