Live-validate the open-registration auth path end-to-end (post-#71) + management-bot e2e actor #76
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dark/nether-voicebridge#76
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 self-serve link/approve flow is the critical path for open registration, and it needs an end-to-end live test with the auth knobs on before it can be turned on for strangers.
Why now
open_registrationrequiresrequire_room_authority+require_discord_approval(config validation enforces this). All three are shipped and deployed to prod but off. The flow was last live-tested in the #47 staging pass (2026-07-06, auth 5/5) — but #71 has since rewritten the management command gating (the new DM-onlyis_command_roomgate fronts every command path). That change is currently only unit-tested, so the exact path open registration depends on has not been exercised live since it changed.What to validate (all three knobs ON)
link <name> <room> <guild> <channel>/bridge approve code:<code>on Discord within the timeout → bridge created, both sides notifiedunlink/listscoped to bridges the user created; operator commands remain allowlist-onlymax_tenants_per_ownercap enforced; deny-listed owner/guild/room refusedHarness gap
The
nvb-e2eframework has no management-bot actor yet (the unbuilt part of #38 D3). Two paths:nvb-e2e— becomes a permanent regression guard for the whole auth flow.Gate: this must pass before
open_registrationis enabled in prod. Related: #71, #47, #43, #38.Implementation plan (design notes)
Traced the approval seam to scope automation feasibility.
/bridge approve code:<code>is a Discord slash command (handle_approve_command,crates/discord/src/puppet.rs:2424) that checks the invoking user's Manage Server permission, then sends aDiscordApprovalover an mpsc channel to the Matrix side (handle_discord_approval,crates/matrix-rtc/src/mgmt.rs:1539, consumed viaapproval_rxatmgmt.rs:91). A bot cannot invoke a slash command, and the harnessmod_tokenis a bot — so the/bridge approveclick itself is not bot-automatable.Decomposition:
nvb-e2emanagement-client actor: anvbtest_*user (as_token masquerade) opens a DM with the bridge bot, sendslink <name> <room> <guild> <channel>, scrapes the reply. Scenario asserts: room-authority probe (sender must be room moderator — needs one-time PL setup for a test user in an Auto Test room), PL-0/RTC prereq checks, pending-code issuance,unlink/listscoping to own bridges,max_tenants_per_owner, deny-list refusal, and the #71 DM-gate (a command sent from a non-DM/shared room must be ignored — the specific regression this issue exists to guard).DiscordApprovaldirectly intoapproval_rx(small test seam needed) to exercisehandle_discord_approvalend-to-end: code match,approval_timeout_secs, guild-match, bridge creation + both-sides notification. Bypasses Discord's UI but covers the whole redemption→creation path.handle_approve_command's permission logic + one manual staging confirmation (a human runs/bridge approveonce with all knobs on).Config: run with
require_room_authority+require_discord_approval+open_registrationall ON. Prereq: build the management-client actor (this is also the missing #38 D3 "mod actor" piece). Manual-only interim (option b) if the actor is deferred.See also: the harness cannot drive real Discord slash commands (design constraint worth recording for any future approval-flow test work).
Correction to the plan above: the management-client actor (part 1) is not the #38 D3 "mod actor" — I conflated them. Two different actors:
nvbtest_*appservice user driven viaas_tokenmasquerade (same mechanism as theMatrixSpeaker/MatrixListeneractors), which DMs the bridge bot to runlink/unlink/list. No new bot is needed — only a one-time moderator-PL grant to a test user in an Auto Test room so therequire_room_authorityprobe passes.nvb-test-modapplication, already wired asmod_tokenin the staginge2e.toml) for force-move / moderation scenarios (#62). It is unrelated to #76.So #76 reuses existing test identities; it does not require creating or provisioning any new bot or account.
linkpending-code reply #80Done. The open-registration auth path was live-validated end-to-end via the new
MatrixManagementCliente2e actor +mgmt_self_serve_linkscenario (self-serve reachability, #71 DM-gate, invite gate, room-authority neg+pos → pending code, caps, deny-list, list/unlink scoping), plus in-crate approval-redemption tests and thecan_approveunit test; the manual/bridge approveDiscord-UI check also passed. Merged (master8f23abf), shipped in v0.3.0-alpha.16, deployed to prod 2026-07-11.