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

microsoft / RulesEngine / 27382386240
95%
master: 97%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 11 Jun 2026 10:52PM 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:50PM UTC coverage: 94.568% (-0.2%) from 94.814%
27382386240

push

github

web-flow
Add opt-in parallel rule compilation (improved on top of #741) (#744)

* Add opt-in parallel rule compilation for faster workflow warmup

Rule compilation during workflow registration was strictly serial. For
workflows with very large rule counts (10k+), warmup is dominated by
this loop even after expression parsing is fixed.

Adds ReSettings.EnableParallelRuleCompilation (default false). When
enabled, rules are compiled with Parallel.For and results are added to
the compiled-rule dictionary in the original order. An
AggregateException from the parallel loop is unwrapped so the first
failing rule surfaces its original exception, preserving the serial
error contract (verified by the existing
ExecuteRule_MissingMethodInExpression_ReturnsRulesFailed test).

Benchmark, 20,000 unique rules with local params: 16.2s serial -> 4.7s
parallel on a 16-thread machine.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Guard EnableParallelRuleCompilation and add tests

Builds on #741 by @benluersen. The original opt-in parallel rule
compilation is sound but had two latent footguns and no test coverage
for the parallel path:

1. UseFastExpressionCompiler interaction (~2.7× regression when both
   flags are on, per the PR description) — users would flip the flag and
   silently get slower. The engine now declines to parallelize when
   UseFastExpressionCompiler = true and falls back to serial.

2. Below ~32 rules, Parallel.For's scheduling overhead exceeds the
   speedup. Added a MinRulesForParallelCompilation threshold so small
   workflows aren't penalised by enabling the flag globally.

3. catch (AggregateException ae) accessed ae.InnerExceptions[0]
   without bounds-checking. Replaced with a `when` filter so the catch
   only matches when there's actually an inner exception to rethrow.

XML doc on ReSettings.EnableParallelRuleCompilation now spells out both
fallback conditions so the contract is obvious without reading the
implementation.

New ParallelRu... (continued)

467 of 586 branches covered (79.69%)

14 of 17 new or added lines in 1 file covered. (82.35%)

853 of 902 relevant lines covered (94.57%)

749.8 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
97.46
-1.18% src/RulesEngine/RulesEngine.cs
Jobs
ID Job ID Ran Files Coverage
1 27382386240.1 11 Jun 2026 10:52PM UTC 24
94.57
GitHub Action Run
Source Files on build 27382386240
  • Tree
  • List 24
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27382386240
  • aeb29324 on github
  • Prev Build on main (#27370742919)
  • Next Build on main (#27382531594)
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