Skip to content

fix(webhooks): make health route service-binding-only - #104

Merged
iamjr15 merged 1 commit into
mainfrom
fix/webhooks-health-internal
Jul 31, 2026
Merged

fix(webhooks): make health route service-binding-only#104
iamjr15 merged 1 commit into
mainfrom
fix/webhooks-health-internal

Conversation

@iamjr15

@iamjr15 iamjr15 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes the last finding from the public-surface sweep that followed #103: webhooks.trycheatcode.com/health answered publicly (200, unauthenticated, unrate-limited) with releaseSha/versionId, while its only real consumer — the gateway's release aggregation — reaches it through the WEBHOOKS service binding as https://webhooks.internal/health.

The route now gates on the internal hostname and returns Hono's plain notFound() on any other host, indistinguishable from a route that does not exist. Same rule as #103: every public route must have a named external consumer. The four provider webhook POST endpoints (signature-verified) are untouched.

Deploy safety

Gateway is unchanged; its binding fetch already carries the webhooks.internal hostname, so the gate passes for old and new gateway alike — no deploy-order coupling, no skew window. Roll-forward as usual.

Verification

  • Gates: lint, typecheck, full turbo build --force (19 packages incl. web), knip, dependency-cruiser (844 modules, 0 violations), skills bundle — all green
  • Post-deploy: public GET webhooks.trycheatcode.com/health → 404; gateway /health/release still 200 with the webhooks leg (proves the internal path intact)

The public webhook host (webhooks.trycheatcode.com) served /health
unauthenticated and unrate-limited, exposing releaseSha and versionId with no
public consumer: the only caller is the gateway's release aggregation, which
probes https://webhooks.internal/health over the WEBHOOKS service binding.

Gate the route on the internal hostname and answer c.notFound() on any other
host, indistinguishable from a nonexistent route. Same posture as the
preview-proxy public health removal (#103): every public route must have a
named external consumer. Gateway is unchanged and its binding fetch already
carries the internal hostname, so there is no deploy-order skew.
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
cheatcode Skipped Skipped Jul 31, 2026 9:53am

@iamjr15
iamjr15 merged commit b25b97d into main Jul 31, 2026
6 checks passed
@iamjr15
iamjr15 deleted the fix/webhooks-health-internal branch July 31, 2026 09:55
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