redeploy-services: the newsletters operator pre-provision never NAMES the account status — Listmonk's user_status enum refuses the create 500 and the operator reads "not yet applied" forever #1592
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.
Dependencies
No dependencies set.
Reference
Matou/idss#1592
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
20260918T165406Z(commit771736b3) red atredeploy-services, 29/30 legs green:The leg adds
newslettersfrom the panel, then reads the granted operator's detail and demands every declared-posture door name a role that is APPLIED (journey.rented-services.spec.ts:627-645).artifacts/roles/detail-proof-operator-after-redeploy.jsonshows exactly one dishonest row:Notably
surveys—not_applied:trueindetail-proof-operator-granted.jsonbefore the redeploy — CLEARED. The deploy-time reconcile ran; it just could not land newsletters.What the box said
Asked directly (
journalctl -u idss-control-plane, the kept droplet170.64.183.213; the same two lines are atlogs/droplet-journal.txt:1957and:1969):Twice — the founder
operatorand the by-hand-grantedproof-operator. Nothing after: nonewsletters role reconciled, nonewsletters operator pre-provisioned.The defect
internal/newslettersvc/newslettersvc.go:271-278—provisionOperatorPOSTs/api/userswithusername/email/name/type/user_role_id/password_loginand nostatus. Listmonk passes the body through to Postgres, whoseuser_statusenum has no empty member, so the INSERT is refused. (The error is a driver error, not a Listmonk field-validation 400 — so the create got past Listmonk's own validators andstatusis the last gap.)The consequence is the honest tail doing its job:
ReconcileServicerecords a failed per-person reconcile as still owed (internal/member/roles.go:346,setServiceOutstanding(&ls.Members[i], service, owed)),detail.go:399renders it asNotApplied, and the leg refuses it.Why the unit tests were green
The faithful double's create handler (
newslettersvc_test.go:93-129) hard-codedstatus: "enabled"on every new row regardless of the request body — so#1553's pre-provision was proven against a Listmonk that does not exist. Same shape as#1580's missingemail, and the same lesson as GOTCHAS #246: the create's REQUIRED fields belong in the double, not in its generosity.Suspected layer
Product — the newsletters (Listmonk) port adapter, one missing key in one admin-API create body. Not harness, not fixture, not the drive.
Note on the signature
This is the third consecutive red at sig
03347fc9985d, but the signature has not RESISTED healing — each drive's red had a distinct fault and each heal advanced it. Heal #1 (2864527a) addednewsletters-oidc.serviceto the droplet journal dial; that is precisely whydroplet-journal.txtcarried the refusal line this time instead of needing the box asked by hand. This is the first drive whose evidence names the role-posture fault itself.Proposed ruling (Ruled by the healer under ADR 0174 — veto anytime)
Two-way door. Revertible by a single commit dropping one key (
"status": statusEnabled) from the map literal atinternal/newslettersvc/newslettersvc.go:280— nothing persists, no migration, no state on any box outlives the drive that made it.Proven by a test written here, red first.
TestNewslettersPort_ReconcileRoleOperatorNeverSignedInIsPreProvisionedandTestNewslettersPort_PreProvisionCarriesThePersonsEmailboth failed with the box's own words before the fix — the double now refuses a status-less create with the verbatim 500 body read off this drive's journal — and pass after. The pre-provision test also gained a new assertion (u.status != statusEnabled) pinning the created row's status.Mechanical, not a design decision.
statusEnabledis the port's own existing constant (newslettersvc.go:309), already the stateDisableCredentials/EnableCredentialsreconcile between — that posture decision was made elsewhere and is untouched. An enabled row is what the pre-provision already MEANT: its doc comment says the operator is "a Super Admin the instant they land", which a disabled account defeats. Nothing a community sees changes, no route, no secret, no default, no message at a trust moment — the code is made to do what it already declared it does. Rules 1 and 2 both hold: no assertion, test or leg was weakened, deleted or skipped (only added to), and the diff is 2 files / 14 non-test insertions (3 of the 4 deletions are theemail/name/typekeys re-emitted at gofmt's new alignment, values byte-identical; the 4th is the fake'sfakeUserconstruction line, which now carries the body's status instead of a hard-coded one). Built on the workstation (never the drive host) and closed through the close-report gate — the same gate a swarm worker passes.drive
20260918T165406Zred atredeploy-services(sig 03347fc9985d) — self-fixed on the fast lane, commitc87fe622aaea15e32e3e1349f2cae368a8175fc3; checks: Red-first:GOWORK=… go test ./internal/newslettersvc/ -run 'PreProvision|NeverSignedIn' -count=1after the double was made faithful and BEFORE the product fix — 2 FAIL, bothpre-provision operator "newcomer" failed: HTTP 500 — Listmonk said: {"message":"Error creating User: pq: invalid input value for enum user_status: \"\""}, i.e. the box's refusal reproduced byte-for-byte on the workstation. Targeted (after the fix): same command — ok. Package tests:GOWORK=… go test ./internal/newslettersvc/ -count=1— ok (0.017s). Dependent packages:GOWORK=… go test ./internal/newslettersvc/ ./internal/member/ ./internal/provision/ -count=1— all three ok.go vet ./internal/newslettersvc/— exit 0.gofmt -l internal/newslettersvc/— clean.GOWORK=… go build ./...— exit 0. Diff: 2 files, 33 insertions / 4 deletions; no assertion, test or leg touched except by ADDITION (one newt.Fatalfguard on the created row's status). The live leg needs a rented droplet and re-proves on the next drive.. evidence:/home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260918T165406Zon matou-workstation.close-report for #1592 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope