Skip to content

Simplify Discord routing, provider handling and AI replies - #63

Merged
jackm43 merged 2 commits into
mainfrom
codex/simplify-discord-boundaries
Oct 3, 2026
Merged

jackm43 merged 2 commits into
mainfrom
codex/simplify-discord-boundaries

Conversation

@jackm43

@jackm43 jackm43 commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Discord interactions and gateway events now route with match, and authenticated Discord payloads use documented wire fields directly. Removes redundant conversion and validation helpers, repeated shape checks, speculative fallback chains, and the single-use reply callback. AI requests and provider outputs use explicit formats with one fresh D1 settings snapshot per request.

Signature verification decodes hex directly while retaining fail-closed authentication, exact signed body bytes, and the five-minute timestamp window. AI replies preserve model text, IDs and formatting; allowed_mentions prevents pings and Discord's SUPPRESS_EMBEDS flag suppresses link previews. Reply length limits and empty-response fallback remain. Permissions, gateway lifecycle, Discord rate limits and bounded media streaming are preserved.

Validation: pnpm run check; pnpm test (116 passed); pnpm run test:runtime; production deployment dry run. GitHub Actions passed for commit 6d1def4. No schema, binding or command-registration changes.

Deployed production Worker version db2ef787-8419-4a23-a193-e97101d69843. The Cloudflare plugin confirmed 100% traffic. Live checks confirmed bare 401 responses for unsigned interactions and unauthenticated controls. The gateway was restarted after rollout and authenticated health confirms connected and resumable.

@jackm43 jackm43 changed the title Simplify Discord handling and Python Worker boundaries Simplify Discord routing, provider handling and AI replies Oct 3, 2026
@jackm43
jackm43 merged commit 07beb68 into main Oct 3, 2026
1 check passed
@jackm43
jackm43 deleted the codex/simplify-discord-boundaries branch October 3, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant