Skip to content
Clinton Jay Ramonida

05DriftPilot

I moved the quality bar out of code review and into the pipeline, where nobody can forget it or argue it down on a deadline.

The DriftPilot studio site, above the fold
Fig. 01driftpilot.ca
Period
Jun – Jul 2026
Role
Sole engineer
Reading
1 min
01

Overview

Everyone agrees a site should be fast, and it still gets slower, one handy dependency at a time. Reminding people in review doesn’t fix that, so I made the pipeline check it.

Every pull request on driftpilot.ca runs Lighthouse CI three times against a production build and checks the median run against the budget. A failure turns the pull request red. GitHub doesn’t stop a merge on red, but every pull request merged since the check went in has passed it.

  1. Pull request
  2. Production build
  3. Lighthouse × 3, median run asserted
  4. Red check on failure
02

What the gate caught

The gate caught three things review missed: a WebGL shader path that hit 39 seconds of total blocking time on software renderers, a footer colour pair below the WCAG contrast minimum, and a third-party scheduling embed that pushed the script weight over budget without anyone noticing.

I did move one budget. The original 110 kB script ceiling was never realistic once the framework and the shader measured 237 kB together, so I raised it to 260 kB on purpose and wrote down why. That’s the line I hold: a measurement can justify moving a threshold, but deleting a failing check to get a green build can’t.

Lighthouse report header for a production build of driftpilot.ca: Performance 100, Accessibility 100, Best Practices 96, SEO 100
Fig. 02I re-ran the gate on 26 Sep 2026 on my own machine, not a CI runner: the repository’s own lighthouserc.json against a production build of main, desktop preset. Shown is the homepage’s median of three runs (LCP 663 ms, TBT 0 ms, CLS 0). Every run on all three gated routes passed every budget.lighthouserc.json
03

The rest of the build

The site is 37 statically prerendered routes with no runtime database. Content sits behind typed async accessors, so a headless CMS could take over as the source without touching a page or component.

Leads go through Zod-validated Server Actions, then honeypot and time-to-submit spam checks, then a CRM webhook. The original build came in over 73 commits across 27 merged pull requests, and in it the webhook got one retry: if both attempts failed, the visitor still saw the thank-you page and the lead was lost. I fixed that in September. The webhook now gets up to three attempts within ten seconds. A lead that still fails goes in full to a Slack channel, and the visitor sees the failure with an email link that has their answers filled in. The site’s first tests cover that path and run in CI.

04

Stack

  1. Next.js 1601
  2. React 1902
  3. TypeScript03
  4. Tailwind v404
  5. Zod 405
lighthouserc.json: budgets asserted on every pull request
AssertionBudgetResult
Performance≥ 95passing
Accessibility≥ 98passing
SEO≥ 95passing
Best practices≥ 90passing
Largest contentful paint< 1500 mspassing
Cumulative layout shift< 0.05passing
Total blocking time< 150 mspassing
Script weight< 260 kB237 kB on PR #18

Last CI run on main, 30 Jul 2026 (14f649f): every budget passing. Open the run

05

Measured

Prerendered routesno runtime database
37
Defects caughtby the gate, pre-release
3
Script weightagainst a 260 kB ceiling
237 kB
Merged pull requests73 commits
27

Check these againstgithub.com/clintonqwert/driftpilot-sitedriftpilot.ca