mirror of
https://github.com/gorules/zen.git
synced 2026-12-03 08:10:32 +00:00
* 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
25 lines
497 B
Rust
25 lines
497 B
Rust
use zen_engine::policy::PolicyWorkspace;
|
|
use zen_engine::{Decision, DecisionEngine, EngineVersion};
|
|
|
|
pub trait Latest {
|
|
fn latest(self) -> Self;
|
|
}
|
|
|
|
impl Latest for Decision {
|
|
fn latest(self) -> Self {
|
|
self.with_version(EngineVersion::V2)
|
|
}
|
|
}
|
|
|
|
impl Latest for DecisionEngine {
|
|
fn latest(self) -> Self {
|
|
self.with_version(EngineVersion::V2)
|
|
}
|
|
}
|
|
|
|
impl Latest for PolicyWorkspace {
|
|
fn latest(self) -> Self {
|
|
self.with_version(EngineVersion::V2)
|
|
}
|
|
}
|