Skip to content

refactor(discord): extract VoiceReceiver into voice_receiver (adapter.py god-file slice R1) - #79650

Open
andrexibiza wants to merge 1 commit into
NousResearch:mainfrom
andrexibiza:fix/dc-voice-receiver
Open

refactor(discord): extract VoiceReceiver into voice_receiver (adapter.py god-file slice R1)#79650
andrexibiza wants to merge 1 commit into
NousResearch:mainfrom
andrexibiza:fix/dc-voice-receiver

Conversation

@andrexibiza

@andrexibiza andrexibiza commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

discord adapter.py god-file slice R1: extract VoiceReceiver from plugins/platforms/discord/adapter.py (10,138 lines) into plugins/platforms/discord/voice_receiver.py. Part of the repo-wide large-file decomposition (tracker #78647).

What changed and why

  • VoiceReceiver (window 514–897, 383 lines, 13 members) moved byte-verbatim (golden hash 8085b15e… verified) into voice_receiver.py; adapter.py re-exports all 13 names identity-preserving (re-export mandatory — test_discord_race_polish.py patches the adapter-module global)
  • Zero intra-R1 coupling; 2 later call sites (4176, 4529) resolve through the re-export
  • 3 existing test files already treat VR as a unit (test_voice_command.py, test_voice_channel_flow.py, test_discord_race_polish.py)
  • Double-blind: 2 analysts → consensus (R1-CONSENSUS.md — pass B's pick won over pass A's Liveness on the refactor(discord): extract authorization cluster into DiscordAuthorizationMixin #75735 collision evidence) → implementer → 2 blind re-reviewers

Testing

  • 98 tests passed (voice command + channel flow + race polish + 20 new seam tests), 0 failed
  • Seam identity: adapter.VoiceReceiver is voice_receiver.VoiceReceiver verified live
  • ruff F401 clean · git diff --check clean · LF-only · DCO signed

Coordination / interlock

Part of #78647
Part of #78634

Part of #79564
Part of #79772

Reapply the verified R1 extraction unchanged because the Discord adapter has not changed between d762ed9 and f43eabe.

Part of NousResearch#78647
Part of NousResearch#78634
Part of NousResearch#79564
Part of NousResearch#79772

Signed-off-by: Axl Ibiza <84248988+andrexibiza@users.noreply.github.com>
@andrexibiza
andrexibiza force-pushed the fix/dc-voice-receiver branch from 94ce1fd to 887a8ce Compare August 20, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have platform/discord Discord bot adapter type/refactor Code restructuring, no behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants