feat: engine version (#574)

* feat(engine): select the engine with a version option

* ci: run the two feature sets as parallel jobs

* refactor(engine): drop the global compiled switch

* feat(engine): pin the clock through options instead of the environment

The __ZEN_MOCK_UTC_TIME variable and the ZEN_EXPRESSION_CONFIG lane flag are
gone. Isolate takes with_now and with_lane, and the interpreted engine now
honours the now option in expressions, so tests pass the instant explicitly.

* test(engine): count trace paths per thread and drop the trace test lock

* ci: run tests with nextest

* test(engine): share golden trace outcomes between variants
This commit is contained in:
stefan-gorules
2026-11-21 20:09:14 +01:00
committed by GitHub
parent e3d32a210d
commit 3a25f4f5c3
71 changed files with 1457 additions and 755 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ import os
import zen
os.environ['__ZEN_MOCK_UTC_TIME'] = '2025-08-19T16:55:02.078Z'
NOW = "2025-08-19T16:55:02.078Z"
def loader(key):
with open("../../test-data/" + key, "r") as f:
@@ -165,9 +165,9 @@ class ZenEngine(unittest.TestCase):
for test_case in json_contents["tests"]:
key = os.path.basename(json_file)
engine_response = engine.evaluate(key, test_case["input"])
engine_response = engine.evaluate(key, test_case["input"], {"now": NOW})
decision = engine.get_decision(key)
decision_response = decision.evaluate(test_case["input"])
decision_response = decision.evaluate(test_case["input"], {"now": NOW})
self.assertEqual(engine_response["result"], test_case["output"], key)
self.assertEqual(decision_response["result"], test_case["output"], key)