redeploy-services: Grist and Listmonk refuse the bare-person-id role reconcile (no email) #1581
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
2 participants
Notifications
Due date
No due date set.
Reference
Matou/idss#1581
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
Drive
20260918T135205Z(rented-services, commita3977df1) is red at legredeploy-services— 30 legs, 29 green, 1 red, 0 skip (artifacts/verdict.json). The drive ran 14:11:21Z → 14:28:26Z.This is NOT the known frontier. The frontier named in the brief — pairing never flips, the own-VPS carrier issue — did not occur:
{"leg":"pair","status":"green","ms":225}. Andartifacts/legs.jsoncarries no skip reasons at all ("skip": 0), so nothing in this drive is declared out of scope. This is a genuine new red.The fault, from
artifacts/legs.json/artifacts/journey.json:Two email-keyed ports (Grist, Listmonk) refuse the per-person role reconcile because the product hands them a bare person id where the app requires an email address. A granted operator therefore reads "not yet applied" forever at those two doors.
The evidence
The tail moved exactly as the domain says, except at two doors
artifacts/roles/detail-proof-operator-granted.json(14:25) vsdetail-proof-operator-after-redeploy.json(14:28):surveys"role_in_app":"superadmin","not_applied":true"role_in_app":"superadmin"— cleared ✔data-collections"role_in_app":"org owner","not_applied":true"role_in_app":"org owner","not_applied":true— still owed ✘newsletters"role_in_app":"Super Admin","not_applied":true— never applied ✘surveyscleared through theAppliesAtDeploybranch (internal/member/roles.go:323-325). The two that stayed are genuinely refused per-person reconciles. Notenewslettersis absent fromartifacts/services-rows.json(6 services, captured at theservices-rowleg) — it arrives only with the redeploy, which is why its reconcile had never run before.1. data-collections (Grist) — the org-access PATCH is keyed by a bare person id
logs/droplet-journal.txt:1985-1987, re-read live on the still-up box (journalctl -u idss-control-plane):The same refusal also fired at
droplet-journal.txt:1474,:1531,:1590(14:25:38 / 14:25:41 / 14:25:51) — atadd-memberandgrant-operatortime. That is whydata-collectionswas already in the tail before the redeploy.The defect is the PATCH body —
internal/datacollectionssvc/datacollectionssvc.go:250:Grist validates that map's keys as email addresses and refuses
"proof-operator"outright.Live-box confirmation (read-only
GET /api/orgs/data-collections/accesswith the owner key from/var/lib/data-collections/state/owner-api-key):proof-operatorandproof-memberare absent. And the asymmetry is visible: the founderoperatoris present withemailliterally"operator"— Grist's own forward-auth path minted that user from the bare header value with no email validation. So Grist accepts a bare id when it mints the user itself (henceperson=operatorreads "already converged" via the short-circuit atdatacollectionssvc.go:243-249, and the read-back at:291comparingu.Email == personIDappears to work), and refuses one when asked to grant access to it. The promise in the port's own doc comment (datacollectionssvc.go:200-204: "a granted operator is an owner the instant the panel grants them, never waiting on a login") cannot hold on that path.2. newsletters (Listmonk) — the pre-provision POST omits
emailNo newsletters reconcile line exists in the journal at all —
grep -cE "newsletters (role reconciled|operator pre-provisioned)" logs/droplet-journal.txt→ 0. Both of this port's failure paths are silent (see the diagnosability note below).Live-box read-only
GET /api/userson the Listmonk loopback (http://127.0.0.1:9010) returns exactly two rows:proof-operatorwas never created.GET /api/roles/usersreturns 200 withSuper Admin(id 1) andMembers(id 2), soroleIDresolution was fine. Listmonk isv6.1.0 (x86_64-linux)(journalctl -u listmonk).The refusing request is
provisionOperator—internal/newslettersvc/newslettersvc.go:237-242:No
emailfield. The healer replayed this verbatim once against the box and read backHTTP 400 {"message":"Invalid fields: email"}, creating nothing (I did not re-run the mutation; theGET /api/usersabove independently confirms the row is absent). The two existing rows corroborate the constraint's shape:idss-administype:"user"and carries a synthesisedidss-admin@listmonk;idss-apiistype:"api"and is allowedemail:null. Listmonk 6.1.0 requires a validemailon anytype:"user"row, so the #1553 pre-provision has never been able to land.Corroborating: the box is otherwise healthy
systemctl --failedon the live box → 0 failed units. Every port probes healthy at 14:28:17–14:28:22,newslettersincluded (verdict=healthyfor all seven). This is not an infra or deploy failure.The suspected layer: product — and it needs a ruling
The harness is sound and the check is right.
assertRoleApplied(app/tests/e2e/fixtures/panelMembers.ts:166-185) raises exactly this string off the product's ownnot_appliedflag; it is asserting the product's declared posture, not inventing one. Nothing in the journey or fixtures needs changing.The product-side root cause: both ports key a person on an email, but
memberorbit.ServicePort.ReconcileRole(personID string, operator bool)(internal/memberorbit/memberorbit.go:151) carries only a bare id, and the member ledger holds no email field at all (grep -rn "Email" internal/member/→ no hits). Neither port can supply one today.What plugging it needs
The fix is not a wrong constant — it is a decision about what email identity a community member is known by inside a deployed app, and it is a one-way door (a wrong choice strands or duplicates accounts later commits cannot cleanly undo):
<personID>@<apex>in each port. Cheap, but it decides the identity Listmonk's OIDC auto-provision matches on at first sign-in; get it wrong and you land exactly the failurenewslettersvc.go:228-231warns about — the OIDC login makes a second Members-role account beside the pre-provisioned one. For Grist it also splits the person from theemail:"operator"-shaped row the forward-auth header already mints (#1536's bare-id convention), leaving two Grist users for one person — and it would breakaccessWithKey'su.Email == personIDread-back, making the reconcile non-idempotent even once the PATCH succeeds.ServicePort.ReconcileRole. Honest, but it touches every port implementation and the catalogue.A swarm agent can act the moment that ruling lands; it should not pick for itself, which is why this is filed
confident: false. Note also that Ben's recent option-1 ruling for #1575 (commit8d69f1b3— "a member reaches Grist by a PER-PERSON grant, never theeveryoneprincipal") is what put data-collections on this per-person path; the email key is the next question that ruling opens, not a regression of it.Also worth fixing alongside: the newsletters reconcile failure is invisible
internal/newslettersvc/newslettersvc.gologs only its success paths (:221,:249);ReconcileRole/provisionOperatorreturn errors bare, recording the status but never the response body (:218,:246-248).internal/member/roles.go:345then discards the error entirely —owed := o.catalogue.ReconcileRole(...) != nil. Net effect: a newsletters reconcile that HTTP-400s leaves zero trace in the drive's journal. The only reason this drive is diagnosable at all is that data-collections was given exactly this logging by #1575 (datacollectionssvc.go:256-262). Bringing newslettersvc onto that footing — log the refusal with the response body, Grist-style — would have named this in one command instead of a replay. Same hazard class as GOTCHAS #245.What is absent from the run directory
newslettersreconcile line of any kind inlogs/droplet-journal.txt(the central absence — the silent error path above).logs/guest-*.logare 127-byte stubs andlogs/qemu.logrecordsspawn qemu-system-x86_64 ENOENT— expected: this is a rented droplet in payload mode (artifacts/host.jsonpayloadMode), not a local guest VM.artifacts/legs.jsoncarries noskipentries and therefore no skip reasons — there is no out-of-scope declaration covering this red.logs/reporter-claude.errandlogs/reporter-invokedare empty (0 bytes).Reproduction
The live leg needs a rented droplet, and re-proves on the next drive once a ruling lands. Both refusals are deterministic and reproducible from any founded community with an operator granted by hand before their first sign-in at either door.
drive
20260918T135205Zred atredeploy-services:role posture not honest on 2 door(s) — proof-operator's role on data-collections reads "not yet applied" (org owner) — the reconcile is still owed | proof-operator's role on newsletters reads "notevidence:
/home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260918T135205Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedDuplicate of #1580, filed by this session six minutes earlier off the same kept droplet; the two diagnoses agree. #1580 carries the ruling this ticket asks for and is
ready-for-human, because which email-shaped identity a member wears is Ben's call, not a session's. It still blocks #1547.The "also worth fixing" half here (the invisible newsletters refusal) landed in
334f220c. Closing so no session-runner picks the identity on its own.Session-runner attempt (ADR 0174) — no work landed, and none is owed here.
Confirmed this ticket is a duplicate of #1580 and was already closed by Ben (14:39:32Z) with a dedup close-report. Re-verified against the repo at
HEAD(334f220c):ready-for-human), which blocks #1547. A session must not pick it; per ADR 0174 rule 2 this stays with the human. Nothing to relabel — #1580 already carries it.internal/newslettersvc/newslettersvc.gonow keeps Listmonk's response body on both the role PUT (:218-222) and the operator pre-provision POST (:248-252), appends" — Listmonk said: <body>"to the error, and logs the refusal with person/role/status — Grist-parity (GOTCHAS #246). Landed in334f220c(after this drive's commita3977df1), so run 12's silent newsletters refusal is already diagnosable. STATUS records the run.The only residue was tracker hygiene: this closed ticket still carried the action labels
agent-working+ready-for-session, which is what re-drained it into a session. Removed both (keptpriority,rehearsal-183as provenance) so the drainer does not re-pick an already-adjudicated duplicate. Leaving it closed.