files-member tail: e2e member-tier drive (story 11) + live-probe the ocgroups claim-map reconciler (DDR 0179) #584

Closed
opened 2026-08-15 08:23:53 +00:00 by ben · 2 comments
Owner

Parent / provenance

Carried-forward tail of #525 (itself a follow-up tail of #514, DDR 0173), which
landed the two-way-door parts of #525's four stories on origin/main:

  • Story 9 (private-path stated-limit honest copy) and story 6 (awaiting-approval
    really cannot authenticate — proven with a real /v1/auth password conversation, not
    just an account_expire attribute read) — commit sandcastle: #525 story 9 private-path stated-limit + story 6 real-auth proof for awaiting-approval.
  • Story 3 (komiti→Nextcloud-group materialisation) — RULED under ADR 0174 (design-tier
    accept) as DDR 0179: a new member.FilesKomitiClaimMapPort
    (internal/kanidm.Adapter.{Add,Remove}FilesKomitiClaimMap) writes a per-komiti
    ocgroups claim-map entry on the files OAuth2 client at komiti create/rename/delete —
    commit sandcastle: #525 story 3 — DDR 0179 rules komiti→Nextcloud-group materialisation, reconciler verb built.

#525 is CLOSED in this ticket's favour (its close-report names this carry-forward, ADR
0174 rule closing a ticket whose two-way-door parts are done and whose remainder is its
own session-worthy live-lab thread — the #514→#525 precedent repeated).

What's carried forward

1. Live-probe DDR 0179's kanidm REST wire shape

