/research_codebase i noticed that for some reason in production we seem to be accepting…
- User
/research_codebase i noticed that for some reason in production we seem to be accepting github push events and it returns with 200 even though lightfast doesnt accept github push. afaik, we dont use github push for anything so im curious why that event was acccepted by our @apps/platform/ layer.
note: right now we HAVE finally implement the githubpush with dot lightfast (repo index, see git status), but again, it deosnt make sense to me how some of events that clearly should havefailed pre-this new upgrade (in local) and having 200 status.
- User
research_codebase /research_codebase i noticed that for some reason in production we seem to be accepting github push events and it returns with 200 even though lightfast doesnt accept github push. afaik, we dont use github push for anything so im curious why that event was acccepted by our @apps/platform/ layer.
note: right now we HAVE finally implement the githubpush with dot lightfast (repo index, see git status), but again, it deosnt make sense to me how some of events that clearly should havefailed pre-this new upgrade (in local) and having 200 status.
Assistant· claude-opus-4-6
I'll research why GitHub push events were returning 200 in production before you implemented push handling. Let me start by reading the webhook ingestion code directly.
Assistant· claude-opus-4-6
Now let me read the critical files to trace exactly what happens when a push event hits the endpoint.
Assistant· claude-opus-4-6
Now let me read the
transformWebhookPayloaddispatch to confirm how push events are handled downstream.Assistant· claude-opus-4-6
I now have the complete picture. Let me gather metadata and write the research document.
Assistant· claude-opus-4-6
Here's what I found:
The ingest endpoint is an "accept everything, filter later" design. Push events return 200 because the HTTP layer has zero event-type awareness. Here's the flow:
Why push returns 200
The route at
apps/platform/src/app/api/ingest/[provider]/route.tsonly validates:- Provider exists (GitHub does)
- Headers present (
x-hub-signature-256,x-github-event,x-github-delivery) - HMAC signature valid
- Payload matches — which is a schema (just optional and with ) that any GitHub event passes
- User
so all good?
Assistant· claude-opus-4-6
Yeah, all good. The 200s on push events were by design — accept fast, filter async. The push deliveries were just getting marked "skipped" in the DB with no side effects. Now that you've implemented repo-index sync on push, they'll actually be processed instead of skipped.