Skip to content

fix(workbook): honor AND precedence in mixed conditions - #70

Open
rudycelekli wants to merge 1 commit into
debpalash:mainfrom
rudycelekli:fix/workbook-condition-precedence-20261010
Open

rudycelekli wants to merge 1 commit into
debpalash:mainfrom
rudycelekli:fix/workbook-condition-precedence-20261010

Conversation

@rudycelekli

Copy link
Copy Markdown
Contributor

What & why

Mixed workbook conditions currently split on AND before OR. For example, {a} == "yes" OR {b} == "yes" AND {c} == "yes" can skip a column even when the first comparison is true.

Evaluate OR groups of AND terms, using the existing quoted-aware tokenizer and comparison evaluator. This matches ordinary boolean precedence and the automation condition parser. Parenthesized expressions are not added.

Type

  • Bug fix

Verification

  • The frozen regression file fails 11 cases on main and passes all 17 here. Existing condition tests plus these regressions: 71 passed.
  • Independent review checked 112 mixed-expression truth cases, 1,050 compatibility cases, and short-circuit behavior.
  • Real _run_one_cell enrichment against migrated SQLite: main 2 failed / 2 controls passed; this branch 4 passed. Both previously skipped mixed conditions now execute the formula and persist its value. No provider or network call.
  • The unchanged full PR checks workflow passed all four jobs at signed head 717f6697b79f82a89ba14a684846a6cb24d6ef90: fork verification. Upstream checks will run separately.

Checklist

  • Commits are signed off per the DCO
  • Backend tests pass, verified with the frozen CI environment
  • Monorepo lint and build pass in CI
  • No scraping of paywalled, pirated, or login-gated content added
  • Credentialed providers remain opt-in and inert by default

Security-sensitive?

This changes boolean grouping in the workbook condition evaluator. It does not change auth, tenancy, outbound fetches, credentials, or LLM handling.

Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant