• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

microsoft / RulesEngine / 27382531594
95%
master: 97%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 11 Jun 2026 10:55PM UTC
Jobs 1
Files 24
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Jun 2026 10:53PM UTC coverage: 94.691% (+0.1%) from 94.568%
27382531594

push

github

web-flow
Validate duplicate param names and input/global collisions with clear errors (#743)

PR #402 surfaced two cases where the engine threw cryptic
"An item with the same key has already been added. Key: …" deep inside
RuleResultTree construction:

  1. Two GlobalParams in the same workflow sharing a name.
  2. Two LocalParams on the same rule sharing a name.
  3. A caller-supplied RuleParameter whose Name matches a workflow's
     GlobalParam name.

All three now surface clear, actionable errors:

- WorkflowsValidator catches case 1 at AddWorkflow time and throws
  RuleValidationException with "Duplicate GlobalParam name '<name>'".
- RuleValidator catches case 2 similarly with
  "Duplicate LocalParam name '<name>'".
- RulesEngine.AppendGlobals catches case 3 at execution time and throws
  RuleException with "GlobalParam name '<name>' collides with an input
  RuleParameter of the same name". The exception flows through the
  existing per-rule error-surfacing path in ExecuteAllRuleByWorkflow, so
  callers see the explanatory message on each rule's ExceptionMessage —
  the same pattern other scoped-params errors already use.

Constants in Constants.cs make the messages reusable and tested.

Regression test: DuplicateParamNameValidationTest covers all three
failure modes plus a sanity case where distinct names continue to work.

All 174 unit tests pass on net6 / net8 / net9 / net10.

Co-authored-by: Yogesh Prajapati <yogeshcprajapati@outlook.com>

490 of 610 branches covered (80.33%)

21 of 21 new or added lines in 3 files covered. (100.0%)

874 of 923 relevant lines covered (94.69%)

788.08 hits per line

Jobs
ID Job ID Ran Files Coverage
1 27382531594.1 11 Jun 2026 10:55PM UTC 24
94.69
GitHub Action Run
Source Files on build 27382531594
  • Tree
  • List 24
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27382531594
  • e7c73137 on github
  • Prev Build on main (#27382386240)
  • Next Build on main (#27383871609)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc