Four CI and test lessons we learned the hard way

A required check that never ran, a fixed wait that cost more than 81 sign-ins, a test value found inside a UUID, and measuring CI before speeding it up.

The short answer

A required CI check has to report on every pull request, even ones it skips. Tests should build the expired state instead of waiting for the clock. Values a privacy test searches for must never be plain digits that can appear inside random ids. And CI gets measured, job by job, before anyone tries to make it faster.

On this page
  1. 1. Why couldn’t a docs-only pull request merge?
  2. 2. Why wait 62 seconds when you can build the expired state?
  3. 3. How did a privacy test match a UUID?
  4. 4. Where did our CI minutes actually go?
  5. What do the four have in common?

We run Forkly, Mesito and Kommo with continuous integration on every pull request and branch protection on the main branch. These four lessons each came from a real failure in November 2026. None of them is complicated. Each one cost us time before we wrote it down.

1. Why couldn’t a docs-only pull request merge?

On Forkly, a pull request that changed only documentation sat waiting forever. Branch protection required a check, and the workflow that ran the check had a paths filter: it only started when code changed. With no code change, the check never ran, never reported, and GitHub kept waiting for it.

The rule now: a workflow that runs a required job has no paths filter on pull_request. The job can still decide to skip its own work for a docs-only change, but it must start and report. And after making a check required, we open a docs-only pull request on purpose and watch it report.

2. Why wait 62 seconds when you can build the expired state?

On Mesito we measured where the nightly test time went before rewriting anything. The suite ran 146 tests in 5.8 minutes. It signs in through the real UI in 81 places, which looked wasteful, but the whole sign-up test took 3.1 seconds, so all of those sign-ins together cost about a minute a day. Rewriting about 50 test files to save that wasn’t worth it.

The real waste was one test that waited a fixed 62 seconds for a report link to expire, once per screen size: over a minute each time, doing nothing.

The rule now: tests never wait for the clock. To test an expired link, create one that’s already expired (a token signed with a past expiry date, or a fake clock) and check the expiry rule in an API test.

3. How did a privacy test match a UUID?

Some of our tests check that a response never contains a value it shouldn’t, such as another customer’s data. The test plants a recognisable value, a sentinel, and fails if it appears anywhere in the output.

One sentinel was a plain 5-digit number. Responses are full of random UUIDs, and a UUID is long enough to contain any given 5 digits now and then. The test failed when the sentinel showed up inside an id that had nothing to do with it.

The rule now: a sentinel is never a plain string of digits that could occur inside a random id. Use a value no id can contain, or strip ids from the output before matching. A flaky test is treated as a bug until a measurement says otherwise. Here, the measurement showed the test was right to be suspicious, but was looking for the wrong thing.

4. Where did our CI minutes actually go?

When a pipeline feels slow, the temptation is to start optimising whatever looks heavy. We now measure first: split each job of recent runs into time waiting for a runner, time setting up and time running, at the median and for the slowest runs. Then we fix the slowest item, and report before and after from the same measurement.

Two results from that habit:

  • Kommo’s pull request check went from 447–548 seconds to 236 seconds. The API tests were the slowest path, so they got six parallel workers, and a system tool the tests needed (ffmpeg) was baked into the CI image instead of being installed in every job.
  • Forkly’s full suite, which had taken 35–40 minutes, runs in 10–16 minutes against the release images.

What do the four have in common?

Each was found by measuring or reading what actually happened, not by guessing. Each became a written rule, and where a rule kept being broken, a check that enforces it. A rule people keep forgetting is better as a check that refuses than as more text in a document.

Keep reading

Tell us what you want to build.

A product, a website, a search problem or a system that should work better. We reply with a plain answer and the first step.

A few sentences are enough (at least 20 characters).

We use your details only to answer your inquiry. See our privacy policy.