Server admin 21a: fluxer-devserver serveradmin scenario: READY, community, roles #688

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

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

Closes: —
Depends on: 1, 2, 3

Files:

  • Create: fixtures/scenarios/{serveradmin.toml,serveradmin_moderator.toml}, fixtures/gateway/{serveradmin_ready.json,serveradmin_moderator_ready.json}, fixtures/serveradmin/{bans.json,invites.json,members.json}, crates/fluxer-devserver/src/{admin.rs,permissions.rs}
  • Modify: crates/fluxer-devserver/src/{scenario.rs,http.rs,gateway.rs,lib.rs}, README
  • Test: crates/fluxer-devserver/tests/serveradmin.rs

Interfaces:

  • Produces: spec §9's scenario, first half. serveradmin (extends dailyuse): "Forked" with the user as owner, roles Admins > Moderators > Helpers > Members > @everyone (two of them at the same position to exercise the id tie-break), the guild's admin fields set, features BANNER and INVITES_DISABLED off, a member holding Admins, a bot, a timed-out member, 40 members for paging; serveradmin_moderator: the same guild with the user holding Moderators (KICK, BAN, MODERATE, MANAGE_ROLES, MANAGE_CHANNELS, MANAGE_NICKNAMES, MANAGE_GUILD off). permissions.rs: the server's permission and hierarchy checks for the scripted user (enough to answer MISSING_PERMISSIONS as the server would; api/guild/services/GuildRoleService.ts). REST and events: PATCH /guilds/{id} (validation limits, the feature rule with GUILD_FEATURE_NOT_TOGGLEABLE, GUILD_UPDATE), roles create / update / delete / positions (GUILD_ROLE_CREATE|UPDATE|DELETE|UPDATE_BULK, MAX_GUILD_ROLES at a scenario limit, RESOURCE_LOCKED once when [serveradmin] lock_next_reorder = true), a scripted "other client" that reorders roles and channels on a timer for the bulk-event tests.

  • Step 1: Write failing tests: both_readys_parse_with_proto_types, guild_patch_echoes_update, feature_outside_toggleable_refused, role_crud_emits_events, role_positions_emit_bulk_with_changed_roles_only, moderator_cannot_edit_role_above, moderator_cannot_grant_what_they_lack, resource_locked_once, scripted_reorder_emits_bulk.

  • Step 2–5: FAIL → implement → PASS → commit feat(devserver): serveradmin scenario, community and roles.

Task 21a of the Server administration plan (`docs/superpowers/plans/2026-11-15-serveradmin.md`, section "### Task 21a:"). The plan on the `serveradmin` branch is the source of truth; this copy is for reading. **Closes:** — **Depends on:** 1, 2, 3 **Files:** - Create: `fixtures/scenarios/{serveradmin.toml,serveradmin_moderator.toml}`, `fixtures/gateway/{serveradmin_ready.json,serveradmin_moderator_ready.json}`, `fixtures/serveradmin/{bans.json,invites.json,members.json}`, `crates/fluxer-devserver/src/{admin.rs,permissions.rs}` - Modify: `crates/fluxer-devserver/src/{scenario.rs,http.rs,gateway.rs,lib.rs}`, README - Test: `crates/fluxer-devserver/tests/serveradmin.rs` **Interfaces:** - Produces: spec §9's scenario, first half. `serveradmin` (extends `dailyuse`): "Forked" with the user as owner, roles Admins > Moderators > Helpers > Members > @everyone (two of them at the same position to exercise the id tie-break), the guild's admin fields set, features `BANNER` and `INVITES_DISABLED` off, a member holding Admins, a bot, a timed-out member, 40 members for paging; `serveradmin_moderator`: the same guild with the user holding Moderators (KICK, BAN, MODERATE, MANAGE_ROLES, MANAGE_CHANNELS, MANAGE_NICKNAMES, MANAGE_GUILD off). `permissions.rs`: the server's permission and hierarchy checks for the scripted user (enough to answer `MISSING_PERMISSIONS` as the server would; `api/guild/services/GuildRoleService.ts`). REST and events: `PATCH /guilds/{id}` (validation limits, the feature rule with `GUILD_FEATURE_NOT_TOGGLEABLE`, `GUILD_UPDATE`), roles create / update / delete / positions (`GUILD_ROLE_CREATE|UPDATE|DELETE|UPDATE_BULK`, `MAX_GUILD_ROLES` at a scenario limit, `RESOURCE_LOCKED` once when `[serveradmin] lock_next_reorder = true`), a scripted "other client" that reorders roles and channels on a timer for the bulk-event tests. - [ ] **Step 1: Write failing tests**: `both_readys_parse_with_proto_types`, `guild_patch_echoes_update`, `feature_outside_toggleable_refused`, `role_crud_emits_events`, `role_positions_emit_bulk_with_changed_roles_only`, `moderator_cannot_edit_role_above`, `moderator_cannot_grant_what_they_lack`, `resource_locked_once`, `scripted_reorder_emits_bulk`. - [ ] **Step 2–5:** FAIL → implement → PASS → commit `feat(devserver): serveradmin scenario, community and roles`.
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#688
No description provided.