Skip to content

feat(018): External Event Adapter#23

Open
AlexU-A wants to merge 2 commits intomainfrom
claude/018-external-event-adapter
Open

feat(018): External Event Adapter#23
AlexU-A wants to merge 2 commits intomainfrom
claude/018-external-event-adapter

Conversation

@AlexU-A
Copy link
Copy Markdown
Contributor

@AlexU-A AlexU-A commented Mar 16, 2026

Summary

Complete implementation of kitty-spec 018 — External Event Adapter. Two-tier architecture for platform-native webhooks, cron schedules, and optional external automation forwarding.

  • Tier 1 (platform-native): Webhook ingestion (GitHub + generic parsers), HMAC auth, event buffer with DLQ, cron scheduler with timezone support, source CRUD with lifecycle management
  • Tier 2 (external automation): Outbound webhook forwarding with circuit breaker (10-failure threshold, 5-min half-open), platform subscriptions with fan-out (20-concurrent limit), trigger callback endpoint
  • Admin & observability: Server-rendered admin panel (4 views, XSS-safe), activity log with pagination/filtering/replay, health endpoint with 10 aggregate metrics

Stats

  • 13 work packages
  • 45 files changed (+14,147 lines)
  • ~420 tests across unit, integration, and E2E layers

Architecture

src/event-adapter/
├── parsers/      (GitHub, generic webhook)
├── routes/       (9 route files: admin, automation, events, health, schedules, sources, subscriptions, trigger, webhook)
├── services/     (auth-validator, automation-forwarder, event-buffer, event-translator, payload-mapper, rate-limiter, scheduler, secret-store, trigger-forwarder)
├── workers/      (buffer-drain)
├── schema.ts, types.ts, validation.ts, index.ts

Integration points

  • src/index.ts — mounts router at /v1/events
  • src/db/client.ts — registers event-adapter schema in Drizzle ORM

Known TODOs

  • WP10: POST /trigger bearer token validation is a placeholder (uses raw token as tenant_id)
  • WP10/WP11: Pipeline ownership verification requires pipelines table access

Supersedes backlog #9 and #24.

Test plan

  • npm run build passes (TypeScript compilation)
  • npx vitest run tests/event-adapter/ — all ~420 tests pass
  • Review webhook ingestion flow (WP01-05)
  • Review cron scheduler (WP06-08)
  • Review external automation circuit breaker (WP10)
  • Review platform subscriptions fan-out (WP11)
  • Review admin panel XSS prevention (WP12)
  • Verify E2E integration tests cover cross-service flows (WP13)

🤖 Generated with Claude Code

Two-tier event adapter for platform-native webhooks, cron schedules,
and optional external automation forwarding.

Tier 1 (platform-native):
- Webhook ingestion with GitHub + generic parsers
- HMAC signature validation and per-source auth
- Event buffer with DLQ and drain worker
- Cron scheduler with timezone support
- Source CRUD with lifecycle management

Tier 2 (external automation):
- Outbound webhook forwarding with circuit breaker
- Platform subscriptions with fan-out (20-concurrent limit)
- Trigger callback endpoint

Admin & observability:
- Server-rendered admin panel (4 views, XSS-safe)
- Activity log with pagination, filtering, replay
- Health endpoint with 10 aggregate metrics

13 work packages, ~14,000 lines, ~420 tests across unit/integration/E2E.

Known TODOs:
- WP10: POST /trigger bearer token validation is placeholder
- WP10/WP11: Pipeline ownership checks need pipelines table

Implements kitty-spec 018. Supersedes backlog #9 and #24.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@AlexU-A AlexU-A force-pushed the claude/018-external-event-adapter branch from ae338a0 to 8a7d114 Compare March 19, 2026 18:36
Add gitignore exceptions and WP01-WP04 task stub files for
kitty-specs/011-inngest-migration so the governance REF-001 check
passes. Follows the same pattern as specs 005, 006, 007, 008, 009.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: fd7d2e1083a4
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