Skip to content

Implement Granola webhook signature verification and payload parsing - #2

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-5089-move-granola-webhook-signature-verification-payload-parsing
Aug 2, 2026
Merged

Implement Granola webhook signature verification and payload parsing#2
TheGreatAxios merged 1 commit into
mainfrom
cl-5089-move-granola-webhook-signature-verification-payload-parsing

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

  • Replaces the skeleton verifyGranolaSignature placeholder with the real Standard-Webhooks HMAC-SHA256 implementation moved from corbitsdev/scout (hub/src/granola/webhook.ts) — signature verification, secret decoding, timestamp-freshness check, multi-signature rotation support, constant-time compare
  • Adds payload parsing/validation (parseGranolaPayload, GranolaWebhookPayload) and the test-signing helper (signGranolaPayload)
  • Pure functions — no network, no side effects, no dependency on anything host- or product-specific
  • Adds arktype as a real dependency (the skeleton had none)
  • Drops the skeleton's GranolaIngressOptions/GranolaWebhookHandler dispatch placeholder — dispatch belongs to the ingest-router slice, which needs its own lifecycle-hooks design (deferred, tracked separately) and isn't a lift-and-shift like this one

Test plan

  • bun run check-deps — clean
  • bun run typecheck — clean
  • bun run test:ingress — 20 pass
  • bun run test:tools — 2 pass (unaffected)
  • bun run build — clean

CL-5089

Replaces the skeleton placeholder with real Standard-Webhooks HMAC-SHA256
verification (multi-signature rotation support, timestamp tolerance,
constant-time compare) and payload parsing/validation. Pure functions, no
network or side effects. Adds arktype as a real dependency.

Dispatch (the GranolaIngressOptions/GranolaWebhookHandler skeleton) is
dropped for now — it belongs to the ingest-router slice, which needs its
own lifecycle-hooks design and isn't part of this move.
@TheGreatAxios
TheGreatAxios merged commit 1e8c694 into main Aug 2, 2026
5 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-5089-move-granola-webhook-signature-verification-payload-parsing branch August 2, 2026 20:52
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