Submatter/plans/Plan-automation-foundation/Epic-forge-webhooks/Task-forge-webhook-receiver.md
Randall Stillwell 35def387ae docs(plans): add Autensa benchmark tasks to automation foundation roadmap
Map reliability, operator UX, and spend-control follow-ons onto epics 1–9
so worker, webhooks, and fleet work have bead-scale task briefs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 10:48:36 -05:00

1.5 KiB

kind slug title plan_slug epic_slug status priority tenant_id owner cursor_todo_id updated_at
task forge-webhook-receiver Forge webhook receiver — PR and CI events automation-foundation forge-webhooks ready P2 global unassigned null 2026-08-03

Task summary

POST /api/webhooks/forge/:repoLinkId with HMAC signature verification; map forge events to transition_convoy_status(actor: automation).

Description

Core Epic 8 scope. Link PRs to convoys via branch naming convention (convoy/<slug>/brief-N) or PR body marker (echodo-convoy: <uuid>).

Events (minimum)

Forge event Convoy transition
PR opened Ensure convoy in pr_review (if Gate 2 not yet human-approved, notify only)
PR merged pr_review → merged when Gate 2 already approved
CI completed (failure) Optional blocked or convoy_events notify

Security

  • Per-repo webhook secret in repo_links metadata (reference env var name, not value)
  • Zod-validated payload per forge_type

Dependencies

  • Epic 3, 4, 7

Subtasks

  • Route handler + signature verification
  • GitHub + Forgejo payload parsers
  • Convoy lookup by branch/body marker
  • Register webhook URL helper on connect (optional UX)

Estimation

M

Acceptance criteria

  • Merge webhook moves convoy from pr_review to merged when Gate 2 approved
  • Invalid signature returns 401
  • Unknown branch logs and returns 200 (no retry storm)
  • Epic: ./Epic-forge-webhooks.md