Repository navigation
fix(query-engine): keep list inputs from nesting SQL past max_parser_depth - #2021
Merged
Merged
Maple Review Bot / Maple / review
succeeded
Oct 31, 2026 in 1m 27s
Confidence 10/10 · No issues found
🟢 Confidence 10/10 · safe to merge. Flattening is provably semantics-preserving here, and a property test, the SQL baseline and a 500-repository e2e pin it.
no findings · tests covered · risk medium
Replaces the per-item .and()/.or() chains in four query-engine builders — CI actor stats, log body search, attribute-filter OR groups and funnel steps — with one flat CH.and/CH.or call, so parser nesting no longer grows with the list. The SQL is unchanged apart from parentheses.
ciActorStatsQueryORs default branches with one flatCH.or- Log body search ANDs every token through one
CH.and buildAttrFilterConditionOR groups and funnel steps flatten their OR- New property test bounds nesting for 7 list-taking builders; e2e covers 500 repos
What was checked
CH.or()returnsundefinedwith no conditions, sociActorStatsQuery's1 = 0fallback for an empty repository list still applies (effect-ormsrc/ch/expr.ts:803)- Tenant evidence unchanged: variadic
orcarries none andandstill carries it through, as the.or()/.and()methods did (src/ch/expr.ts:789) catalog.sqlbaseline diff is parenthesis flattening only: each changed clause is identical with(/)stripped
56e9da6 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Loading