Skip to content
Book demo

QA

Performance regression gate

Benchmark key pages and APIs on every PR against the baseline, then block merges when latency, Lighthouse, or bundle thresholds regress.

performancebenchmarkinglighthousebundle-sizepr-gateregression

[ workflow / qa ]

Performance regression gate

Performance regressions often arrive through small changes. Cosmos replays production-representative load scenarios against each branch, compares Lighthouse, p95 API latency, and bundle size against a rolling baseline, and blocks regressions with a before/after breakdown and likely culprit.

07 nodes

05 edges

Trigger[trigger]
PR opened / updated

GitHub webhook

AI Agent step[deploy]
Build preview

Branch deploy

AI Agent step[bench]
Run benchmarks

Lighthouse · API latency · bundle size

AI Agent step[compare]
Compare to baseline

7-day rolling average

Decision

Regression detected?

No
Output / Result[pass]
Pass check

Green summary comment

YES
Output / Result[block]
Block PR + report

Before/after table · culprit diff

Workflow prompt

Paste this into Augment to reproduce the workflow end-to-end.

Cosmos, on every pull request build a preview deployment and run the following benchmarks: Lighthouse performance score on the top 5 pages, p95 latency for the 10 highest-traffic API endpoints under 50 concurrent users, and total JS bundle size. Compare results against the last 7-day rolling baseline stored in the performance database. If any metric regresses by more than 10% (or bundle size grows by more than 5 KB), post a PR comment with a before/after table per metric, highlight the file diff most likely responsible, and set the PR check to 'fail'. Otherwise set to 'pass' and post a brief green summary.