redeploy-services / operator-<slug>: a founded community commits no access matrix, so P6-S4 shows every member zero service rows and the operator grant reconciles no app #1561

Closed
opened 2026-09-17 03:44:32 +00:00 by matou-build-agent · 1 comment

The fault

Separate from the grant-operator heal (commit c1d9af5b), drive 20260917T031826Z carries hard evidence that the community's access matrix is never written, and both the member-detail read and the operator role fan-out iterate it as their service list. Six services stood up and reached done (artifacts/services-rows.json: files, archive, document-archive, whakapapa, surveys, data-collections), yet:

  • artifacts/roles/detail-proof-member-created.json reads "access": [] — the P6-S4 surface that answers "what can this person touch?" lists nothing for a member of a community running six services.
  • The captured config repo has no matrix document: state/clan-config/idss/ holds only apex, brand/, brand-kit.json, community-size — there is no idss/access-matrix.json (internal/member/matrixstore.go:12 MatrixDocPath).

Evidence, by line

  • internal/member/matrixstore.go:40-46 — ConfigRepoMatrix.Services() returns only committed policies; a community that never edited the matrix returns an empty slice.
  • The only writers of that document are the komiti/matrix edit verbs and the IDIP service-access verbs (internal/member/komiti.go:380,420,513,535; internal/controlapi/idip_service_access.go:95,120). Nothing writes a row when a service is deployed — founding and the P4 add both leave the document absent.
  • internal/member/detail.go:229-250 — Detail builds postures and Access by ranging over o.matrix.Services(); deriveAccess (internal/member/detail.go:322-354) emits one row per policy, so no policy = no row.
  • internal/member/roles.go:193-211 — ReconcileRoles (the fan-out GrantOperator calls at roles.go:117) also ranges over o.matrix.Services(). With an empty matrix the per-app half touches nothing: touched stays empty, no ReconcileRole runs for any reconciler-mapped port. Only the kanidm half lands (SetOperator → the operators + files-admin groups, internal/kanidm/kanidm.go:618-629).
  • The gate disagrees with both: internal/member/komiti.go:633-636 treats a service with no policy as open to all members ("The default is open to all members (ADR 0076)"). So access is granted at the front door while the detail surface claims no access rows exist at all — the same default read two incompatible ways.

What it will do to the next drive

The legs after grant-operator walk straight into it:

  • redeploy-services (app/tests/e2e/journey.rented-services.spec.ts:604-614) re-reads the operator's detail and calls assertRoleApplied for every declared-posture door; with access: [] that throws "proof-operator's detail has no access row for files — rows: []" for all six non-own services (app/tests/e2e/fixtures/panelMembers.ts:166-172).
  • operator-<slug> for every reconciler-mapped port is then likely to red as "the granted operator is NOT admin", since the grant's per-app reconcile never ran.

Suspected layer and the ruling needed

The layer is internal/member (the matrix as the de-facto deployed-service list), not the harness. Two shapes, and which one is right is a ruling:

  1. Seed at deploy — when a catalogue service is placed, commit ServicePolicy{Service: slug, OpenToAll: true} to idss/access-matrix.json, so the versioned, auditable document is the whole truth (ADR 0078 §2). Writes durable config-repo state on every deploy.
  2. Derive at read — enumerate the deployed services (clan.ReadDeployedServices, internal/clan/deployedservices.go:70-85) and treat a missing policy as open-to-all, exactly as the gate already does, in both Detail and ReconcileRoles. Stateless, but it decides that P6-S4 lists the deployed catalogue rather than the matrix — a change to what every community sees on the member-detail screen.

A human should rule on where the ADR 0076 default lives before a worker builds it; the copy and row ordering on P6-S4 follow from that choice.

This is a refusal under rule 3 for the healer lane: it changes a product read surface (what a community sees on P6-S4) as a design decision, and the honest fix is a one-way-ish choice about a versioned config-repo document — not a mechanical repair.

