Skip to content

Re-vendor RuleMonkey 3.11.0 to 3.12.0 - #1220

Merged
wshlavacek merged 2 commits into
mainfrom
vendor/rulemonkey-3-12-0
Oct 23, 2026
Merged

wshlavacek merged 2 commits into
mainfrom
vendor/rulemonkey-3-12-0

Conversation

@wshlavacek

Copy link
Copy Markdown
Collaborator

Refresh third_party/rulemonkey with scripts/vendor_rulemonkey.py at tag v3.12.0 (richardposner/RuleMonkey@9df2984), from 3.11.0 (f11c251). The second commit records the new baseline in scripts/RULEMONKEY_VENDORING.md.

Two-repo ordering, done upstream first

This tree's expression.hpp and expression.cpp had moved past 3.11.0's ExprTk sync pin (6ce2276), so the EXPRTK_SYNC_FILES guard would have refused the tag. richardposner/RuleMonkey#120 re-synced RuleMonkey's standalone copy to bngsim 4361958 before the release was cut. --summary reports ExprTk sync pin: 4361958… (matches current BNGsim tree), and that pin is still current on main at 02bb304.

What reaches method="rm" and RuleMonkeySession

RuleMonkey's Arrhenius work (richardposner/RuleMonkey#109) does not reach users yet. refuse_rulemonkey_energy_misreads still refuses every shape 3.11.0 misread, and lifting it is #1058.

run_ensemble() is new in RuleMonkey's API, and bngsim does not call it. RuleMonkey's include/ changed only by addition, so nothing bngsim compiles against changes signature. librulemonkey now links Threads::Threads, found by RuleMonkey's own CMakeLists.txt under add_subdirectory().

The one test change

test_rulemonkey_names_an_energy_rule_shape_it_refuses_itself matched 3.11.0's wording of RuleMonkey's own refusal of a state-change Arrhenius rule ("binding/unbinding shape"). RuleMonkey still refuses that rule by name, now as "outside the shapes RM runs: it changes a state …", and the test matches that.

Verified

  • vendor_rulemonkey.py --summary, then --check before writing (it reported the expected 18-path drift and no guard failures), then the refresh, then --check again: "matches v3.12.0 @ 9df2984".
  • Rebuilt with scripts/rebuild_editable.py, with no warnings from RuleMonkey's sources.
  • test_rulemonkey.py 38 passed, and test_timeout.py -k rulemonkey 10 passed.
  • Every test file that drives RuleMonkey (18 files): 448 passed, 3 skipped. The skips are the RuleMonkey-not-compiled cases.
  • scripts/local_ci.py wheel --python 3.12: ALL PASS, including the RuleMonkey session smoke.
  • The pre-push hook's full python/tests run passed, twice. The first push's SSH connection timed out during a 29-minute cold-cache run; the second passed again and pushed.

Changelog: changelog.d/+rulemonkey-3-12-0.fixed.md.

Follow-ups: #1058 (lift refuse_rulemonkey_energy_misreads, tracked upstream as richardposner/RuleMonkey#118), and #1059's ssa half.

Refresh third_party/rulemonkey with scripts/vendor_rulemonkey.py at tag
v3.12.0 (richardposner/RuleMonkey@9df2984), from 3.11.0 (f11c251).

This refresh needed the two-repo ordering.  This tree's expression.hpp
and expression.cpp had moved past 3.11.0's ExprTk sync pin (6ce2276),
so richardposner/RuleMonkey#120 re-synced RuleMonkey's standalone copy
to bngsim 4361958 before the release was cut, and --summary reports
the pin matching this tree.

What reaches method="rm" and RuleMonkeySession:
- functions settle in dependency order, so one that reads a function
  listed after it in the XML no longer reads a stale value; a table
  function indexed by a function no longer overflows the stack; a
  function that reads a table function gets its whole expression
  (richardposner/RuleMonkey#111);
- a rate law that reads reactant_N() through a helper function fires
  at its own rule's count (richardposner/RuleMonkey#59);
- RuleMonkey keeps its clock as a per-call origin plus elapsed time
  (richardposner/RuleMonkey#110).  bngsim already ran clock-free models
  on elapsed time; a model that reads the clock runs on absolute model
  time since #1022, and now keeps its waiting times there.  #1059's
  decay, with g() made to read time(), 10 seeds, A0 at t0 + 2 against
  1e5*e^-1 = 36788: 36733 (z = -1.1) from t0 = 0, 1e9, 1e12 and 1e13
  alike, where #1059 reports 22743 (z = -291) at 1e12 on 3.11.0;
- a session that runs out of events moves its clock to t_end, so the
  next segment from t_end runs.  A clock-reading model that decays out
  now reports current_time = 10.0 after simulate(0, 10, 10), and
  simulate(10, 20, 10) runs;
- a non-finite t_end, a NaN segment start and a NaN in sample_times
  are refused.

RuleMonkey's Arrhenius changes (richardposner/RuleMonkey#109) do not
reach users yet: refuse_rulemonkey_energy_misreads still refuses every
shape 3.11.0 misread, and lifting it is #1058.  The one bngsim test
that changes is test_rulemonkey_names_an_energy_rule_shape_it_refuses_itself,
which matched 3.11.0's wording of RuleMonkey's own refusal of a
state-change Arrhenius rule.  RuleMonkey still refuses it by name;
the message now reads "outside the shapes RM runs: it changes a
state ...".

run_ensemble() is new in RuleMonkey's API, and bngsim does not call
it.  RuleMonkey's include/ changed only by addition, so nothing bngsim
compiles against changed signature.  librulemonkey now links
Threads::Threads, found by RuleMonkey's own CMakeLists.txt under
add_subdirectory().
scripts/RULEMONKEY_VENDORING.md still named 3.11.0 (f11c251) as the
vendored commit; VENDOR.json now records v3.12.0 at 9df2984.  Unlike
the two refreshes before it, this one needed the two-repo ordering the
doc describes, and the doc now says so and names the upstream sync,
richardposner/RuleMonkey#120 (ExprTk sync pin 6ce2276 -> 4361958).
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