e2e: compile-gated approval seam — live-test the full self-serve link→approve→audio flow (the one leg bots cannot drive) #113
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#113
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 one hole no live scenario can reach. Discord
/bridge approveis a slash-command interaction, and a bot cannot invoke an interaction (only a human client can; the self-bot route is a ToS violation we've ruled out). So no live scenario has ever driven a self-servelinkall the way to a RUNNING bridge with audio — the approve step is an unbridgeable gap in the middle of the flow. Today we cover its pieces separately (Manage-Server gate = unit test; code redemption/commit = in-crate test injecting a syntheticDiscordApproval) and the real click is a once-per-change manual check.Proposal: a compile-time-gated approval seam so the harness can fabricate the approval inside a running bridge and finally run
link → pending code → (seam) approve → bridge spawns → assert audio → unlinkas ONE live scenario — ideally with a FEDERATED requester (the fixture, #109), which would be the single most realistic test the suite can hold.Design
test-approval-seam(default OFF). Under it only, expose a path that feeds aDiscordApprovalinto the existingapproval_rx→handle_discord_approvalchannel (crates/matrix-rtc/src/mgmt.rs:111/1020) — i.e. it reuses the REAL redemption/commit machinery; it fabricates only the Discord-interaction half thathandle_approve_command(crates/discord/src/puppet.rs:2473) normally produces.approve-test <code> <guild>compiled in ONLY under the feature (no arm exists otherwise).--features test-approval-seam.Safety is the point — treat "can't reach prod" as a REQUIREMENT, not a footnote
A test-only auth bypass is safe by design, catastrophic by accident. Non-negotiables:
cargo build(release/deb profile) →strings/symbol check the artifact for the seam symbol = absent..forgejo/workflows/docker.yml+ the deb/rpm packaging: they must never pass--features test-approval-seam. Add a CI assertion that the shipped binary lacks the seam.WARN: test approval seam COMPILED IN — never run this build in production, and the e2e config refuses the full-flow scenario against a binary that doesn't announce the seam (so the scenario can't silently no-op).What still stays manual (smaller than today)
The thin serenity slice — real interaction DISPATCH + option parsing in
handle_approve_command— isn't exercised by the seam. Cover it with a synthetic-interaction unit test, and keep the once-per-change human/bridge approveclick. The seam moves the manual boundary from "the entire approve leg" to "millimeters of interaction plumbing."Payoff
First-ever live coverage of the COMPLETE self-serve journey to running audio; composes with #109 for a federated-requester end-to-end; closes the last structural blind spot after #99 + the fixture.