ci: add webhooks guide consistency guard - #56
Closed
a-essawy wants to merge 1 commit into
Closed
Conversation
Adds scripts/check-webhooks-guide.mjs, which asserts guides/webhooks.mdx still matches the canonical webhook contract (event catalog, delivery headers, whd_ delivery id, envelope fields, retry backoff, verifyWebhook usage, SDK methods, endpoint limit). Wired into the validate workflow and package.json alongside the existing frontmatter/nav/plan-limit guards so the guide can't silently drift.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a small guard,
scripts/check-webhooks-guide.mjs, that assertsguides/webhooks.mdxstill matches the canonical webhook contract, and wires it into the validate workflow +package.jsonalongside the existing frontmatter / nav / plan-limit guards.Why
The webhooks guide was just rewritten to remove stale content (for example a
del_delivery-id example that should bewhd_, and a fictitiousextract.metadatajob). This guard keeps it from silently drifting again.What it checks (36 assertions)
X-Rendobar-*delivery headers are presentwhd_, and the olddel_never comes backversion,event,deliveryId,timestamp,orgId,data)verifyWebhook()from@rendobar/sdk/webhooks, and documents the{timestamp}.{body}signed stringrotateSecret,retryDelivery) plus the dashboard Send Test actionThe contract values are embedded in the script (the docs repo does not vendor the monorepo), with the monorepo source files named in the header so they are updated together.
Run
Passes locally against current
main, as does the full existing validator suite.🤖 Generated with Claude Code
https://claude.ai/code/session_01Ajz7odbJunsbosNj81M2Pi
Generated by Claude Code