ClickhouseExplainer
ClickGap: Autonomous QA for ClickHouse
Summary
ClickGap addresses defects that survive ClickHouse’s extensive CI, human review, and in-house automated review, including untested behavior, silent resource waste, and performance regressions. The autonomous QA daemon examines eligible merged pull requests against verified builds, uses separate bug and coverage analysts, and requires hypotheses to become executed tests. An adversarial reviewer and ten evidence gates check consequences, source citations, complete-file review, reproducibility, and other conditions before a report can be filed. Five months after launch, ClickGap had filed roughly 500 issues and opened around 200 coverage or fix pull requests; more than half of the issues were closed, with over 200 linked to a fix PR. The system’s central design goal is to make reports trustworthy rather than merely prolific.
Context
ClickHouse merges between 50 and 100 pull requests on a typical working day into a performance-critical C++ database. Existing CI and human review catch many defects, but written tests cannot reveal behavior no test exercises, and result assertions can miss resource waste or performance regressions. The merge stream had outgrown human review capacity.
Approach / What changed
ClickGap is a single daemon that reviews eligible merged pull requests against verified builds in isolated worktrees. It runs bug and coverage analysts, requires each hypothesis to produce an executed test, and uses an adversarial reviewer plus ten evidence gates covering observable consequences, valid citations, reproducibility, performance evidence, and other checks. Surviving findings are filed as issues or pull requests.
Takeaways
ClickGap reviews merged code because that is what ships, and its findings arrive within hours of a merge.
A skip index defect returned identical query results while causing a query to read all 16 granules instead of one, demonstrating why result assertions alone miss performance failures.
Coverage findings must identify a single-line mutation that the new test catches and show that the original pull request’s tests remain green after the mutation.
Source and freshness
- Source
- clickhouse.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.