surveys: an operator who steps down still signs in, and a deploy never demotes from an operator set it could not read (GOTCHAS #354) #1945

Merged
ben merged 2 commits from session/surveys-demote-keeps-sign-in into main 2026-09-27 23:51:22 +00:00
Owner

On whakatohea-demo (2026-09-27), opening Surveys took the steward to LimeSurvey's own password form instead of signing them in. Two commits, GOTCHAS #354.

1. An operator who steps down still signs in

A deploy rendered the Surveys operator list without the steward's AID, the demote pass deleted their superadmin, and the seeded operator row held nothing else. Authwebserver claims the identity header only for an account holding auth_webserver (superadmin implies it), so LimeSurvey fell through to its password form, for an account whose password nobody knows.

idssauth now lands the member template (auth_webserver + the auth_webserver_autocreate_permissions set, read from the same config key the autocreate reads) on every operator it grants and on every one it demotes, before superadmin goes. A row the person already holds is left as it is.

2. A deploy never demotes from an operator set it could not read

Every deploy re-attaches the deploy-driven ports (surveys, archive) with the current operator set (#1554). operatorSet fell back to the founding seat alone when the roles seam errored: safe for a first render, a mass demotion on a re-render. The re-attach now reads the set first and HOLDS the re-render on a fault; the module on the box keeps its last list and the rest of the deploy lands.

Proof

  • Live, against the pinned LimeSurvey 6.15.14 in docker (opt-in, IDSS_SURVEYS_LIVE_PROOF=1 go test ./internal/clan -run TestSurveysAuthLive): red on the old command ("landed on LimeSurvey's password form … holds []"), green on the new.
  • TestRenderSurveys_OperatorCarriesTheMemberTemplateUnderSuperadmin, TestRenderSurveys_ParsesUnderNix (negative run reds it).
  • TestDeploy_ReAttachHeldWhenTheOperatorSetCannotBeRead: red on the old code (re-rendered [operator]), green on the new.
  • go test ./... green on the rebased tree.

Not covered

  • An account already stranded before this fix is not swept.
  • A control plane that reads a WRONG set without erroring (a hand-landed binary built on the wrong base).
  • A re-install over kept data keeps the first-render fallback.

🤖 Generated with Claude Code

On whakatohea-demo (2026-09-27), opening Surveys took the steward to LimeSurvey's own password form instead of signing them in. Two commits, GOTCHAS #354. ## 1. An operator who steps down still signs in A deploy rendered the Surveys operator list without the steward's AID, the demote pass deleted their superadmin, and the seeded operator row held nothing else. Authwebserver claims the identity header only for an account holding `auth_webserver` (superadmin implies it), so LimeSurvey fell through to its password form, for an account whose password nobody knows. `idssauth` now lands the member template (`auth_webserver` + the `auth_webserver_autocreate_permissions` set, read from the same config key the autocreate reads) on every operator it grants and on every one it demotes, before superadmin goes. A row the person already holds is left as it is. ## 2. A deploy never demotes from an operator set it could not read Every deploy re-attaches the deploy-driven ports (surveys, archive) with the current operator set (#1554). `operatorSet` fell back to the founding seat alone when the roles seam errored: safe for a first render, a mass demotion on a re-render. The re-attach now reads the set first and HOLDS the re-render on a fault; the module on the box keeps its last list and the rest of the deploy lands. ## Proof - Live, against the pinned LimeSurvey 6.15.14 in docker (opt-in, `IDSS_SURVEYS_LIVE_PROOF=1 go test ./internal/clan -run TestSurveysAuthLive`): red on the old command ("landed on LimeSurvey's password form … holds []"), green on the new. - `TestRenderSurveys_OperatorCarriesTheMemberTemplateUnderSuperadmin`, `TestRenderSurveys_ParsesUnderNix` (negative run reds it). - `TestDeploy_ReAttachHeldWhenTheOperatorSetCannotBeRead`: red on the old code (re-rendered `[operator]`), green on the new. - `go test ./...` green on the rebased tree. ## Not covered - An account already stranded before this fix is not swept. - A control plane that reads a WRONG set without erroring (a hand-landed binary built on the wrong base). - A re-install over kept data keeps the first-render fallback. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
On whakatohea-demo, opening Surveys took the steward to LimeSurvey's own password
form. A deploy had rendered the operator list without the steward's AID, the demote
pass deleted their superadmin, and the seeded operator row held nothing else:
Authwebserver claims the identity header only for an account holding auth_webserver
(superadmin implies it), so the header was declined and LimeSurvey fell through to
Authdb, for an account whose password nobody knows. Every operator who steps down
to member hit this.

idssauth now lands the member template (auth_webserver + the
auth_webserver_autocreate_permissions set, read from the same config key the
autocreate reads) on every operator it grants and on every one it demotes, before
superadmin goes. A row the person already holds is left as it is.

Proven against the pinned LimeSurvey 6.15.14 in docker by a new opt-in live test
(IDSS_SURVEYS_LIVE_PROOF=1), red on the old command ("landed on LimeSurvey's
password form … holds []"), green on the new. The render gains its parse-under-Nix
test (negative run: a doubled apostrophe in the PHP reds it).

Not swept: an account already stranded before this fix.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
provision: a deploy never demotes from an operator set it could not read — the re-render is held (GOTCHAS #354)
Some checks failed
ci / seam (pull_request) Failing after 7m27s
ci / publish (pull_request) Has been skipped
ci / publish-broker (pull_request) Has been skipped
ci / deploy-broker (pull_request) Has been skipped
99142764e5
Every deploy re-attaches the node's deploy-driven ports (surveys, archive) with the
current operator set (#1554), and those ports reconcile their admin set DOWNWARD to
the rendered list. operatorSet fell back to the founding seat alone when the roles
seam could not list the operators: safe for a port's first render, where there is
no list on the box to lose, and a mass demotion on a re-render.

The re-attach now reads the set first (readOperatorSet) and HOLDS the re-render on a
fault: the module on the box keeps the last list that was read, the deploy still
lands everything else, and the next deploy retries. A first render keeps the
founding-seat fallback.

Not covered: a control plane that reads a wrong set without erroring (a hand-landed
binary built on the wrong base).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ben merged commit 9ca9fd604f into main 2026-09-27 23:51:22 +00:00
Sign in to join this conversation.
No reviewers
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!1945
No description provided.