Repository navigation
Conversation
Re-files six test-only coverage PRs that were closed without merging, at the request of their author. Each test was verified to be non-vacuous by mutating the exact line it claims to cover and requiring the test to fail; the arms and their controls are listed below. - 04201_dot_product_const_nonconst_size_mismatch: the size check in arrayDotProduct's one-constant-argument path. The existing 02708_dotProduct covers only equal sizes there, and the two-non-constant path throws from a different site with a different message. - 04201_array_index_of_count_equal_nullable_value: the null_map row skip shared by has/indexOf/countEqual. Only has() reached it before. Trimmed to Nullable(UInt64): with Nullable(String) the nested default never equals an array element, so that variant cannot detect the regression. - 04201_json_extract_keys_and_values_low_cardinality_input: LowCardinality stripping for the two functions that force their return type. Only JSONExtract exercised it with a non-constant LowCardinality column. - 04329_like_fixedstring_constant_match_everything: the matches-everything shortcut for a FixedString haystack. Existing FixedString LIKE tests all use substantive patterns. Keeps one row per template instantiation (LIKE / NOT LIKE / ILIKE / match). - 04146_ipv6_hashing_distinct_values: per-row indexing when hashing an IPv6 column. 02998_ipv6_hashing repeats a single value, so it cannot detect a regression that always reads row 0. - 04201_windowID_hop_time_overflow: the hop-window overflow guard, which is duplicated in the windowID and hop code paths. Neither copy was tested; mutating one reddens only its own row, so both are now pinned. Every argument carries an explicit timezone because an unqualified DateTime literal is read in the session timezone, which CI randomizes across the overflow boundary. Related: ClickHouse#103918 Related: ClickHouse#103922 Related: ClickHouse#103940 Related: ClickHouse#107447 Related: ClickHouse#103885 Related: ClickHouse#103931
Both tests passed on master while being blind to a whole class of regression in the branch they claim to cover. 04146 asserted only the digest cardinality, count(DISTINCT SHA256(addr)) = 4, which measures that the four addresses hash differently but not that each row is hashed from its own address. A permuted read of the input column keeps four distinct digests, so it stayed green. It now asserts the ordered address-to-digest mapping. Committing the digests is safe on every CI architecture: IPv6 is parsed into four big-endian 32-bit components on both endiannesses (see the note in FunctionsHashing.h), so no byte swap applies, and 02998_ipv6_hashing.reference already commits raw IPv6 digests. Verified by computing the same four digests independently from the network-order bytes. 04329 had a single input row against a per-row fill loop, so a regression writing only the first row and leaving the rest untouched was undetectable. It now uses two distinguishable FixedString rows. No new template instantiation is added: the same four columns are kept. Also drop a dead SET allow_experimental_window_view from the windowID test (only WATCH and StorageWindowView are gated by it), and correct a comment that stated a false general rule -- a NULL needle does match a NULL array element; what the test pins is that the array here holds no NULLs. Both new oracles were mutation-proven: a permuting read of the IPv6 column, and a first-row-only write of the match result, each reddens its own test and no other, while the previous assertions stayed green under those same mutations.
Internal second-model review (click to expand)Two rounds of independent cold review plus a second model reviewed this diff before publication. 7 findings, 5 accepted, 2 declined with evidence. The second round returned 0 findings.
Both declines are the same class: a mutation that deletes a branch falls through to an equivalent slower path, so identical output is expected and is not evidence of a vacuous test. Every accepted arm instead changes the branch's output. Also noted and not treated as blocking: Session id: cron:clickhouse-review-slot-8:20260811-021900 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-5:20260811-003900 |
|
cc @antaljanosbenjamin, could you review this? It is test-only: six coverage tests for function branches that no test reached, each proven non-vacuous by mutating the exact line it covers and requiring only that test to fail. |
|
Workflow [PR], commit [c2e4128] Summary: ✅ AI ReviewSummaryThis PR adds six stateless coverage tests for previously untested function/type branches, including the const-array nullable Final Verdict✅ Approve. |
|
@groeneai can you check the CI failures and if they are flaky tests merge latest master and rerun the CI. |
CI finish ledger - c52bd50Every failure below has an owner: a fixing PR (ours or external), or a full-effort fix task
@zlareb1 answering your question directly: all three failures are one trunk defect, not flaky tests, The report only keeps the tail of
Its frames are It is not caused by this PR: the diff is stateless Not linked here, deliberately: #97586 and #113504 both already fix a wait of this shape, both are Session id: cron:our-pr-ci-monitor:20260811-080000 |
|
Fixing PR for the hung |
|
@groeneai lets merge latest master and retry CI |
Requested by zlareb1 on ClickHouse#114260 to re-run CI against current master. Base was 3690 commits behind; merge is clean, no conflicts, diff unchanged (12 stateless test files, 42 insertions).
|
@zlareb1 done. Merged master ( One thing to expect: the three reds were |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction. Compile time of recompiled translation units6 translation units recompiled, 4 s compile time in total, 6 of them have a recent master baseline. |
Related: #103918
Related: #103922
Related: #103940
Related: #107447
Related: #103885
Related: #103931
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Test-only, 12 files, 42 insertions. @ zlareb1 asked me to re-file six closed
clickgapaicoverage PRs (linked above); this is the functions/types group.I did not take the tests on trust. For each one I mutated the exact line it claims to cover, rebuilt, and required that test to fail while the other five stayed green. That found three defects in the originals:
DateTimeliterals, read in the session timezone, which CI randomizes. In a positive-offset zone the value falls below the overflow boundary and the guard never fires: unpinned it FAILs underAfrica/KhartoumandAsia/Kolkataand passes only under UTC. Every argument now pins a timezone, and it passes in all six zones swept.wstart > wendcheck exists in both thewindowIDandhoppaths and neither was tested. Mutating one copy reddens only its own row, so both are now pinned, each row the other's scoping control.Nullable(String)block could not detect the regression. Its nested default''never equals an array element, so it stays green under the mutation whileNullable(UInt64)(default0, present in the array) reddens. Dropped.Two oracles were also too weak to bind a per-row read, and were strengthened after review:
04146now pins the ordered address-to-digest mapping rather than the digest count, and04329uses two distinguishable rows rather than one.Per the recent "trim the tests" reviews, each file keeps one row per distinct dispatch or template instantiation rather than every spelling that reddens. The implementation commentary lives in the commit messages, not the
.sql.Validation
Debug build,
clickhouse-testwith randomization on (the CI default). Every mutation changes the branch's output rather than deleting it, so a fall-through to an equivalent slower path cannot be mistaken for a vacuous test. Each arm was reverted and rebuilt before the next.04201_dot_product_const_nonconst_size_mismatcharrayDotProduct.cpp:397size check neutered04201_array_index_of_count_equal_nullable_valuearrayIndex.h:1246null_map skip removed04201_json_extract_keys_and_values_low_cardinality_inputFunctionsJSON.cpp:577LC stripping skipped04329_like_fixedstring_constant_match_everythingMatchImpl.h:322per-row fill replaced by a first-row-only write04146_ipv6_hashing_distinct_valuesFunctionsStringHashFixedString.cpp:316&data[i]->&data[input_rows_count-1-i]04201_windowID_hop_time_overflowFunctionsTimeWindow.cpp:580guard neuteredwindowIDrow only04201_windowID_hop_time_overflowFunctionsTimeWindow.cpp:430guard neuteredhoprow onlyThe 4th and 5th mutations are the point of the strengthening: under each, the weaker oracle those tests originally carried stays green on the same binary.
no-paralleltag.04201_windowID_hop_time_overflowswept across 6 timezones, one test per run: 6/6 OK.04146's digests are build-independent: an independent Pythonsha256(inet_pton(AF_INET6, addr))reproduces them byte-for-byte, and the same method reproduces master's own committed digest in02184_hash_functions_and_ip_types.reference.