Repository navigation
test(fuzz): fix three flaky generated-data properties - #131
Confidence 6/10 · 1 issue to address
🟡 Confidence 6/10 · needs attention. Held at 6 because a correctness warning is open.
1 warning −1 · tests covered · risk low
Fixes three flaky fuzz properties: the empty ClickHouse fixture source now comes from numbers(0), the model pre-evaluates expressions over orders an inner join drops, and escaped one-character record keys are excluded from the codec property. Test-only and otherwise sound, but the new union known issue does not cover every shape that reaches the 26.2 % bug.
- Empty ClickHouse fixture sources are built from
numbers(0), with a pinned regression evaluatealso walks every order when the plan joinsclickhouse-26.2-union-negative-moduloadded totests/fuzz/known-issues.ts- Codec property excludes one-character escaped record keys; PGlite migrate describe gets a 30s timeout
Findings
🟠 Warning · F1 · negativeModulo misses a negative divisor written as a num expression
correctness · tests/fuzz/known-issues.ts:67
plan.ts:139 builds a mod divisor either as a raw number or as a sub-expression like { k: "num", v: -4 }, and build.ts:92 writes both through the same literal path. The entry only fires on the raw number, so those union plans still run against ClickHouse 26.2 and fail with 3 instead of -1.
Also treat a `{ k: "num" }` divisor as a constant: `const r = value.r; typeof r === "number" ? r < 0 : r.k === "num" && r.v < 0`.
What was checked
- Non-empty ClickHouse sources still use
values(...)(fixtures.ts:81), untouched by the new empty branch evalExpron an{ o }row reads ajcolas the semantics' missing-join value, so the new loop cannot throw- Pinned regression's
Id % Idnever reachesevalExprover zero model rows, so it does not self-skip
c9c9af4 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Annotations
Check warning on line 67 in tests/fuzz/known-issues.ts
maple-review-bot / Maple / review
correctness: `negativeModulo` misses a negative divisor written as a `num` expression
`plan.ts:139` builds a `mod` divisor either as a raw number or as a sub-expression like `{ k: "num", v: -4 }`, and `build.ts:92` writes both through the same literal path. The entry only fires on the raw number, so those union plans still run against ClickHouse 26.2 and fail with `3` instead of `-1`.