DEVOPS

Cloudflare Worker Cold-Start Regression Gate on Deploy

On every Cloudflare Worker deploy, compares post-deploy cold-start p95 against the previous deploy tag's baseline and blocks/flags the release in GitHub if latency regressed past…

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerwebhook
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerCloudflare Worker deploy webhookCloudflareCloudflare
  • ActionFetch new version cold-start p95CloudflareCloudflare
  • ActionLoad previous deploy tag baselinePostgreSQLPostgres
  • LogicRegression if delta exceeds threshold
  • ActionSet failing GitHub commit statusGitHubGitHub
  • OutputAlert team in Slack with tag deltaSlack

What it does

Each time a new Worker version is deployed, this workflow measures the cold-start p95 for the freshly deployed version, looks up the cold-start baseline stored for the previous deploy tag, and decides whether the new release introduced a latency regression. If it did, it posts a failing commit status on the triggering GitHub commit and alerts the team; if not, it records the new tag as the accepted baseline.

When to use it

Use it when you ship Workers frequently and want an automatic guardrail so a code change that doubles cold-start time never silently reaches production. It turns "someone noticed prod felt slow" into a deploy-time gate tied to the exact tag that caused it.

How it works

  1. 1A Cloudflare deployment webhook fires with the new version and deploy tag.
  2. 2Query Cloudflare analytics for the new version's cold-start p95 over a short bake window.
  3. 3Read the stored baseline for the prior deploy tag from Postgres.
  4. 4Branch: if p95 exceeds baseline by more than the allowed percentage, mark it a regression; otherwise persist the new baseline.
  5. 5On regression, set a failing GitHub commit status and notify Slack with both tags and the delta.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect CloudflareWorkers, Pages, R2, KV — the edge stack.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Connect GitHubRepos, issues, pull requests, actions.
  4. 4
    Connect SlackChannels, DMs, threads, mentions.
  5. 5
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  6. 6
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  7. 7
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.