← Back to PRs

#18656: fix(signal): add missing groups field to Signal channel schema (#18635)

by awkoy open 2026-02-16 23:18 View on GitHub →
size: S
## Summary - Add `SignalGroupSchema` and `groups` field to `SignalAccountSchemaBase` so per-group configuration (`requireMention`, `tools`, `allowFrom`, etc.) is accepted by Zod validation — matching the existing Telegram, IRC, and WhatsApp patterns. - Add `groups` property to `SignalAccountConfig` TypeScript type with proper imports. - Add schema regression tests (accept valid groups, reject unknown keys). Fixes #18635 ## Test plan - [x] `pnpm check` — no type errors, lint clean, format clean - [x] `npx vitest run src/config/config.schema-regressions.test.ts` — 5 tests pass (3 new) - [x] `npx vitest run src/config` — all 387 config tests pass, no regressions 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- greptile_comment --> <h3>Greptile Summary</h3> Adds the missing `groups` field to the Signal channel's Zod schema and TypeScript type, enabling per-group configuration overrides (e.g., `requireMention`, `tools`, `skills`, `allowFrom`) that were already supported for Telegram, IRC, WhatsApp, and other channels. - New `SignalGroupSchema` in `zod-schema.providers-core.ts` follows the established `TelegramGroupSchema` pattern (with `.strict()` for unknown-key rejection) - `groups` field added to `SignalAccountSchemaBase` as `z.record(z.string(), SignalGroupSchema.optional()).optional()` - `SignalAccountConfig` TypeScript type updated with matching `groups` property and proper `GroupToolPolicyConfig` / `GroupToolPolicyBySenderConfig` imports - Three regression tests added covering valid minimal config, complex per-group overrides, and unknown-key rejection - Signal's existing `resolveChannelGroupRequireMention` call path in `event-handler.ts` will now pick up group configs correctly via the shared `resolveChannelGroups` utility <h3>Confidence Score: 5/5</h3> - This PR is safe to merge — it adds schema/type support following well-established patterns with no runtime behavior changes. - The changes are minimal, additive, and closely follow the existing Telegram/IRC/WhatsApp group schema patterns. The Zod schema uses `.strict()` for safety, the TypeScript type matches the schema exactly, and regression tests cover both positive and negative cases. The existing `resolveChannelGroupPolicy` infrastructure will correctly consume the new Signal groups config without any additional code changes. - No files require special attention. <sub>Last reviewed commit: 3d10806</sub> <!-- greptile_other_comments_section --> <sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub> <!-- /greptile_comment -->

Most Similar PRs