22
33Hosted webhook deployment bundle for the Coven GitHub integration.
44
5- This repository tracks the Python webhook adapter used to receive GitHub App
5+ This repository tracks the TypeScript webhook adapter used to receive GitHub App
66events, capture review context, run ` coven-code ` , and publish structured review
77results back to GitHub.
88
@@ -12,8 +12,11 @@ reproduced, and changed through PRs instead of server-only edits.
1212
1313## Files
1414
15- - ` coven_github_adapter.py ` - webhook handler, task runner, PR evidence capture,
16- Codex-backed headless runtime invocation, and comment publisher.
15+ - ` src/adapter.ts ` - webhook handler, task router, task runner, PR evidence
16+ capture, Codex-backed headless runtime invocation, and comment publisher.
17+ - ` src/server.ts ` - Node HTTP entrypoint for ` / ` , ` /healthz ` , and ` /webhook ` .
18+ - ` tests/webhook-adapter.test.ts ` - parity coverage for signature handling,
19+ request body edge cases, and task routing guards.
1720- ` scripts/smoke-webhook.sh ` - local HMAC signature smoke test for a running
1821 webhook endpoint.
1922
@@ -34,10 +37,27 @@ The deployment expects secrets and mutable state to be supplied outside git:
3437Do not commit private keys, webhook secrets, OAuth tokens, generated task state,
3538workspaces, or attempt artifacts.
3639
40+ ## Local runtime
41+
42+ Install dependencies, build TypeScript, and start the webhook service:
43+
44+ ``` bash
45+ npm ci
46+ npm run build
47+ WEBHOOK_SECRET=" replace-with-local-secret" npm start
48+ ```
49+
50+ For local development without a build step:
51+
52+ ``` bash
53+ WEBHOOK_SECRET=" replace-with-local-secret" npm run dev
54+ ```
55+
56+ The server listens on ` PORT ` or ` 3000 ` by default.
57+
3758## Local smoke test
3859
39- Run the adapter behind any WSGI server that points at
40- ` coven_github_adapter:application ` , then verify signature handling:
60+ Run the adapter, then verify signature handling:
4161
4262``` bash
4363WEBHOOK_SECRET=" replace-with-local-secret" \
@@ -48,6 +68,13 @@ The smoke test proves that unsigned requests and bad signatures are rejected,
4868while a correctly HMAC-signed GitHub ` ping ` delivery is accepted without needing
4969` coven-code ` or a GitHub installation token.
5070
71+ ## Verification
72+
73+ ``` bash
74+ npm test
75+ npm run build
76+ ```
77+
5178## Policy
5279
5380The default checked-in policy is empty:
0 commit comments