03dd6a14f8
The previous fix (patching DiscordAdapter.__init__.__globals__) caused 50 test failures because mutating the module dict leaked across tests on the same xdist worker — gateway tests that ran after e2e tests saw the e2e mock instead of the comprehensive mock. Replace the global patch with a helper `_discord_for_helpers()` that reads `discord` from DiscordAdapter's own globals. make_fake_dm_channel, make_fake_thread, and make_discord_message now use that helper, ensuring `isinstance` checks always match without side effects. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>