Bug Description
The DiscordGuildChannelConfig type in types.discord.ts is missing the autoThread field, even though:
- The Zod schema (
DiscordGuildChannelSchema) includes autoThread: z.boolean().optional() at line 358
- Runtime code actively uses it in
threading.ts:370, message-handler.process.ts:257, and allow-list.ts:501
- The runtime code in
allow-list.ts had to define its own local type with autoThread?: boolean (line 41) to work around the missing canonical type field
Impact
- Type safety gap: the canonical type doesn't reflect a field that the schema validates and runtime reads
- Code in
allow-list.ts maintains a shadow type definition that could drift from the canonical type
Root Cause
Type/schema drift: autoThread was added to the Zod schema and runtime code but not to the canonical TypeScript type in types.discord.ts.
Bug Description
The
DiscordGuildChannelConfigtype intypes.discord.tsis missing theautoThreadfield, even though:DiscordGuildChannelSchema) includesautoThread: z.boolean().optional()at line 358threading.ts:370,message-handler.process.ts:257, andallow-list.ts:501allow-list.tshad to define its own local type withautoThread?: boolean(line 41) to work around the missing canonical type fieldImpact
allow-list.tsmaintains a shadow type definition that could drift from the canonical typeRoot Cause
Type/schema drift:
autoThreadwas added to the Zod schema and runtime code but not to the canonical TypeScript type intypes.discord.ts.