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

ehtick / RulesEngine / 27382950702
89%

Build:
DEFAULT BRANCH: main
Ran 12 Jun 2026 10:26PM 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: 88.976% (+0.4%) from 88.621%
27382950702

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%)

Branch coverage included in aggregate %.

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

14 existing lines in 2 files now uncovered.

874 of 923 relevant lines covered (94.69%)

789.05 hits per line

Coverage Regressions

Lines Coverage ∆ File
8
80.1
1.18% src/RulesEngine/ExpressionBuilders/RuleExpressionParser.cs
6
90.95
-0.05% src/RulesEngine/RulesEngine.cs
Jobs
ID Job ID Ran Files Coverage
1 27382950702.1 12 Jun 2026 10:26PM UTC 24
88.98
GitHub Action Run
Source Files on build 27382950702
  • Tree
  • List 24
  • Changed 16
  • Source Changed 5
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27382950702
  • e7c73137 on github
  • Prev Build on main (#26703831342)
  • Next Build on main (#27411669090)
  • Delete
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