From 289e8232894e0724579a3ed2fdca2a69538cdf00 Mon Sep 17 00:00:00 2001 From: T3 Code PR Stack <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 18 Sep 2026 14:15:16 +0200 Subject: [PATCH] fix(discord-bot): bump dfx to 1.0.16 for Effect rc.115 sockets dfx 1.0.15 still calls Socket.writer as writeRaw. On Effect 4.0.0-rc.115 that throws TypeError: writeRaw is not a function, so the gateway never IDENTIFYs. REST still works, which made the bot look healthy while mentions and slash commands were deaf. 1.0.16 uses writer.write and reader.pull. --- .../src/discord/dfxGatewaySocket.test.ts | 16 ++++++++++++++++ pnpm-lock.yaml | 12 ++++++------ pnpm-workspace.yaml | 2 +- 3 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 apps/discord-bot/src/discord/dfxGatewaySocket.test.ts diff --git a/apps/discord-bot/src/discord/dfxGatewaySocket.test.ts b/apps/discord-bot/src/discord/dfxGatewaySocket.test.ts new file mode 100644 index 000000000000..24f7f88437d4 --- /dev/null +++ b/apps/discord-bot/src/discord/dfxGatewaySocket.test.ts @@ -0,0 +1,16 @@ +import * as NodeModule from "node:module"; + +import { describe, expect, it } from "vite-plus/test"; + +const require = NodeModule.createRequire(import.meta.url); + +describe("dfx Discord gateway Socket compat", () => { + it("is 1.0.16+ so shards use writer.write, not writeRaw", () => { + const version = (require("dfx/package.json") as { version: string }).version; + const [major = 0, minor = 0, patch = 0] = version.split(".").map(Number); + // dfx 1.0.15 calls the Effect rc.115 writer as a function (`writeRaw is not + // a function`) and the Discord gateway never IDENTIFYs. Mentions go silent + // while REST (slash registration, rehydrate) still looks healthy. + expect(major > 1 || (major === 1 && (minor > 0 || patch >= 16))).toBe(true); + }); +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0aa5f67208a2..42fff6ad94f2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,8 +25,8 @@ catalogs: specifier: 1.3.0-beta.10 version: 1.3.0-beta.10 dfx: - specifier: 1.0.15 - version: 1.0.15 + specifier: 1.0.16 + version: 1.0.16 jose: specifier: 6.2.2 version: 6.2.2 @@ -234,7 +234,7 @@ importers: version: link:../../packages/shared dfx: specifier: 'catalog:' - version: 1.0.15(effect@4.0.0-rc.115(patch_hash=0dfc4bb8ebd80fb3e06b91ef61346f5259517ab0f2437644fe95ae531084b1f5)) + version: 1.0.16(effect@4.0.0-rc.115(patch_hash=0dfc4bb8ebd80fb3e06b91ef61346f5259517ab0f2437644fe95ae531084b1f5)) effect: specifier: 4.0.0-rc.115 version: 4.0.0-rc.115(patch_hash=0dfc4bb8ebd80fb3e06b91ef61346f5259517ab0f2437644fe95ae531084b1f5) @@ -6799,8 +6799,8 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} - dfx@1.0.15: - resolution: {integrity: sha512-LqHeOZLcOJB5D0+BUiy6XkthunolbJoSAAIOjXEiux5P6CzXPbJl0EkaWSDXTbkj/F/pdW9lk1zCC4XAl8yG+w==} + dfx@1.0.16: + resolution: {integrity: sha512-yiaAPJpWfY9pJA4qTxckKwe9mThO+LiGtIOaChe4RxAwYUrRIo8ArDJ3+hFsiDa9CXi+QYaG0E43avG2nhOx4Q==} peerDependencies: effect: 4.0.0-rc.115 @@ -17247,7 +17247,7 @@ snapshots: dependencies: dequal: 2.0.3 - dfx@1.0.15(effect@4.0.0-rc.115(patch_hash=0dfc4bb8ebd80fb3e06b91ef61346f5259517ab0f2437644fe95ae531084b1f5)): + dfx@1.0.16(effect@4.0.0-rc.115(patch_hash=0dfc4bb8ebd80fb3e06b91ef61346f5259517ab0f2437644fe95ae531084b1f5)): dependencies: discord-api-types: 0.38.55 effect: 4.0.0-rc.115(patch_hash=0dfc4bb8ebd80fb3e06b91ef61346f5259517ab0f2437644fe95ae531084b1f5) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index afd7ac70aafb..447a9e312150 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -23,7 +23,7 @@ allowBuilds: workerd: false catalog: - dfx: 1.0.15 + dfx: 1.0.16 "@clerk/backend": 3.18.1 "@clerk/clerk-js": 6.32.1 "@clerk/electron": 0.0.44