Skip to content
Julien DanjouJulien Danjou
· 6 min read

Agents, asyncio and 10 Million Tests: Our PyConFR 2026 Talks

Agents, asyncio and 10 Million Tests: Our PyConFR 2026 Talks

Julian, Mehdi and Rémy spoke at PyConFR 2026 in Biarritz. The recordings are on YouTube: nine times more pull requests, five years of asyncio traps, and the math of a 10-million-test suite.

In December 2025, our team opened 10 pull requests per person per week. In October 2026, it opened 91.

Julian Maurin told that story at PyConFR 2026 in Biarritz, and Mehdi Abaakouk and Rémy Duthu gave the other two talks we brought. The AFPy recorded the talks, and the three videos are now on our YouTube channel with chapters. The talks are in French; Julian’s and Rémy’s slides are in English.

Julian: the bottleneck moves every time you fix it

Agents started writing a large share of our code in January. One pull request in a hundred carried an AI co-author in December 2025, and 78% did by February (a lower bound, since it only counts the trailer).

Pull requests per person, per week, at Mergify team pull requests, GitHub organization 0 50 100 December 2025: 10 pull requests per person per weekDec 202510 October 2026: 91 pull requests per person per weekOct 202691
Nine times more pull requests per person in ten months, counted across every repository in our GitHub organization.

Julian’s talk follows a change from the editor to production: write, test, review, deploy. Each time we unblocked one step, the next one jammed. Writing stopped being the slow part once agents could run several tasks at once, each in its own worktree, with our conventions written down as skills they read before touching anything. Then CI had to absorb the load: machine hours went from 3,837 in December 2025 to 30,626 in September.

Review was the hardest. By then, Claude reviewed every change before a human did, and a second model read what the first one wrote. The wait for a first review still peaked at 16.2 hours in the week of September 14. A week later it was close to two hours. That week we moved to a newer model, and Julian admits it is hard to tell what helped most. On October 2, every change moved to one human approval instead of two, and the week of October 12 the wait was 1.4 hours.

The question everyone asks is whether quality held. Per change, it did. Reverted pull requests went from 0.6% in 2025 to 0.3% in the first nine months of 2026, changes that failed went from 0.7% to 1.1%, and severe incidents went from 2.2 to 2.5 per 1,000 pull requests. We ship a lot more, so there are more incidents in total, and Julian says so on stage.

Mehdi: asyncio’s traps make no noise

On January 19, 2021, Mehdi pushed a commit whose message reads “Everything except logging is async now.” The migration had started a year earlier, from a Python 3.7 backend running Celery and gevent. His talk is the list of what broke on the way, and what kept breaking for the five years after.

The first trap is the one every Python developer has written once. In May 2020, he built our async GitHub client by copying the sync one and adding async and await. One call lost its await (simplified from his slide):

# The sync client
def request(self, method, url):
    ...
    if e.status_code == 403:
        self.check_rate_limit()  # raises RateLimited

# The async copy
async def request(self, method, url):
    ...
    if e.status_code == 403:
        self.check_rate_limit()  # now a coroutine: created, never run

That is valid Python. Nothing raises; the only trace is a RuntimeWarning when the garbage collector drops the coroutine. It went in on May 31, 2020 and was fixed on September 30. Today mypy flags it with its default settings, as long as the library’s type hints say the function returns a coroutine.

The rest of the talk is in the same vein:

  • The thread pool, sized wrong three times (2020, 2022, and 2025 on Cloud Run), because its default size follows your CPU count and not your I/O.
  • A regular expression holding the GIL. re.search(r"^(a+)+$", "a" * 26 + "X") doubles its run time with each extra a, and every other thread waits. We have used RE2 since September 2026.
  • asyncio.CancelledError was an Exception until Python 3.8. For six weeks on 3.7, our new worker’s except Exception blocks caught cancellations, logged them and carried on.
  • A timeout that never fired, in January 2025. asyncio.timeout cancels the task, and asyncio’s subprocess ignored the cancellation. The fix was a plain subprocess call inside a thread, where the operating system enforces the timeout.

His closing slide: “asyncio, c’est cool. Ses pièges sont silencieux.” asyncio is cool, and its traps are silent.

Rémy: pytest from 1k to 10M tests

Agents made tests cheap to write, and the suites show it. Our engine went from 2,073 pytest test functions to 13,002 in ten months. Rémy’s talk is about what happens to a suite as that number grows, and it starts with one formula. If each test fails for no reason once in 100,000 runs, the chance that a run of N tests is all green is (1 − p)^N.

Chance a CI run is all green, when each test flakes once in 100,000 runs P(green) = (1 − p)^N, p = 0.001% 0% 50% 100% 1k tests: 99% chance the run is all green1k tests99% 100k tests: 37% chance the run is all green100k tests37% 10M tests: ≈0% chance the run is all green10M tests≈0%
Same tests, same flake rate. At 100,000 tests, almost two runs in three go red for no reason.

The same N drives the bill. At 0.2 seconds per test, 100,000 tests cost 5.6 hours of CPU per run. Ten million cost 23 days, which is still 33 minutes of waiting on 1,000 cores.

He walks through each tier with the plugins that keep it working: pytest-randomly and pytest-socket while the suite is small, --durations, pytest-xdist and pytest-split once the wait grows, and retries limited to known errors with pytest-rerunfailures. Past a point, flaky tests have to be caught, detected and quarantined automatically, because the suite is too big to handle by hand. That last part is what we build Test Engine for.

His homework for Monday is one command, pytest --collect-only --quiet, and then the math for your own N.

What ×100 would take

Julian’s last slide puts us at 7.5 times our 2025 pull request rate, says everything we built handles about ×10, and asks what ×100 would take. We don’t have the answer yet. It might be next year’s talk.

Stay ahead in CI/CD

Blog posts, release news, and automation tips straight in your inbox.