AddFilesKomitiClaimMap/RemoveFilesKomitiClaimMap drive
POST/DELETE /v1/oauth2/{rs_name}/_claimmap/{claim_name}/{group} — researched from
kanidm master's source (server/core/src/https/v1_oauth2.rs), never exercised against a
real kanidm.
This is exactly the risk class #580 was (a body/wire-shape assumption that
only 500s live): pinned today by a contract-test double
(internal/kanidm/kanidm_test.go's TestFilesKomitiClaimMap_AddAndRemove), which is
faithful-by-construction, not faithful-by-proof. Needs a smoke-idp-style leg (or an
extension of the existing family-4 smoke, issue #178) run against a real kanidm on the
clan-lab, asserting:

  • the REST call succeeds (right method/path/body against real kanidm, not just the double);
  • a real Nextcloud user_oidc actually resolves the claim-mapped komiti into a Nextcloud
    group once a member with that komiti signs in (the end-to-end proof DDR 0179 names as
    the reason this materialisation matters at all).

If the researched shape is wrong, this is the point to find out and fix it — before it
ships to a real community.

2. Story 11 — the e2e member-tier drive leg (live)

The invite-member leg in app/tests/e2e/journey.droplet.spec.ts is a named-skip
carrying its DDR 0165 assertion plan (Files landing + display name + komiti group + no
Administration entry, then suspend→refusal). It goes live once:

  • a by-hand member is created on a real deployed gateway, and
  • DDR 0179's materialisation (above) is proven live on that same gateway — the member's
    komiti group must actually appear in Nextcloud for the assertion to mean anything.

Both items need the clan-lab (a real multi-machine deployment: kanidm + Nextcloud +
gateway). Doing them in the same lab session is the efficient order — the live-probe
above IS the first half of proving story 11's assertion plan.

Standing on

ADR 0150, ADR 0076 (Tier 1), ADR 0074, DDR 0158, DDR 0172, DDR 0173, DDR 0179. Design
contract: docs/ux/flows/files-member.mermaid, docs/ux/wireframes/files-member/.

## Parent / provenance Carried-forward tail of **#525** (itself a follow-up tail of #514, DDR 0173), which landed the two-way-door parts of #525's four stories on `origin/main`: - **Story 9** (private-path stated-limit honest copy) and **story 6** (awaiting-approval really cannot authenticate — proven with a real `/v1/auth` password conversation, not just an `account_expire` attribute read) — commit `sandcastle: #525 story 9 private-path stated-limit + story 6 real-auth proof for awaiting-approval`. - **Story 3** (komiti→Nextcloud-group materialisation) — RULED under ADR 0174 (design-tier accept) as **DDR 0179**: a new `member.FilesKomitiClaimMapPort` (`internal/kanidm.Adapter.{Add,Remove}FilesKomitiClaimMap`) writes a per-komiti `ocgroups` claim-map entry on the files OAuth2 client at komiti create/rename/delete — commit `sandcastle: #525 story 3 — DDR 0179 rules komiti→Nextcloud-group materialisation, reconciler verb built`. #525 is CLOSED in this ticket's favour (its close-report names this carry-forward, ADR 0174 rule closing a ticket whose two-way-door parts are done and whose remainder is its own session-worthy live-lab thread — the #514→#525 precedent repeated). ## What's carried forward ### 1. Live-probe DDR 0179's kanidm REST wire shape `AddFilesKomitiClaimMap`/`RemoveFilesKomitiClaimMap` drive `POST`/`DELETE /v1/oauth2/{rs_name}/_claimmap/{claim_name}/{group}` — **researched from kanidm master's source (`server/core/src/https/v1_oauth2.rs`), never exercised against a real kanidm.** This is exactly the risk class #580 was (a body/wire-shape assumption that only 500s live): pinned today by a contract-test double (`internal/kanidm/kanidm_test.go`'s `TestFilesKomitiClaimMap_AddAndRemove`), which is faithful-by-construction, not faithful-by-proof. Needs a `smoke-idp`-style leg (or an extension of the existing family-4 smoke, issue #178) run against a real kanidm on the clan-lab, asserting: - the REST call succeeds (right method/path/body against real kanidm, not just the double); - a real Nextcloud `user_oidc` actually resolves the claim-mapped komiti into a Nextcloud group once a member with that komiti signs in (the end-to-end proof DDR 0179 names as the reason this materialisation matters at all). If the researched shape is wrong, this is the point to find out and fix it — before it ships to a real community. ### 2. Story 11 — the e2e member-tier drive leg (live) The `invite-member` leg in `app/tests/e2e/journey.droplet.spec.ts` is a named-skip carrying its DDR 0165 assertion plan (Files landing + display name + komiti group + no Administration entry, then suspend→refusal). It goes live once: - a by-hand member is created on a real deployed gateway, **and** - DDR 0179's materialisation (above) is proven live on that same gateway — the member's komiti group must actually appear in Nextcloud for the assertion to mean anything. Both items need the `clan-lab` (a real multi-machine deployment: kanidm + Nextcloud + gateway). Doing them in the same lab session is the efficient order — the live-probe above IS the first half of proving story 11's assertion plan. ## Standing on ADR 0150, ADR 0076 (Tier 1), ADR 0074, DDR 0158, DDR 0172, DDR 0173, **DDR 0179**. Design contract: `docs/ux/flows/files-member.mermaid`, `docs/ux/wireframes/files-member/`.
ben self-assigned this 2026-08-15 09:35:49 +00:00
Author
Owner

Ruled by agent under ADR 0174 — veto anytime. Scoping ruling before starting the lab session: this ticket bundles two items whose actual size differs a lot once investigated.

Item 1 (live-probe DDR 0179's claim-map wire shape) is exactly the two-way-door shape this session is for: real infra with an established rollback (clan-lab create/destroy), provable by an independent read-back against the real kanidm, mirroring the existing smoke-idp.sh <lab-name> pattern (docs/spike-findings/smoke-idp-178.md) whose kanidm-only machine config already exists at spikes/smoke-idp/clan/machines/node1/. Doing this now.

Item 2 (story 11's e2e member-tier drive) turns out to need far more than "the same clan-lab session, since the live-probe is half the proof" (the ticket's own carried-forward text) — I researched this before committing to it: no NixOS config anywhere in this repo deploys Nextcloud/files+gateway (only kanidm-alone machine configs exist); the full files+kanidm+Caddy stack has only ever been founded by the app's OWN founding wizard live against a real droplet (app/tests/e2e/journey.droplet.spec.ts, internal/founding/ownvpspath.go's nixos-anywhere FullInstall), with the spec's own comments budgeting 20-40+ min PER deploy leg (enroll-configure 20m, enroll-activate 20m, deploy-files 40m ceiling, finish 15m) — a 1-2+ hour live drive minimum. On top of that, the invite-member leg in that spec is an unbuilt stub (run: async () => {}) — the by-hand-member + komiti-group + no-admin + suspend→refusal assertions have never been written, not just never run. That's new Playwright fixture work plus a multi-hour real-droplet drive: not a same-session task alongside item 1, and not safely boundable under rule 7 (no background/unattended waiting).

Splitting: item 1 lands in this session. Item 2 is carried forward as its own ticket (the same #514→#525→#584 shape), scoped now to exactly what it needs (fixture-writing + the multi-leg live drive), so the next session budgets for it honestly instead of inheriting an underscoped bundle.

**Ruled by agent under ADR 0174 — veto anytime.** Scoping ruling before starting the lab session: this ticket bundles two items whose actual size differs a lot once investigated. **Item 1 (live-probe DDR 0179's claim-map wire shape)** is exactly the two-way-door shape this session is for: real infra with an established rollback (clan-lab create/destroy), provable by an independent read-back against the real kanidm, mirroring the existing `smoke-idp.sh <lab-name>` pattern (`docs/spike-findings/smoke-idp-178.md`) whose kanidm-only machine config already exists at `spikes/smoke-idp/clan/machines/node1/`. Doing this now. **Item 2 (story 11's e2e member-tier drive)** turns out to need far more than "the same clan-lab session, since the live-probe is half the proof" (the ticket's own carried-forward text) — I researched this before committing to it: no NixOS config anywhere in this repo deploys Nextcloud/files+gateway (only kanidm-alone machine configs exist); the full files+kanidm+Caddy stack has only ever been founded by the app's OWN founding wizard live against a real droplet (`app/tests/e2e/journey.droplet.spec.ts`, `internal/founding/ownvpspath.go`'s `nixos-anywhere` FullInstall), with the spec's own comments budgeting 20-40+ min PER deploy leg (enroll-configure 20m, enroll-activate 20m, deploy-files 40m ceiling, finish 15m) — a 1-2+ hour live drive minimum. On top of that, the `invite-member` leg in that spec is an unbuilt stub (`run: async () => {}`) — the by-hand-member + komiti-group + no-admin + suspend→refusal assertions have never been written, not just never run. That's new Playwright fixture work plus a multi-hour real-droplet drive: not a same-session task alongside item 1, and not safely boundable under rule 7 (no background/unattended waiting). Splitting: item 1 lands in this session. Item 2 is carried forward as its own ticket (the same #514→#525→#584 shape), scoped now to exactly what it needs (fixture-writing + the multi-leg live drive), so the next session budgets for it honestly instead of inheriting an underscoped bundle.
Author
Owner

Close-report — item 1 (claim-map live-probe) landed; item 2 (story 11 e2e) carried to #589

Ruled by agent under ADR 0174 — veto anytime.

Landed on origin/main

DDR 0179's ocgroups claim-map REST wire shape is live-probed and confirmed correct.
Stood up a clan-lab (clan-lab-584-claimmap-probe-ff460227, syd1), deployed the
existing kanidm-only gateway config (spikes/smoke-idp/clan/machines/node1/kanidm-idp.nix,
the same one #178's smoke uses) to node1, created the nextcloud OAuth2 RS with the
same kanidm system oauth2 create CLI founding's files render itself shells out to,
then drove AddFilesKomitiClaimMap/RemoveFilesKomitiClaimMap THROUGH the production
adapter (internal/kanidm.Adapter) against the real kanidm — a new claimmap leg in
control-plane/cmd/smoke-idp, following the existing AC1 pattern (every write read back
independently off kanidm's directory, not just "the adapter says so").

Verdict: no adapter fix needed. Every write landed exactly as researched — POST .../_claimmap/ocgroups/komiti_<name> with body ["<name>"], idempotent re-add
(replaces, doesn't duplicate), DELETE clears it, idempotent re-remove on a gone entry.
Two real-kanidm behaviours confirmed along the way: a missing OAuth2 RS reads 200 null
(the same shape #178 already found for person/group, not a new defect), and a DELETE
on an already-gone claim-map entry answers 200 not 404 (harmless — the adapter
already accepts either). Full verdict + two lab-tooling gotchas fixed
(scp /dev/stdin now refused by the droplet's SFTP-mode scp; direct-IP ssh to node1
needs its own known-hosts stanza):
docs/spike-findings/smoke-idp-178.md. scripts/smoke-idp.sh now runs claimmap as a
fourth lab leg by default, with a get-or-create step for its RS precondition.

Proof: go build ./... && go vet ./... && go test ./... green; the claimmap leg PASS
on real hardware (JSON verdict in the findings doc). Commit: fcd7422.

What's carried forward — filed as #589

Story 11's e2e member-tier drive turned out to need far more than "the same lab
session" (this ticket's own carried-forward text): no NixOS config anywhere founds a
full files+Nextcloud+gateway stack — only the app's OWN founding wizard does, live
against a real droplet (internal/founding/ownvpspath.go's nixos-anywhere
FullInstall), 1-2+ hours of wall-clock per the existing spec's own budgets
(app/tests/e2e/journey.droplet.spec.ts: deploy-files 40m ceiling alone), plus the
invite-member leg's assertions are an unbuilt stub, not a wiring gap — new Playwright
fixture work on top of the drive. Not boundable in this session under ADR 0174 rule 7.
#589 scopes it properly: the real rehearsal-droplet founding drive + the new
member-invite fixtures, now unblocked by this ticket's live-probe (DDR 0179's
materialisation is proven live, so the komiti-group half of story 11's assertion plan
is no longer a wiring risk — only wall-clock and fixture-writing remain).

Closing #584 now — its two-way-door part is done and proven; the remainder is its own
session-worthy live-lab thread with a real drive-time budget, the same #514→#525→#584
shape repeated once more.

## Close-report — item 1 (claim-map live-probe) landed; item 2 (story 11 e2e) carried to #589 Ruled by agent under ADR 0174 — veto anytime. ### Landed on `origin/main` **DDR 0179's ocgroups claim-map REST wire shape is live-probed and confirmed correct.** Stood up a `clan-lab` (`clan-lab-584-claimmap-probe-ff460227`, syd1), deployed the existing kanidm-only gateway config (`spikes/smoke-idp/clan/machines/node1/kanidm-idp.nix`, the same one #178's smoke uses) to node1, created the `nextcloud` OAuth2 RS with the same `kanidm system oauth2 create` CLI founding's files render itself shells out to, then drove `AddFilesKomitiClaimMap`/`RemoveFilesKomitiClaimMap` THROUGH the production adapter (`internal/kanidm.Adapter`) against the real kanidm — a new `claimmap` leg in `control-plane/cmd/smoke-idp`, following the existing AC1 pattern (every write read back independently off kanidm's directory, not just "the adapter says so"). **Verdict: no adapter fix needed.** Every write landed exactly as researched — `POST .../_claimmap/ocgroups/komiti_<name>` with body `["<name>"]`, idempotent re-add (replaces, doesn't duplicate), `DELETE` clears it, idempotent re-remove on a gone entry. Two real-kanidm behaviours confirmed along the way: a missing OAuth2 RS reads `200 null` (the same shape #178 already found for person/group, not a new defect), and a `DELETE` on an already-gone claim-map entry answers `200` not `404` (harmless — the adapter already accepts either). Full verdict + two lab-tooling gotchas fixed (`scp /dev/stdin` now refused by the droplet's SFTP-mode scp; direct-IP ssh to node1 needs its own known-hosts stanza): `docs/spike-findings/smoke-idp-178.md`. `scripts/smoke-idp.sh` now runs `claimmap` as a fourth lab leg by default, with a get-or-create step for its RS precondition. Proof: `go build ./... && go vet ./... && go test ./...` green; the `claimmap` leg PASS on real hardware (JSON verdict in the findings doc). Commit: `fcd7422`. ### What's carried forward — filed as **#589** Story 11's e2e member-tier drive turned out to need far more than "the same lab session" (this ticket's own carried-forward text): no NixOS config anywhere founds a full files+Nextcloud+gateway stack — only the app's OWN founding wizard does, live against a real droplet (`internal/founding/ownvpspath.go`'s `nixos-anywhere` FullInstall), 1-2+ hours of wall-clock per the existing spec's own budgets (`app/tests/e2e/journey.droplet.spec.ts`: `deploy-files` 40m ceiling alone), plus the `invite-member` leg's assertions are an unbuilt stub, not a wiring gap — new Playwright fixture work on top of the drive. Not boundable in this session under ADR 0174 rule 7. #589 scopes it properly: the real rehearsal-droplet founding drive + the new member-invite fixtures, now unblocked by this ticket's live-probe (DDR 0179's materialisation is proven live, so the komiti-group half of story 11's assertion plan is no longer a wiring risk — only wall-clock and fixture-writing remain). Closing #584 now — its two-way-door part is done and proven; the remainder is its own session-worthy live-lab thread with a real drive-time budget, the same #514→#525→#584 shape repeated once more.
ben closed this issue 2026-08-15 09:52:35 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#584
No description provided.