operator email edit — wire the production per-service carry, the alert-contact follow, and the IDIP roster-write path (#1707 follow-up) #1743

Closed
opened 2026-09-22 18:13:44 +00:00 by matou-build-agent · 2 comments

What

#1707 (DDR 0266) landed the in-product Members → Edit email (P6-S10 / S10c / S10x) end
to end on the Kanidm path: the seam (member.PreviewEmailChange / EditEmail /
RetryEmailCarry), the EmailPort.SetPersonEmail kanidm mail write, uniqueness + the
founding-shared validator, old+new audit, the controlapi routes, the shared dashboard
screens, and the derived not-applied surface. Three production bindings were deliberately
left as clean adapter seams (defaults are honest no-ops — the confirm carries no false
claim) and are owed to complete the feature everywhere:

  1. The IDIP roster-write path. On an IDIP community the address lives in the keria
    roster (RosterEntry.Email), not kanidm. Needs a keria.Registry.SetEmail(aid, email)
    (the SetArchived write pattern), and an IDIP-side EditEmail route/orchestrator (or
    pointing the shared member.EmailPort at a roster-backed adapter) so the shared P6-S10
    screen serves the IDIP frames too. The bridge stamps the OIDC email claim from the
    roster, so the write must land there.

  2. The production member.EmailCarrier adapter (over memberorbit.Catalogue /
    ServicePort): report which deployed services hold a member's email (for the confirm's
    "carried to" list and the P6-S4 not-applied derivation) and carry the new address —
    Paperless (ADR 0255) FIRST, before the member's next sign-in, since it
    pre-provisions/ matches by email. Reconciler-based services (Grist, Listmonk, Nextcloud)
    already re-read the mail from the IdP at their next reconcile, so the kanidm write
    propagates to them automatically; the explicit carry is mainly Paperless's stored email
    plus the holdings enumeration. Likely needs an email read/write verb on ServicePort.

  3. The production member.AlertContactFollow adapter: SeparateAlertContactSet over
    the monitoring orchestrator (AlertContactCard), and FollowOperatorMail re-rendering
    operator_mail + alert_contact_email through the normal panel apply (channel_apply),
    so an operator's own email edit moves alerts (DDR 0266 decision 2). Until wired, the
    operator's confirm shows no alert row (honest — no follow capability), and the interim
    hand repair (GOTCHAS #311) covers the render.

Wire all three at the composition root via member.WithEmailCarrier /
member.WithAlertContactFollow (the options already exist) and the IDIP orchestrator.

Where

  • internal/member/email.go (the seam + the EmailCarrier / AlertContactFollow ports)
  • internal/keria/registry.go (SetEmail), internal/controlapi/idip_*.go (IDIP route)
  • internal/memberorbit/, internal/documentarchivesvc/ (the carry adapter)
  • internal/clan/ + control-plane/cmd/control-plane/channel_apply.go (the render follow)
  • control-plane/cmd/control-plane/whole_composition.go (the member.New wiring)

Found while landing #1707. DDR 0266; GOTCHAS #311.

## What #1707 (DDR 0266) landed the in-product **Members → Edit email** (P6-S10 / S10c / S10x) end to end on the **Kanidm path**: the seam (`member.PreviewEmailChange` / `EditEmail` / `RetryEmailCarry`), the `EmailPort.SetPersonEmail` kanidm mail write, uniqueness + the founding-shared validator, old+new audit, the controlapi routes, the shared dashboard screens, and the derived not-applied surface. Three production bindings were deliberately left as clean adapter seams (defaults are honest no-ops — the confirm carries no false claim) and are owed to complete the feature everywhere: 1. **The IDIP roster-write path.** On an IDIP community the address lives in the keria roster (`RosterEntry.Email`), not kanidm. Needs a `keria.Registry.SetEmail(aid, email)` (the `SetArchived` write pattern), and an IDIP-side `EditEmail` route/orchestrator (or pointing the shared `member.EmailPort` at a roster-backed adapter) so the shared P6-S10 screen serves the IDIP frames too. The bridge stamps the OIDC `email` claim from the roster, so the write must land there. 2. **The production `member.EmailCarrier` adapter** (over `memberorbit.Catalogue` / `ServicePort`): report which deployed services hold a member's email (for the confirm's "carried to" list and the P6-S4 not-applied derivation) and carry the new address — **Paperless (ADR 0255) FIRST**, before the member's next sign-in, since it pre-provisions/ matches by email. Reconciler-based services (Grist, Listmonk, Nextcloud) already re-read the mail from the IdP at their next reconcile, so the kanidm write propagates to them automatically; the explicit carry is mainly Paperless's stored email plus the holdings enumeration. Likely needs an email read/write verb on `ServicePort`. 3. **The production `member.AlertContactFollow` adapter**: `SeparateAlertContactSet` over the monitoring orchestrator (`AlertContactCard`), and `FollowOperatorMail` re-rendering `operator_mail` + `alert_contact_email` through the normal panel apply (`channel_apply`), so an operator's own email edit moves alerts (DDR 0266 decision 2). Until wired, the operator's confirm shows no alert row (honest — no follow capability), and the interim hand repair (GOTCHAS #311) covers the render. Wire all three at the composition root via `member.WithEmailCarrier` / `member.WithAlertContactFollow` (the options already exist) and the IDIP orchestrator. ## Where - `internal/member/email.go` (the seam + the `EmailCarrier` / `AlertContactFollow` ports) - `internal/keria/registry.go` (`SetEmail`), `internal/controlapi/idip_*.go` (IDIP route) - `internal/memberorbit/`, `internal/documentarchivesvc/` (the carry adapter) - `internal/clan/` + `control-plane/cmd/control-plane/channel_apply.go` (the render follow) - `control-plane/cmd/control-plane/whole_composition.go` (the `member.New` wiring) Found while landing #1707. DDR 0266; GOTCHAS #311.
Author
Member

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

Ruling: enhancement + ready-for-agent

Why a two-way door (not ready-for-human): this ticket completes an
already-accepted feature — every design decision it depends on was ruled by Ben
in DDR 0266 (email edits on the member's row, alert contact follows the
operator's mail, an email change never re-matches an account). No new
member-facing trust accept, no personal credentials, no security-posture
widening, no data destruction, no non-routine spend. The work is three backend
adapter bindings at the composition root; each is revertible by a later commit
and its behaviour is provable by seam tests against fakes (the same pattern that
landed the Kanidm path in #1707). That is a two-way door.

Triage checks run against the tree:

  • Redundancy — not built. internal/member/email.go carries only the
    honest no-op defaults (noEmailCarrier, noAlertContactFollow); the
    production adapters do not exist. internal/keria/registry.go has
    SetArchived (the named write template) but no SetEmail. The three
    bindings are genuinely owed.
  • Design contract present → no needs-design. The wireframe frames exist in
    both members folders (docs/ux/wireframes/p6-members/p6-s10{,c,x}-*.html and
    the IDIP twins p6-members-idip/p6-s10{i,ci,xi}-*.html), and DDR 0266 is
    accepted. The shared P6-S10 screen the IDIP path reuses is already built.
  • No human-decision residue. No task manifest; the judgement calls were all
    resolved in DDR 0266.
  • Prior rejection — none. .out-of-scope/ holds nothing on this.

Proves the door swings back: the seam ports (WithEmailCarrier /
WithAlertContactFollow) already gate every production effect behind an
Option, and their defaults are no-ops — an unwired community is unchanged, so
each adapter can be added, reverted, or left unwired without touching the shipped
Kanidm path or the shared screens. Seam tests (internal/member email suite,
the controlapi email integration) pin the contract the adapters must satisfy.

Agent brief

Wire the three production bindings left as clean seams by #1707, at the
composition root (control-plane/cmd/control-plane/whole_composition.go, via the
existing member.WithEmailCarrier / member.WithAlertContactFollow options) and
the IDIP orchestrator:

  1. IDIP roster-write path — add keria.Registry.SetEmail(aid, email)
    following the SetArchived write pattern (internal/keria/registry.go:556),
    and an IDIP EditEmail route/orchestrator (internal/controlapi/idip_*.go)
    — or point the shared member.EmailPort at a roster-backed adapter — so the
    shared P6-S10 frames serve the IDIP twins. The bridge stamps the OIDC email
    claim from the roster, so the write must land in RosterEntry.Email.
  2. Production member.EmailCarrier over memberorbit.Catalogue /
    ServicePort: enumerate which deployed services hold a member's email (for
    the confirm "carried to" list and the P6-S4 not-applied derivation) and carry
    the new address — Paperless (ADR 0255) FIRST, before next sign-in, since
    it matches by stored email. Reconciler-based services (Grist, Listmonk,
    Nextcloud) re-read from the IdP at reconcile, so the kanidm write already
    propagates to them. Likely needs an email read/write verb on ServicePort.
  3. Production member.AlertContactFollow — SeparateAlertContactSet over
    the monitoring orchestrator (AlertContactCard), and FollowOperatorMail
    re-rendering operator_mail + alert_contact_email through the normal panel
    apply (channel_apply), so an operator's own email edit moves alerts (DDR
    0266 decision 2).

Done when: each binding is wired and covered by seam tests; the IDIP frames
render the shared screens end to end; the operator confirm shows a real alert row
once the follow is wired (no false claim before). References: DDR 0266,
GOTCHAS #311, #1707. Files listed in the issue body.

> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** ## Ruling: `enhancement` + `ready-for-agent` **Why a two-way door (not `ready-for-human`):** this ticket completes an already-accepted feature — every design decision it depends on was ruled by Ben in **DDR 0266** (email edits on the member's row, alert contact follows the operator's mail, an email change never re-matches an account). No new member-facing trust accept, no personal credentials, no security-posture widening, no data destruction, no non-routine spend. The work is three backend adapter bindings at the composition root; each is revertible by a later commit and its behaviour is provable by seam tests against fakes (the same pattern that landed the Kanidm path in #1707). That is a two-way door. **Triage checks run against the tree:** - **Redundancy — not built.** `internal/member/email.go` carries only the honest no-op defaults (`noEmailCarrier`, `noAlertContactFollow`); the production adapters do not exist. `internal/keria/registry.go` has `SetArchived` (the named write template) but **no `SetEmail`**. The three bindings are genuinely owed. - **Design contract present → no `needs-design`.** The wireframe frames exist in both members folders (`docs/ux/wireframes/p6-members/p6-s10{,c,x}-*.html` and the IDIP twins `p6-members-idip/p6-s10{i,ci,xi}-*.html`), and DDR 0266 is accepted. The shared P6-S10 screen the IDIP path reuses is already built. - **No human-decision residue.** No task manifest; the judgement calls were all resolved in DDR 0266. - **Prior rejection — none.** `.out-of-scope/` holds nothing on this. **Proves the door swings back:** the seam ports (`WithEmailCarrier` / `WithAlertContactFollow`) already gate every production effect behind an `Option`, and their defaults are no-ops — an unwired community is unchanged, so each adapter can be added, reverted, or left unwired without touching the shipped Kanidm path or the shared screens. Seam tests (`internal/member` email suite, the controlapi email integration) pin the contract the adapters must satisfy. ## Agent brief Wire the three production bindings left as clean seams by #1707, at the composition root (`control-plane/cmd/control-plane/whole_composition.go`, via the existing `member.WithEmailCarrier` / `member.WithAlertContactFollow` options) and the IDIP orchestrator: 1. **IDIP roster-write path** — add `keria.Registry.SetEmail(aid, email)` following the `SetArchived` write pattern (`internal/keria/registry.go:556`), and an IDIP `EditEmail` route/orchestrator (`internal/controlapi/idip_*.go`) — or point the shared `member.EmailPort` at a roster-backed adapter — so the shared P6-S10 frames serve the IDIP twins. The bridge stamps the OIDC `email` claim from the roster, so the write must land in `RosterEntry.Email`. 2. **Production `member.EmailCarrier`** over `memberorbit.Catalogue` / `ServicePort`: enumerate which deployed services hold a member's email (for the confirm "carried to" list and the P6-S4 not-applied derivation) and carry the new address — **Paperless (ADR 0255) FIRST**, before next sign-in, since it matches by stored email. Reconciler-based services (Grist, Listmonk, Nextcloud) re-read from the IdP at reconcile, so the kanidm write already propagates to them. Likely needs an email read/write verb on `ServicePort`. 3. **Production `member.AlertContactFollow`** — `SeparateAlertContactSet` over the monitoring orchestrator (`AlertContactCard`), and `FollowOperatorMail` re-rendering `operator_mail` + `alert_contact_email` through the normal panel apply (`channel_apply`), so an operator's own email edit moves alerts (DDR 0266 decision 2). **Done when:** each binding is wired and covered by seam tests; the IDIP frames render the shared screens end to end; the operator confirm shows a real alert row once the follow is wired (no false claim before). References: DDR 0266, GOTCHAS #311, #1707. Files listed in the issue body.
Author
Member

Progress — binding 2 of 3 landed on main (b0b89b56); handing off to re-slice.

This ticket bundles three independent production bindings, and exploration
showed each is its own vertical slice. I landed the one that is a clean,
self-contained, seam-testable composition-root wiring; the other two each need
their own slice (one with a design decision beyond a two-way seam), so I'm not
closing this — a human should split it.

Landed and pushed (binding 2 — the production member.EmailCarrier, DDR 0266 decision 5)

*memberorbit.Catalogue is now the production carrier (it already stands in for
member.Reconciler/member.Catalogue, so no new adapter). A new optional
memberorbit.EmailFiler
capability is the seam a port opts into when it keeps
the member's email in its OWN record and matches by it. Only Paperless
(documentarchivesvc.Port, ADR 0255) implements it — it matches a pre-provisioned
person by their verified email at every sign-in, so its stored copy is carried
FIRST over PATCH /api/users/{id}/. Nextcloud/Grist/Listmonk re-read the mail
from the IdP at reconcile, so the kanidm write already reaches them and they are
honestly absent from the carry (never named not-applied). Wired at the
composition root via member.WithEmailCarrier(catalogue); the no-op default still
holds on the resting/IDIP paths. Covered by memberorbit + documentarchivesvc
seam tests; go vet + golangci-lint clean; full pre-push go-ci green.

Still owed — each a separate slice

  1. IDIP roster-write path. Bigger than the body implies: on IDIP the shared
    /api/v1/members/{id}/email route is served by restingMemberIDP
    (errMemberUnwired), and EditEmailScreen is mounted ONLY in the kanidm
    MemberDetailScreen — the IDIP IdipRosterPanel has no email-edit surface and
    the idip client no email verbs. So this needs keria.Registry.SetEmail + a
    RosterAdapter verb + a new idip_email.go controlapi surface (mirroring
    idip_removal.go) + mounting EditEmailScreen in IdipRosterPanel with an
    IDIP-backed client + openapi regen. A full backend+frontend slice.
  2. AlertContactFollow. Its DDR-cited channel_apply is the wrong path —
    that is the release-channel apply (#1661), not a field render. operator_mail
    and alert_contact_email live on clan.GatewayFacts as founding seeds
    (vmguest.go), re-read from env at boot; there is no runtime re-render/apply
    mechanism
    for them. A monitor SetAlertContact alone moves alerts at runtime
    but reverts to the env seed on the next gateway restart — so a durable follow
    needs a NEW apply seam (or a gateway re-deploy triggered by an email edit),
    which is a design decision, not a two-way seam. SeparateAlertContactSet also
    needs to derive "separate" by comparing monitor.AlertContact().Email against
    the operator's current email (no explicit flag is stored).

Close this as the carrier slice and file two follow-ups: (a) the IDIP email
surface (ready-for-agent), (b) the alert-contact follow (needs-design — the
re-render/apply mechanism). Full details and file:line landmarks are in the
commit message and STATUS.md.

Why human

The remaining work is a triage/re-slice decision (this ticket is three slices),
plus binding 3 needs a design call on the operator_mail/alert_contact_email
re-render/apply mechanism that no existing seam provides — not a two-way door
provable by a test I can run.

**Progress — binding 2 of 3 landed on `main` (`b0b89b56`); handing off to re-slice.** This ticket bundles **three independent production bindings**, and exploration showed each is its own vertical slice. I landed the one that is a clean, self-contained, seam-testable composition-root wiring; the other two each need their own slice (one with a design decision beyond a two-way seam), so I'm not closing this — a human should split it. ### Landed and pushed (binding 2 — the production `member.EmailCarrier`, DDR 0266 decision 5) `*memberorbit.Catalogue` is now the production carrier (it already stands in for `member.Reconciler`/`member.Catalogue`, so no new adapter). A new **optional `memberorbit.EmailFiler`** capability is the seam a port opts into when it keeps the member's email in its OWN record and matches by it. Only **Paperless** (`documentarchivesvc.Port`, ADR 0255) implements it — it matches a pre-provisioned person by their verified email at every sign-in, so its stored copy is carried FIRST over `PATCH /api/users/{id}/`. Nextcloud/Grist/Listmonk re-read the mail from the IdP at reconcile, so the kanidm write already reaches them and they are honestly absent from the carry (never named not-applied). Wired at the composition root via `member.WithEmailCarrier(catalogue)`; the no-op default still holds on the resting/IDIP paths. Covered by `memberorbit` + `documentarchivesvc` seam tests; `go vet` + `golangci-lint` clean; full pre-push go-ci green. ### Still owed — each a separate slice 1. **IDIP roster-write path.** Bigger than the body implies: on IDIP the shared `/api/v1/members/{id}/email` route is served by `restingMemberIDP` (`errMemberUnwired`), and `EditEmailScreen` is mounted ONLY in the kanidm `MemberDetailScreen` — the IDIP `IdipRosterPanel` has no email-edit surface and the idip client no email verbs. So this needs `keria.Registry.SetEmail` + a `RosterAdapter` verb + a **new `idip_email.go` controlapi surface** (mirroring `idip_removal.go`) + mounting `EditEmailScreen` in `IdipRosterPanel` with an IDIP-backed client + openapi regen. A full backend+frontend slice. 2. **`AlertContactFollow`.** Its DDR-cited `channel_apply` is the **wrong path** — that is the release-channel apply (#1661), not a field render. `operator_mail` and `alert_contact_email` live on `clan.GatewayFacts` as founding seeds (`vmguest.go`), re-read from env at boot; there is **no runtime re-render/apply mechanism** for them. A monitor `SetAlertContact` alone moves alerts at runtime but reverts to the env seed on the next gateway restart — so a durable follow needs a NEW apply seam (or a gateway re-deploy triggered by an email edit), which is a design decision, not a two-way seam. `SeparateAlertContactSet` also needs to derive "separate" by comparing `monitor.AlertContact().Email` against the operator's current email (no explicit flag is stored). ### Recommended re-slice Close this as the carrier slice and file two follow-ups: (a) the IDIP email surface (`ready-for-agent`), (b) the alert-contact follow (`needs-design` — the re-render/apply mechanism). Full details and file:line landmarks are in the commit message and STATUS.md. ## Why human The remaining work is a triage/re-slice decision (this ticket is three slices), plus binding 3 needs a design call on the operator_mail/alert_contact_email re-render/apply mechanism that no existing seam provides — not a two-way door provable by a test I can run.
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#1743
No description provided.