Repository navigation
test(common-utils): cover mixed query operator generation - #3131
Tyagiquamar wants to merge 2 commits into
Conversation
|
@Tyagiquamar is attempting to deploy a commit to the HyperDX Team on Vercel. A member of the Team first needs to authorize it. |
|
|
PR Review
1 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 1 minor 1 posted as inline comment(s) on the changed lines. Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides. |
Deep ReviewThis PR is titled a fix for #3032 (mixed AND/OR operator grouping), but after re-grading the merged reviewer findings the net change is test-only: the production fix was added in Ground truth for correctness was established from the reverted fix's own assertions in 🔴 P0/P1 — must fix
🟡 P2 — recommended
🔵 P3 nitpicks (1)
Reviewers (4): correctness, testing, previous-comments, kieran-typescript. Testing gaps:
No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
|
@Tyagiquamar the review bot raised some valid comments to review. I also commented on the issue: #3032 (comment) |
|
Updated in b19515c to the tests-only baseline you requested. The existing SQL/English table now covers 16 mixed-operator, explicit-parenthesis, symbolic, implicit, and negation cases. Query generation is unchanged from before this PR. Docker formatting, lint, type checking, package build, and all 421 query-parser tests pass. |
Adds baseline coverage for query generation before changing mixed-operator behavior, as requested in #3032. The PR now changes only tests, so existing saved searches and dashboards keep their current query generation.
Adds 16 cases to the existing SQL and English explanation table: mixed AND/OR chains, explicit grouping on either side, symbolic operators, implicit AND, infix NOT/AND NOT/OR NOT, leading NOT, and negated fields. Removes the previous grouping implementation and duplicate test harness. The behavior fix remains for a separate decision after this baseline is established.
Validated in Docker with Node 22.23.1 and Yarn 4.13.0:
yarn workspace @hyperdx/common-utils tsc --noEmitpassed.yarn workspace @hyperdx/common-utils buildpassed, including declaration generation.yarn workspace @hyperdx/common-utils jest src/__tests__/queryParser.test.ts --ci --coverage=false --runInBand --silent --verbose=falsepassed all 421 tests.yarn lint-stagedpassed for both staged files.Related to #3032. This tests-only PR does not fix the underlying issue or require a release changeset.