drive 20260917T031826Z red at grant-operator: proof-operator's detail offers no "grant operator" — the seam withheld canGrant expect(locator).toBeVisible() failed Locator: locator('[data-action="grant-operator"]') Expected: visible Timeout: 100
evidence: /home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260917T031826Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The fault Separate from the `grant-operator` heal (commit `c1d9af5b`), drive `20260917T031826Z` carries hard evidence that **the community's access matrix is never written**, and both the member-detail read and the operator role fan-out iterate it as their service list. Six services stood up and reached `done` (`artifacts/services-rows.json`: files, archive, document-archive, whakapapa, surveys, data-collections), yet: - `artifacts/roles/detail-proof-member-created.json` reads `"access": []` — the P6-S4 surface that answers *"what can this person touch?"* lists **nothing** for a member of a community running six services. - The captured config repo has no matrix document: `state/clan-config/idss/` holds only `apex`, `brand/`, `brand-kit.json`, `community-size` — there is no `idss/access-matrix.json` (`internal/member/matrixstore.go:12` `MatrixDocPath`). ## Evidence, by line - `internal/member/matrixstore.go:40-46` — `ConfigRepoMatrix.Services()` returns only **committed** policies; a community that never edited the matrix returns an empty slice. - The only writers of that document are the komiti/matrix edit verbs and the IDIP service-access verbs (`internal/member/komiti.go:380,420,513,535`; `internal/controlapi/idip_service_access.go:95,120`). **Nothing writes a row when a service is deployed** — founding and the P4 add both leave the document absent. - `internal/member/detail.go:229-250` — `Detail` builds `postures` and `Access` by ranging over `o.matrix.Services()`; `deriveAccess` (`internal/member/detail.go:322-354`) emits one row per **policy**, so no policy = no row. - `internal/member/roles.go:193-211` — `ReconcileRoles` (the fan-out `GrantOperator` calls at `roles.go:117`) also ranges over `o.matrix.Services()`. With an empty matrix the per-app half touches nothing: `touched` stays empty, no `ReconcileRole` runs for any reconciler-mapped port. Only the kanidm half lands (`SetOperator` → the `operators` + `files-admin` groups, `internal/kanidm/kanidm.go:618-629`). - The gate disagrees with both: `internal/member/komiti.go:633-636` treats a service with **no** policy as open to all members ("The default is open to all members (ADR 0076)"). So access is granted at the front door while the detail surface claims no access rows exist at all — the same default read two incompatible ways. ## What it will do to the next drive The legs after `grant-operator` walk straight into it: - `redeploy-services` (`app/tests/e2e/journey.rented-services.spec.ts:604-614`) re-reads the operator's detail and calls `assertRoleApplied` for every declared-posture door; with `access: []` that throws `"proof-operator's detail has no access row for files — rows: []"` for all six non-`own` services (`app/tests/e2e/fixtures/panelMembers.ts:166-172`). - `operator-<slug>` for every reconciler-mapped port is then likely to red as *"the granted operator is NOT admin"*, since the grant's per-app reconcile never ran. ## Suspected layer and the ruling needed The layer is `internal/member` (the matrix as the de-facto deployed-service list), not the harness. Two shapes, and which one is right is a ruling: 1. **Seed at deploy** — when a catalogue service is placed, commit `ServicePolicy{Service: slug, OpenToAll: true}` to `idss/access-matrix.json`, so the versioned, auditable document is the whole truth (ADR 0078 §2). Writes durable config-repo state on every deploy. 2. **Derive at read** — enumerate the deployed services (`clan.ReadDeployedServices`, `internal/clan/deployedservices.go:70-85`) and treat a missing policy as open-to-all, exactly as the gate already does, in both `Detail` and `ReconcileRoles`. Stateless, but it decides that P6-S4 lists the deployed catalogue rather than the matrix — a change to what every community sees on the member-detail screen. A human should rule on where the ADR 0076 default lives before a worker builds it; the copy and row ordering on P6-S4 follow from that choice. This is a refusal under rule 3 for the healer lane: it changes a product read surface (what a community sees on P6-S4) as a design decision, and the honest fix is a one-way-ish choice about a versioned config-repo document — not a mechanical repair. drive `20260917T031826Z` red at `grant-operator`: `proof-operator's detail offers no "grant operator" — the seam withheld canGrant expect(locator).toBeVisible() failed Locator: locator('[data-action="grant-operator"]') Expected: visible Timeout: 100` evidence: `/home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260917T031826Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 182edfd1cc0f -->
Author
Member

Close-report — ruled and healed by agent under ADR 0174 (veto anytime).

What was wrong (confirmed)

The diagnosis holds. idss/access-matrix.json is written only by the komiti/matrix edit verbs (internal/member/komiti.go:380,420,513,535) and the IDIP service-access verbs (internal/controlapi/idip_service_access.go:95,120) — nothing writes a row at deploy or founding. Yet MemberDetail (P6-S4, internal/member/detail.go) and ReconcileRoles (internal/member/roles.go) both ranged matrix.Services() (the committed policies alone), so a community running six services with an unedited matrix read access: [] for every member and the operator grant's per-app fan-out touched nothing (only the kanidm half landed).

The ruling (why this was NOT the refusal the ticket proposed)

The ticket framed this as a design decision needing a human ruling on where the ADR 0076 default lives. But that ruling was already made for the sibling surface: #1229 / ADR 0222 edit 3 left-joins the deployed set onto the matrix, defaulting a deployed service with no policy to open-to-all, in credentialAccessView (internal/controlapi/idip_service_access.go:159-168). The auth gate reads the same default (komiti.go:633-636). The detail surface and the roles reconciler were simply never migrated to it. So this is a consistency migration, not a new product decision — a two-way door under ADR 0174: it writes no durable config-repo state (stateless derive-at-read), is fully guarded (empty deployed set = prior behaviour, so no existing surface shifts), and is provable at the member seam. Shape 1 (seed-at-deploy) was rejected: it would write config-repo state on every deploy and could clobber a later restriction. Shape 2 (derive-at-read) matches #1229 and keeps P6-S4 and the credential SERVICE ACCESS view reading the matrix the same way.

What landed

