Skip to content

feat(wf nested condition): allow nested condition on gateway step - #2064

Open
arnaud-moncel wants to merge 1 commit into
mainfrom
feat/wf-nested-condition
Open

arnaud-moncel wants to merge 1 commit into
mainfrom
feat/wf-nested-condition

Conversation

@arnaud-moncel

@arnaud-moncel arnaud-moncel commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Definition of Done

Fixes PRD-1171

General

  • Write an explicit title for the Pull Request, following Conventional Commits specification
  • Test manually the implemented changes
  • Validate the code quality (indentation, syntax, style, simplicity, readability)

Security

  • Consider the security impact of the changes made

Note

[!NOTE]

Add nested And/Or condition groups to workflow gateway condition steps

  • Condition step definitions now accept recursively nested And/Or groups of conditions, validated by a new recursive Zod schema in step-definition.ts. Empty groups fail validation.
  • ConditionStepExecutor evaluates each option's conditions as a root group with recursive group evaluation, and condition traces now include nested group results (condition-step-executor.ts).
  • The agent capabilities response reports a new nested-condition-tree capability (capabilities.ts).
  • ConditionTreeParser rejects empty nested condition groups while keeping an empty root group valid, and fixes null-handling in its isLeaf/isBranch type guards (condition-tree-parser.ts).
  • FilterGenerator.computeMatch now handles empty branches: an empty Or matches no records and an empty And imposes no restriction, instead of emitting empty MongoDB logical-operator arrays (filter.ts).
  • Risk: option conditions changed from a flat leaf-only array to recursive nodes in server-types.ts; consumers of the server condition type and of ConditionResult must handle the new recursive shape.

Macroscope summarized bf29fb2.

@qltysh

qltysh Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Qlty


Coverage Impact

This PR will not change total coverage.

Modified Files with Diff Coverage (2)

RatingFile% DiffUncovered Line #s
Coverage rating: A Coverage rating: A
...ges/workflow-executor/src/executors/condition-step-executor.ts100.0%
Coverage rating: A Coverage rating: A
packages/workflow-executor/src/types/validated/step-definition.ts100.0%
Total100.0%
🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

Base automatically changed from feat/nested-condition-tree to main November 6, 2026 08:19
@qltysh

qltysh Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

All good ✅

@linear-code

linear-code Bot commented Nov 6, 2026

Copy link
Copy Markdown

PRD-1171

@arnaud-moncel
arnaud-moncel force-pushed the feat/wf-nested-condition branch from 2f61628 to bf29fb2 Compare November 6, 2026 10:16

This branch has not been deployed

No deployments
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