…tems)
Backlog plan auditing every ClickHouse change merged in the last four
months against what this fork can generate and assert today, ranked by
expected bug-finding value. Successor to the 2026-06-13 30-ideas plan,
whose items have all shipped.
Method: 150 new_feature + 58 experimental + 737 semantics-relevant
improvement/performance PRs from qa_intelligence for the window;
open human-filed wrong-result issues from the same window grouped by
component as ground truth for where other sources find bugs we do not;
a regex capability sweep over src/sqlancer/clickhouse for every setting,
clause, type and function the change inventory names; and a finding-by-
finding triage of the five NightlySQLancer runs from 2026-08-01 to
08-13 with every reproducer replayed against head 26.8.1.1424.
The plan is grounded in a measured miss. On 2026-08-13 the SQLancerPP
job (10 minutes of upstream SQLancer) found a silent wrong result this
fork's 98 oracles have never surfaced: NOT (NOT key) in value position
collapses to the bare key in KeyCondition, deriving a bogus key range
and pruning parts that hold matching rows. Wrong on 24.8 through head,
so long standing rather than a regression. ClickHouseKeyConditionOracle
would have caught it on the first iteration that emitted the shape; the
grammar never emits it. Item 1 closes that, and Appendix C makes the
rule general: anything the upstream job finds and this fork does not is
a grammar gap and goes straight to P0.
Two of the five triaged nightly families are our own false positives,
and both are landed here as prerequisite fixes 0a and 0b because they
cost triage time on every run: ComparatorHelper.trimTrailingDotZeros
normalises '0.0' to '0' and breaks the LIMIT BY per-key cap assertion,
and the engine pool accepts a Bool sorting key for ReplacingMergeTree
so visible cardinality changes mid-iteration.
Every one of the 179 referenced PRs and issues was verified to exist
with the correct pull/issues path. Each entry carries goal, ClickHouse
surface with links, invariant or emission, bug class, evidence that the
gap is real, soundness risk, file targets, effort and verification, so
any single entry can be promoted to an implementation plan.
What this is
A research/backlog plan auditing every ClickHouse change merged between 2026-04-15 and 2026-08-15 against what this fork can actually generate and assert today, ranked by expected bug-finding value. It is the successor to docs/plans/2026-06-13-001-feat-clickhouse-coverage-backlog-30-ideas-plan.md, whose 30 items have all shipped as 29 oracles.
One file, no code: docs/plans/2026-08-15-001-feat-clickhouse-4month-coverage-gap-plan.md.
25 coverage items plus 2 prerequisite fixes. Each entry carries goal, ClickHouse surface with links, the invariant or emission, bug class, evidence that the gap is real, soundness risk, file targets, effort, verification, so any single entry can be promoted to an implementation plan on its own.
Why now: a measured miss
On 2026-08-13 the SQLancerPP job (10 minutes of upstream SQLancer, general --database-engine CLICKHOUSE) found a silent wrong result that this fork's 98 oracles have never surfaced:
EXPLAIN indexes = 1 prints Condition: (c1 in (-Inf, 3]). In KeyCondition.cpp the name == "not" branch of cloneDAGWithInversionPushDown treats not as purely logical, flipping need_inversion and recursing while ignoring the boolean_context flag, so the two flips cancel and NOT NOT c1 becomes bare c1. For a non-Bool column that is unsound: NOT NOT c1 means c1 != 0 and lives in {0, 1}, so the comparison against 3.14 is universally true, and the derived range prunes any part whose rows all lie above 3. Wrong on 24.8.14.39, 25.8.29.51, 26.3.12.3, 26.6.2.160 and head 26.8.1.1424, so long standing rather than a regression.
ClickHouseKeyConditionOracle would have caught this on the first iteration that emitted the shape. The grammar never emits the shape. A repo-wide grep returns zero hits for NOT (NOT, IS TRUE, IS FALSE, IS UNKNOWN, IS NOT DISTINCT FROM, ESCAPE and indexHint, while ClickHouse shipped or extended index pruning for most of those shapes inside this very window. Item 1 closes it, and Appendix C promotes the lesson to a rule: anything the upstream job finds and this fork does not is a grammar gap by definition and goes straight to P0.
The underlying ClickHouse bug is not yet filed.
The three structural patterns behind every gap
Prerequisite fixes, from the same triage
Two of the five nightly failure families are our own false positives, and both are checklist violations, so they land before new surface is added:
Full triage of the five runs behind this plan
Runs 2026-08-01, 08-04, 08-07, 08-10 and 08-13, all on CH 26.8.1.1 asan+ubsan. Every reproducer was replayed against fresh clickhouse/clickhouse-server:head 26.8.1.1424 on the dev VM.
Two side findings recorded in the plan:
Priorities
Suggested order (Appendix A): 0a and 0b, then item 1, then item 4 before item 3 (the view-in-join emission is the prerequisite for item 3's strongest positive control, ClickHouse/ClickHouse#111727), then items 2 and 11 together since they share a positive control, and item 15 early despite being P1 because it is S effort, changes no assertion, and lights up every existing pruning, count and FINAL oracle for free.
Method, and how to re-run it
Scope discipline
Appendix B lists what was deliberately excluded and why, with volumes: AI functions, WASM UDFs, Web UI and terminal, Keeper, PromQL, Arrow Flight, data lakes, message queues, formats, backup, crash-durability and roughly 80 pure-performance PRs. Data lakes (8 open wrong-results) and message queues (6) are called out as the strongest candidates for a separate plan with an external fixture rather than gaps in this one.
Every one of the 179 referenced PRs and issues was verified via the GitHub API to exist and to use the correct pull or issues path.
Every item inherits a 9-rule cross-cutting soundness checklist, which is this fork's accumulated false-positive ledger. Both prerequisite fixes are violations of rules that predate the checklist.