Skip to content

test(fuzz): fix nightly soak's division-by-zero and ClickHouse 26.2 modulo failures - #134

Merged
Makisuo merged 1 commit into
mainfrom
t3/fix-clickhouse-fuzzer-invalid-expressions
Nov 5, 2026
Merged

Makisuo merged 1 commit into
mainfrom
t3/fix-clickhouse-fuzzer-invalid-expressions

test(fuzz): fix the nightly soak's division-by-zero and 26.2 modulo f…

ba57dba
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Nov 5, 2026 in 1m 59s

Confidence 10/10 · No issues found

🟢 Confidence 10/10 · safe to merge. Test-only change; the new model floor is pinned by three fixed cases per target and the skip matcher is narrow and ClickHouse-gated.
no findings · tests covered · risk low

Makes the fuzz oracle decline any / or % whose divisor folds to zero as the SQL parses it, and replaces the UNION-only 26.2 modulo known issue with a plan-level, execution-gated one. Test-side only, no production code, safe to merge.

  • foldConstant folds an expression as asParsed reads it, refusing a zero divisor
  • evaluate declines a zero-divisor / or % before any row is read
  • knownPlanIssue narrows the 26.2 bug to a negative power-of-two divisor and gains executed
  • Three fixed division cases replace the single one in queries.fuzz.test.ts
What was checked
  • constant(e)/evalExpr still reach every node the old loop reached: ariths(asParsed(e)) also carries argument subtrees (model.ts:313-318)
  • UnionPlan holds no expression outside branches, and each branch is checked against the plan issues (queries.fuzz.test.ts:44)
  • The SQL % divisor is always the plan node's r in flatten, so the matcher's foldConstant(e.r) never misses a parsed modulo

ba57dba · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.