Server admin 21b: fluxer-devserver serveradmin scenario: channels, members, bans, invites, sudo #689

Closed
opened 2026-11-15 19:01:27 +00:00 by charles · 0 comments
Owner

Task 21b of the Server administration plan (docs/superpowers/plans/2026-11-15-serveradmin.md, section "### Task 21b:"). The plan on the serveradmin branch is the source of truth; this copy is for reading.

Closes: —
Depends on: 21a

Files:

  • Create: crates/fluxer-devserver/src/{moderation.rs,sudo.rs}
  • Modify: crates/fluxer-devserver/src/{admin.rs,chat.rs,invites.rs,http.rs,scenario.rs}, README
  • Test: crates/fluxer-devserver/tests/serveradmin.rs (extend)

Interfaces:

  • Produces: PATCH /channels/{id} for guild channels (fields and limits of spec §3.6, whole-array overwrites, CHANNEL_UPDATE), PATCH /guilds/{id}/channels (preceding_sibling_id and parent_id applied as the server does — api/guild/services/channel/ChannelOperationsService.ts — CHANNEL_UPDATE_BULK, the 50-per-category limit), DELETE /channels/{id} for a guild channel and a category (children lose their parent), GET /channels/{id}/follower-stats; member PATCH for nick, roles and timeout (GUILD_MEMBER_UPDATE), …/members/@me, role PUT/DELETE, kick (GUILD_MEMBER_REMOVE), ban (GUILD_BAN_ADD then GUILD_MEMBER_REMOVE), bans list, unban (GUILD_BAN_REMOVE, USER_IS_NOT_BANNED), members-search (query, roles, dates, sort, paging; indexing: true for the first answer when [serveradmin] indexing_first = true), guild invites list, DELETE /invites/{code} (INVITE_DELETE); sudo: POST /guilds/{id}/delete, transfer-ownership and an mfa_level change answer SUDO_MODE_REQUIRED without a valid token or verification, INVALID_FORM_BODY with the password / mfa_code path for a wrong one, and success with X-Fluxer-Sudo-Mode-JWT for the scenario's password ([serveradmin] password) or code (totp_code, when account_has_2fa = true); every accepted body is recorded for assertions.

  • Step 1: Write failing tests: channel_patch_echoes_update, overwrites_replaced_whole, positions_apply_parent_and_sibling_and_emit_bulk, delete_category_orphans_children, member_patch_nick_roles_timeout, kick_and_ban_events_in_order, unban_and_not_banned_error, members_search_filters_sort_paging, indexing_first_answer, invite_delete_event, sudo_required_then_password_then_token, wrong_password_field_error, totp_when_account_has_2fa, transfer_changes_owner_and_emits_guild_update, moderator_refusals.

  • Step 2–5: FAIL → implement → PASS → commit feat(devserver): serveradmin channels, members, bans, invites, sudo.

Task 21b of the Server administration plan (`docs/superpowers/plans/2026-11-15-serveradmin.md`, section "### Task 21b:"). The plan on the `serveradmin` branch is the source of truth; this copy is for reading. **Closes:** — **Depends on:** 21a **Files:** - Create: `crates/fluxer-devserver/src/{moderation.rs,sudo.rs}` - Modify: `crates/fluxer-devserver/src/{admin.rs,chat.rs,invites.rs,http.rs,scenario.rs}`, README - Test: `crates/fluxer-devserver/tests/serveradmin.rs` (extend) **Interfaces:** - Produces: `PATCH /channels/{id}` for guild channels (fields and limits of spec §3.6, whole-array overwrites, `CHANNEL_UPDATE`), `PATCH /guilds/{id}/channels` (`preceding_sibling_id` and `parent_id` applied as the server does — `api/guild/services/channel/ChannelOperationsService.ts` — `CHANNEL_UPDATE_BULK`, the 50-per-category limit), `DELETE /channels/{id}` for a guild channel and a category (children lose their parent), `GET /channels/{id}/follower-stats`; member PATCH for nick, roles and timeout (`GUILD_MEMBER_UPDATE`), `…/members/@me`, role PUT/DELETE, kick (`GUILD_MEMBER_REMOVE`), ban (`GUILD_BAN_ADD` then `GUILD_MEMBER_REMOVE`), bans list, unban (`GUILD_BAN_REMOVE`, `USER_IS_NOT_BANNED`), `members-search` (query, roles, dates, sort, paging; `indexing: true` for the first answer when `[serveradmin] indexing_first = true`), guild invites list, `DELETE /invites/{code}` (`INVITE_DELETE`); sudo: `POST /guilds/{id}/delete`, `transfer-ownership` and an `mfa_level` change answer `SUDO_MODE_REQUIRED` without a valid token or verification, `INVALID_FORM_BODY` with the `password` / `mfa_code` path for a wrong one, and success with `X-Fluxer-Sudo-Mode-JWT` for the scenario's password (`[serveradmin] password`) or code (`totp_code`, when `account_has_2fa = true`); every accepted body is recorded for assertions. - [ ] **Step 1: Write failing tests**: `channel_patch_echoes_update`, `overwrites_replaced_whole`, `positions_apply_parent_and_sibling_and_emit_bulk`, `delete_category_orphans_children`, `member_patch_nick_roles_timeout`, `kick_and_ban_events_in_order`, `unban_and_not_banned_error`, `members_search_filters_sort_paging`, `indexing_first_answer`, `invite_delete_event`, `sudo_required_then_password_then_token`, `wrong_password_field_error`, `totp_when_account_has_2fa`, `transfer_changes_owner_and_emits_guild_update`, `moderator_refusals`. - [ ] **Step 2–5:** FAIL → implement → PASS → commit `feat(devserver): serveradmin channels, members, bans, invites, sudo`.
Sign in to join this conversation.
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
charles/fluxer-native#689
No description provided.