ClickGap: Autonomous QA for ClickHouse ClickGap, an autonomous QA agent built by ClickHouse, has filed roughly 500 issues and opened around 200 pull requests in the ClickHouse public tracker since its launch five months ago, with more than half of the issues closed and over 200 closed with a linked fix PR. The agent reviews every pull request merged into ClickHouse, designs and executes tests against real builds, bisects regressions, and files issues and PRs without human approval, catching defects such as smuggled semantics changes and resource-safety holes that survive human and machine review. ClickHouse merges between 50 and 100 pull requests on a typical working day. Each one lands in a performance-critical C++ database running in production. Any merge can introduce a wrong result, trigger a crash in an untested feature combination, or make a query quietly run 30 percent slower. Pointing an AI agent at the problem seems obvious, but it is also a fast route to becoming a cautionary tale. curl recently ended the bug bounty it had operated since 2019 after a flood of AI-generated reports, which its maintainer described as "slop". Producing a plausible bug report is nearly free; triaging one costs an engineer. Our maintainers did not sign up to babysit a chatbot. We built one anyway. It received a one-line cameo in Agentic coding at ClickHouse https://clickhouse.com/blog/agentic-coding ; this post is the long version. ClickGap https://github.com/clickgapai is an autonomous QA agent that reviews every pull request merged into ClickHouse. It designs and executes tests against real builds, bisects regressions to the commit that introduced them, and files issues and pull requests in the public tracker without a human approving the send button. Five months after launch, ClickGap’s GitHub account https://github.com/ClickHouse/ClickHouse/issues?q=is%3Aissue+author%3Aclickgapai has filed roughly 500 issues and opened around 200 pull requests, adding coverage for code paths that had merged without it. More than half of the issues are already closed, overwhelmingly as completed rather than dismissed, and over 200 were closed with a linked fix PR. ClickGap reviews each pull request after it merges because merged code is what ships. Findings arrive within hours, well before a release could carry the defect to users. In this blog post, we're going to go through some of the challenges of building ClickGap, and how we got to the point that when that bot says, “This is broken,” the maintainer believes it. A database that is already tested to death ClickHouse CI executes tests tens of millions of times each day: stateless SQL suites, integration clusters, sanitizer builds, stress tests, fuzzers, and statistical performance comparisons. Nothing merges without a human maintainer’s approval, and every pull request is also inspected by an in-house reviewer, clickhouse-gh bot https://github.com/apps/clickhouse-gh , which reads the diff and requests changes with file-and-line findings. It catches a meaningful share of defects before merge. Yet some defects still survive the human reviewer, the machine reviewer, and the test wall. CI proves only that written tests continue to pass; it says nothing about behavior, no test exercises. Newly merged code is especially exposed because pull requests routinely introduce changed lines the test suite never reaches. Those gaps account for ClickGap’s roughly 200 coverage PRs. Other defects are invisible to result assertions because correctness remains unchanged while execution cost rises. A skip index can be built, consume disk, and never skip a single row. Every query still returns the right result while wasting the resources the index was supposed to save. What it found in ClickHouse The public tracker spans roughly 35 component labels, from the query analyzer and MergeTree to replication. Its findings cluster into four recurring categories. The smuggled semantics change 113763 https://github.com/ClickHouse/ClickHouse/issues/113763 . A pull request adding the gini aggregate function also changed the result types and values of a broad family of existing