Commit 61d8d507 on main (pushed; host gofmt gate green):

  • new member.Catalogue.DeployedServices() — the community-wide deployed slug set (sibling of the per-member Deployed) — implemented on memberorbit.Catalogue off its existing WithDeployedSet resolver (clan.ReadDeployedServices, already wired in prod), the fake, and the resting stub;
  • a shared effectivePolicies(deployed, committed) helper (one entry per deployed service, missing policy => open-to-all; then any committed policy for a service no longer deployed, in matrix order; empty deployed set => exactly the committed matrix);
  • MemberDetail and ReconcileRoles both enumerate it.
  • STATUS.md updated in the same commit.

Proof (red -> green, mirrors the drive's exact assertions)

  • TestMemberDetail_EmptyMatrixListsDeployedServicesOpenToAll — reproduces the redeploy-services red assertRoleApplied "...detail has no access row for files — rows: []"; now the row exists with has_access, via: all members, role_in_app, and NOT not_applied.
  • TestReconcileRoles_EmptyMatrixStillReconcilesDeployedPorts — reproduces the operator-<slug> "granted operator is NOT admin"; the per-app reconcile now fans out to the deployed set.
  • Both verified failing before the wiring and passing after. Full go build/vet/test ./... green (86 packages). gofmt/vet clean.

Honest residue

The full rented-services e2e drive was NOT re-run in this bounded session (it needs the live DO/founding rail). The fault is a pure internal/member logic defect and is fixed + seam-proven at the layer of the fault against the drive's exact assertions; the two legs (redeploy-services, operator-<slug>) should re-confirm in the normal drive cadence. Closing on the landed fix + red->green proof.

**Close-report — ruled and healed by agent under ADR 0174 (veto anytime).** ## What was wrong (confirmed) The diagnosis holds. `idss/access-matrix.json` is written only by the komiti/matrix edit verbs (`internal/member/komiti.go:380,420,513,535`) and the IDIP service-access verbs (`internal/controlapi/idip_service_access.go:95,120`) — nothing writes a row at deploy or founding. Yet `MemberDetail` (P6-S4, `internal/member/detail.go`) and `ReconcileRoles` (`internal/member/roles.go`) both ranged `matrix.Services()` (the **committed** policies alone), so a community running six services with an unedited matrix read `access: []` for every member and the operator grant's per-app fan-out touched nothing (only the kanidm half landed). ## The ruling (why this was NOT the refusal the ticket proposed) The ticket framed this as a design decision needing a human ruling on *where the ADR 0076 default lives*. But that ruling was **already made** for the sibling surface: **#1229 / ADR 0222 edit 3** left-joins the deployed set onto the matrix, defaulting a deployed service with no policy to open-to-all, in `credentialAccessView` (`internal/controlapi/idip_service_access.go:159-168`). The auth gate reads the same default (`komiti.go:633-636`). The detail surface and the roles reconciler were simply **never migrated** to it. So this is a **consistency migration**, not a new product decision — a two-way door under ADR 0174: it writes **no durable config-repo state** (stateless derive-at-read), is fully guarded (empty deployed set = prior behaviour, so no existing surface shifts), and is provable at the member seam. Shape 1 (seed-at-deploy) was rejected: it would write config-repo state on every deploy and could clobber a later restriction. Shape 2 (derive-at-read) matches #1229 and keeps P6-S4 and the credential SERVICE ACCESS view reading the matrix the same way. ## What landed Commit `61d8d507` on `main` (pushed; host gofmt gate green): - new `member.Catalogue.DeployedServices()` — the community-wide deployed slug set (sibling of the per-member `Deployed`) — implemented on `memberorbit.Catalogue` off its existing `WithDeployedSet` resolver (`clan.ReadDeployedServices`, already wired in prod), the fake, and the resting stub; - a shared `effectivePolicies(deployed, committed)` helper (one entry per deployed service, missing policy => open-to-all; then any committed policy for a service no longer deployed, in matrix order; empty deployed set => exactly the committed matrix); - `MemberDetail` and `ReconcileRoles` both enumerate it. - `STATUS.md` updated in the same commit. ## Proof (red -> green, mirrors the drive's exact assertions) - `TestMemberDetail_EmptyMatrixListsDeployedServicesOpenToAll` — reproduces the `redeploy-services` red `assertRoleApplied` "...detail has no access row for files — rows: []"; now the row exists with `has_access`, `via: all members`, `role_in_app`, and NOT `not_applied`. - `TestReconcileRoles_EmptyMatrixStillReconcilesDeployedPorts` — reproduces the `operator-<slug>` "granted operator is NOT admin"; the per-app reconcile now fans out to the deployed set. - Both verified failing before the wiring and passing after. Full `go build`/`vet`/`test ./...` green (86 packages). `gofmt`/`vet` clean. ## Honest residue The full **rented-services e2e drive was NOT re-run** in this bounded session (it needs the live DO/founding rail). The fault is a pure `internal/member` logic defect and is fixed + seam-proven at the layer of the fault against the drive's exact assertions; the two legs (`redeploy-services`, `operator-<slug>`) should re-confirm in the normal drive cadence. Closing on the landed fix + red->green proof.
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.

Reference
Matou/idss#1561
No description provided.