Skip to content

feat(query-builder): condition builder for the where clause - #2420

Merged
Makisuo merged 20 commits into
mainfrom
ux/condition-builder
Nov 10, 2026
Merged

Makisuo merged 20 commits into
mainfrom
ux/condition-builder

test(query-engine): pin the operator list to the grammar and the OR-g…

1ac178f
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Nov 10, 2026 in 44s

Confidence 10/10 · No issues found

🟢 Confidence 10/10 · safe to merge. Test-only delta on the operator table, pinned against Operator.literals and the engine's group warnings; no production code changed.
no findings · tests covered · risk low

This head adds the two missing pins to the condition builder's operator table: WHERE_OPERATORS is held to the grammar's operator literals, and whereKeyMatchesAnyOf to how the engine actually lowers OR groups. No production behavior changes.

  • where-key-rules.test.ts sorts WHERE_OPERATORS against Operator.literals so a grammar operator can't be missed
  • Twelve cases run a real OR-group clause through buildTimeseriesQuerySpec per source and key

Fixed since the last review

  • ✅ F15 · WHERE_OPERATORS is a hand copy of the domain Operator literals
  • ✅ F16 · No case exercises whereKeyMatchesAnyOf, so its OR-group claim is unpinned
What was checked
  • Operator.literals is a real runtime value: repo precedent at packages/domain/src/audit-actions.ts:79
  • Product-events groups warn because orGroups is false for that source (model.ts:1448), matching the rule's false
  • applyOrGroup warns for service.name groups (named field → map === undefined, model.ts:456), so the dimension cases are not vacuous

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