Skip to content

Defer agent webhook startup until platform and signature checks pass - #1149

Merged
sidneyswift merged 4 commits into
mainfrom
codex/platform-webhook-lazy-init
Oct 25, 2026
Merged

sidneyswift merged 4 commits into
mainfrom
codex/platform-webhook-lazy-init

Conversation

@sidneyswift

@sidneyswift sidneyswift commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Unsupported platforms and unsigned webhook events currently evaluate coding/content bot modules, constructing Redis state and adapters before rejection. The SDK itself initializes before adapter signature checks, so moving imports alone does not resolve the cold-start problem.

Check the existing platform/signature contracts first, then lazily import the existing singleton and handlers for authenticated events. Slack setup and WhatsApp GET verification complete without state. Valid events retain SDK-owned initialization, shared state prefixes, cached handler registration, raw request bodies and waitUntil. WhatsApp remains optional; no channel/user allowlists or new authentication authority are added. Startup/adapter failures return a bounded 500.

The existing POST regression now distinguishes Slack, GitHub and WhatsApp adapter spies. A deliberate WhatsApp-to-Slack dispatch mutation fails that case. Setup-guide initialization notes match the source, retaining separate callback/static-GitHub and hosted-acceptance limits.

Validation at composed head 45e3df8bc12c5462c0b4ab2ac463565dfd825028: 97 owner and 97 independently executed focused tests pass under a process-level network guard, with zero network attempts. Independent Standards/Spec review reports no findings for the bounded test/doc delta and composition. The prior full 356-test/48-file run and independent review at e860dcf3 remain preserved; runtime files are byte-identical. Prior whole-project TypeScript output had 218 existing diagnostics, byte-identical to its unchanged base; this is not a type-clean or fresh composed-head typecheck claim. Lint, formatting and diff checks pass. The branch merges actual main 673e67d7 without rewriting reviewed history and preserves the merged setup/content/context/OAuth changes.

Bounded existing API #297/#264 cold-import repair under Mono #358. API #1142 get_tasks remains preserved. The static coding-agent GitHub feedback endpoint and chat Slack route are unchanged. Historical #264 allowlist/config/logging acceptance is not closed. No credentials/env files, live Redis, providers, callbacks or customer writes were used. Source tests do not establish hosted delivery or configuration. See docs/verification/platform-webhook-lazy-init.md. Coordinator owns merge and release verification.

@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
api Ready Ready Preview Oct 25, 2026 3:27pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch was successfully deployed

1 active deployment
Preview — 45e3df8b Deployed Oct 25, 2026 by vercel[bot]
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