redeploy-services: the switch exits 4 — newsletters-oidc 400s on Listmonk 6.1.0 (lists:get is no permission, default_user_role is no settings key) and limesurvey-auth fails with its stderr unharvested #1573
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.
Reference
Matou/idss#1573
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
20260918T042205Z, legredeploy-services, red after 878 s(
artifacts/legs.json, last entry;artifacts/verdict.json→firstRedLeg: "redeploy-services", 29 green / 1 red). The gateway switch exited 4 on twofailed units (
logs/droplet-units.txt:2-3):Deploy was attempted three times (~05:01, ~05:07, ~05:13); both units failed
every time. This is the deferred clan-lab fidelity drive STATUS.md named when
#1541 landed ("the exact Listmonk settings-key + roles-API fidelity is the
deferred clan-lab drive"), and it has come back with the answer: the pinned
payload does not match the pinned Listmonk.
Fault 1 — newsletters-oidc: two wrong constants against Listmonk 6.1.0 (CONFIRMED)
The box runs
listmonk-6.1.0(logs/droplet-stall.txt, process table). Iunpacked the pinned upstream source (
v6.1.0) and read the two endpoints theoneshot drives.
1a.
lists:getis not a Listmonk user-role permission.internal/clan/newsletters.go:582creates theMembersrole withListmonk 6.1.0's whole user-role permission set is
permissions.json; thelistsgroup holds exactlylists:get_allandlists:manage_all. There is nolists:get(list:getexists, but it is a list-role permission, validatedseparately in
cmd/roles.go:181-192).CreateUserRole(cmd/roles.go:35-50)runs
validateUserRole(cmd/roles.go:167-179), which returnsecho.NewHTTPError(http.StatusBadRequest, …"permission: lists:get")for anypermission absent from
cfg.Permissions— the map built frompermissions.jsonat
cmd/init.go:501-515. SoPOST /api/roles/usersanswers 400, which isexactly what the journal records.
1b.
security.oidc.default_user_roleis not a settings key — it isdefault_user_role_id.internal/clan/newsletters.go:591buildsListmonk's OIDC settings block (
models/settings.go:55-64) is{enabled, provider_url, provider_name, client_id, client_secret, auto_create_users, default_user_role_id, default_list_role_id}.default_user_rolebinds to nothing, so
DefaultUserRoleIDstays 0 — and withauto_create_userstrue,
cmd/settings.go:236-241rejects that outright:So even with 1a fixed, the settings
PUTanswers 400 too. Both faults areindependently fatal to the unit.
Which 400 the log shows. The journal
(
logs/droplet-journal.txt:2-10, repeating at:68-74,:132-138,:202-208,:266-272,:330-336) shows each retry completing the whole kanidm half —Login Success for idm_admin@…,POST /v1/oauth2/newsletters/_attr/oauth2_rs_origin200,
POST …/_scopemap/idm_all_persons200, twoPATCH /v1/oauth2/newsletters200,
GET /v1/oauth2/newsletters/_basic_secret200 — and then dying oncurl: (22) The requested URL returned error: 400. The failing curl's pid isconsistently +8 from the
show-basic-secretpid (16913→16921, 16942→16950,16968→16976, 16994→17002, 17020→17028, 17045→17053), which lands on the nested
POST /api/roles/userscommand substitution, not the shallowercurrent=$(curl … /api/settings)(+6). So fault 1a fires first; 1b is behind it.Fault 1c, a third defect the same code carries: compare-before-write can never
converge.
internal/clan/newsletters.go:592-595compares the whole live blockagainst the whole desired one. That can never be equal, on two counts: the live
block always carries
provider_nameanddefault_list_role_id(whichdesiredomits), and Listmonk masks the client secret on every read
(
cmd/settings.go:81:s.OIDC.ClientSecret = strings.Repeat(pwdMask, …)), solive.client_secretis bullets andwant.client_secretis the real kanidm basicsecret. The acceptance's "a second run writes nothing" is therefore false even on
a fixed payload: once 1a/1b land, every rebuild will re-PUT the settings and
systemctl try-restart listmonk.service. The compare must be restricted to thekeys the reconciler sets, excluding
client_secret.Suggested shape
permissions:["lists:get_all","subscribers:get"]—lists:get_allis the onlyuser-role spelling of "lists view" Listmonk 6.1.0 has. This is the one
judgement point in the ticket: it lets a Members-role member see all lists
(there is no per-list narrowing at the user-role tier — that is a separate list
role). If the intended posture is narrower, the honest alternative is to drop
the lists permission and grant
subscribers:getalone; say so in the DDR ratherthan inventing a permission string.
default_user_role_id:$midin the desired block.{enabled, provider_url, client_id, auto_create_users, default_user_role_id}on both sides, so idempotency holdsagainst a masked secret and the two keys Listmonk always returns.
Fault 2 — limesurvey-auth fails, cause unharvested
limesurvey-auth.servicefailed at 05:01:28 and 05:07:30 and the run directorycarries no output from it — only the
systemctl --failedrow. The unit-blindjournalctl -n 2000harvest was swamped by fault 1's own retry loop (~1500kanidmd lines), collapsing its window to 05:10:22–05:13:47, and the #536 unit
harvest names a fixed set (nginx / phpfpm-nextcloud / nextcloud-setup) that does
not reach limesurvey-auth. I healed that gap in-lane
(
scripts/lib/rehearsal-droplet.sh, commita3eda06a: every failed unit's ownboot journal is now pulled by name), so the next drive brings the cause home —
but this drive cannot say what it is.
What is known: the unit is the #1540/#1552 community-sign-in bridge
(
internal/clan/surveys.go:965-1028, PHP console command atinternal/clan/surveys.go:819-963), last touched by66fe9b1cfor the #1558fault (the
Authwebserverclass-name casing,loadPlugin's returned instance,saveSettingslower-case keys, the dotted mail domain). That fix did not clearit. A clan-lab reproduction (or the next drive, with the harvest landed) should
name whether it dies in the plugin half or the superadmin-reconcile half.
Why I refused to heal this in-lane
Refusal rule 1. The render tests pin the exact wrong payload as the value
they prove:
internal/clan/newsletters_test.go:310(
… auto_create_users:true, default_user_role:$mid}),:312and:328-329(the compare-before-write lines byte-for-byte). Fixing the render means changing
what those checks assert — not moving them — which is precisely the signal that
the product contract changed and the red belongs on a ticket, not in a heal.
Fault 1c compounds it: restricting the compare is a redesign of the idempotency
check the acceptance names, and fault 2 has no diagnosis at all yet.
Suspected layer
internal/clan/newsletters.go(the newsletters port's OIDC reconciler render)for fault 1, with its pinned render tests;
internal/clan/surveys.go(thesurveys port's limesurvey-auth oneshot) for fault 2. Both are the #1535
"one community sign-in at every door" arc landing against the real, pinned
services for the first time.
drive
20260918T042205Zred atredeploy-services:deploy failed (clean-retry): provision: deploy gateway: clan: deploy failed on 1 node(s): gateway: clan: masked_exit on gateway: clan reported success but the log shows a real failure: the remote switevidence:
/home/dev/swarm/Matou/idss/test-results/drive-rented-services/20260918T042205Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedswarm-claim host=elitebook-distributed-server-03 run=26393
(automated multi-host claim — lowest live claim id works this ticket)
Ruled by agent under ADR 0174 — veto anytime.
The ticket's one judgement point (Fault 1a): Listmonk 6.1.0 offers no per-list-narrowing "lists view" at the user-role tier — only
lists:get_all/lists:manage_all. I choselists:get_allfor the Members role (permissions:["lists:get_all","subscribers:get"]).The ruling:
lists:get_alllets a Members-role member view all lists' metadata. That is the faithful spelling of the intentinternal/clan/newsletters.goalready documents for this role — "lists view/subscribe, no campaigns" (newslettersMembersRole) — and matches what #1541 designed the role to do. It is NOT a widening beyond that design: the original code asked forlists:get(a lists-view permission that simply does not exist at this tier), so this restores the intended posture with the only spelling Listmonk 6.1.0 has, rather than inventing a string.Why it is a two-way door: revertible by a one-line render change (drop to
subscribers:getalone if the intended posture turns out narrower), offline-provable by the render test, and provable live by the nextredeploy-servicesdrive. It is not on the one-way-door list — it does not widen a security posture beyond the already-designed role, touches no personal credential, and destroys no data.What proves it:
TestRenderNewsletters_OIDCSettingsPayloadPinnedpinslists:get_alland refuseslists:get; the correctedPOST /api/roles/usersno longer 400s (the fault the drive recorded). If a narrower posture is wanted, say so and it swaps tosubscribers:getalone.close-report for #1573 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope