Skip to content

v5.8.0

Choose a tag to compare

@github-actions github-actions released this 08 Oct 14:41
· 12 commits to main since this release

Added

  • Engine::operators() describes every built-in operator compiled
    into the build: canonical name and aliases, family and gating feature,
    the argument counts it reads (declared on every row whose body does not
    take any count, so == reports 2 or more and map exactly 2), whether
    it reads the data context, its effect
    (pure, clock, throws, catches), its cost class, and which
    argument (if any) runs under a pushed frame (ScopedArg). It is read
    from the same table that drives compilation and dispatch, so it cannot
    drift from what the engine does. New public types: OperatorInfo,
    ScopedArg (both #[non_exhaustive]).
  • Logic::facts() reports what a compiled rule reads, which
    operators it uses, and whether its result is a function of its data,
    from one walk over the compiled tree. reads() lists the data paths
    read from the root as DataPath segment lists (sorted, with any path a
    shorter one covers dropped); reads inside iterator bodies and try
    catch arms resolve against the element or the error and are left out,
    while a level marker that climbs back to the root is kept.
    has_computed_reads() flags a path only known at runtime, and
    reads_complete() says whether reads() is everything the rule can
    read (no computed path, no custom operator). operators() lists
    canonical built-in names, matching Engine::operators();
    custom_operators() the custom ones; is_deterministic() is false for
    now and any custom operator. The facts describe the rule after the
    optimizer, so a folded branch is neither read nor listed. A generated
    test checks every suite case: evaluating against data pruned to the
    reported reads gives the same outcome. New public types: Facts,
    DataPath.
  • Roots evaluates several values as the fields of one top-level
    object without building it: Roots::from([("data", &payload), ("metadata", &metadata)]) reads as {"data": .., "metadata": ..}.
    Each root is borrowed and viewed in place like a single input of its
    type (&serde_json::Value, &OwnedDataValue, &ParsedData,
    &DataValue, mixed freely), so a host no longer copies its parts into
    a combined value per evaluation. Accepted by every entry point that
    takes input, by reference or by value. Against a per-evaluation
    json! merge it measured 7 to 10 times faster for payloads of 4 to
    1,024 fields. A generated test splits every suite case's data into
    roots and checks the outcome is unchanged. New public types: Roots,
    RootValue.
  • Engine::truthy_of applies the engine's configured truthiness to
    a value the host already holds: &serde_json::Value,
    &OwnedDataValue, &ParsedData or &DataValue (sealed
    TruthyInput). Hand-written checks on an evaluated result tend to
    differ from the engine: under the default rules an empty object is
    falsy, like an empty array, and a configured TruthyEvaluator applies.
    Tested against the engine's own !! for every representation and
    evaluator.
  • Engine::check reports every problem the engine can see in a rule
    before it runs, in one pass, as Diagnostics (a DiagnosticCode, a
    Severity, a message and an RFC 6901 JSON Pointer into the rule). Errors
    are what will fail: an object with several keys outside templating
    mode, an unknown operator (with a "did you mean" suggestion one edit
    away), and / or / if without an argument array, an argument count
    the operator rejects (read from the operator table, or from a custom
    operator's declared CustomOperatorInfo), and a literal timezone that
    does not exist. Warnings run but are probably mistakes: arguments an
    operator never evaluates, and in a template an output key one edit away
    from an operator name. CheckMode checks in the engine's mode, strictly
    or as a template. Engine::compile_checked compiles only a rule with
    no error diagnostic and otherwise returns a CompileError listing them
    all. A generated test checks that compile fails exactly when check
    reports a compile-level problem. Run over the 525 rules stored in Orion
    and dataflow-rs, it reports nothing in the mode they are compiled in. New
    public types: CheckMode, Diagnostic, DiagnosticCode, Severity,
    CompileError.
  • EvaluationConfig::missing_var chooses what a var / val read that
    finds nothing evaluates to: MissingVar::Null (the default, JSONLogic's
    rule) or MissingVar::Error, which raises VariableNotFound naming the
    path, so a typo in a path fails instead of flowing on as null. A
    default ({"var": ["x", 0]}), a present null, missing,
    missing_some, exists and iteration metadata are not misses, and
    try catches the error. The iterator fast paths that read fields
    inline step aside in error mode so every read raises the same way. Also
    settable from the bindings' JSON config as "missing_var": "error". New
    public type: MissingVar.
  • SharedSession, a Session that holds its engine by Arc, so it
    is 'static + Send: it can be a struct field, move to another thread or
    live across an .await without borrowing the engine
    (SharedSession::new(Arc<Engine>) or From<Arc<Engine>>). It is
    Session<'static, Arc<Engine>>: Session gained a defaulted type
    parameter for how it holds the engine, so Session<'_> still names the
    borrowed form and both have the same methods. Session::engine() returns
    the engine either way. A host that kept a thread-local arena because a
    session borrowed the engine can keep a session per worker instead.
  • Error::code() returns an ErrorCode, the error's kind without its
    payload: one variant per ErrorKind variant, Copy, Eq, Hash,
    present in every build. ErrorCode::as_str() is the name Error::tag()
    has always returned (tag() is now defined through it), it parses back
    with FromStr, and ErrorCode::ALL lists every code, so a host can
    switch on the kind instead of comparing tag strings. ErrorKind::code()
    gives the same for a bare kind. New public types: ErrorCode,
    UnknownErrorCode.
  • EngineBuilder::try_add_operator refuses a name that a built-in
    operator of the build answers to (aliases included), where the custom
    operator would never run, with a ConfigurationError naming the
    built-in. add_operator is unchanged. EngineBuilder::check_operator_name
    gives the same refusal without consuming the builder, which the C ABI's
    strict-names registration uses, so it follows the builder's families too.
    EngineBuilder::try_build checks every name try_add_operator
    took against the builder's final families (Engine::to_builder()
    carries them over), and refuses a max_recursion_depth of 0, as
    EvaluationConfig::from_json_str does; build() is unchanged.
  • Engine::compile_template and Engine::compile_strict choose
    the templating mode for one compile instead of for the engine. The
    engine's custom operators, template key escape and folding setting
    still apply, so one engine can check a condition strictly and compile
    an output template, where a host used to build an engine per mode and
    keep their operator registrations in step. A generated test checks
    every suite case: each mode gives the same compiled rule and outcome as
    an engine built in that mode.
  • CustomOperator::check lets a custom operator validate a call's
    arguments as written, before anything runs. Engine::check and
    compile_checked call it for each call whose argument count fits the
    operator's declaration; compile does not. It returns
    Diagnostic::error or Diagnostic::warning, optionally narrowed with
    at_argument(i), and the checker fills in the JSON Pointer and the
    operator name, under the new code DiagnosticCode::OperatorCheck. The
    default accepts every call. Box<dyn CustomOperator> and Arc<T>
    forward it.
  • Operator families at runtime. EngineBuilder::with_families(..)
    keeps an engine to the JSONLogic core plus the families it names
    (Family::ExtString, Family::DateTime, ...), whatever this build
    compiled in; by default an engine has every compiled family, as before.
    A family left out is not there for that engine: its names compile as
    unknown operators (an error at evaluation, or from compile_checked
    and check), as output fields in templating mode, or as a custom
    operator registered under that name. Engine::operators(),
    builtin_operator_names(), check's suggestions and
    try_add_operator follow the engine's families. The set applies at
    compile time: a rule compiled on another engine keeps its operators.
    New public type: Family (#[non_exhaustive], every family named in
    every build, with Family::ALL, name() and is_compiled()). This is
    the 5.x step towards turning the ext-* features into runtime
    families in 6.0.
  • Trace node pointers. TracedSession::compile(rule) compiles a rule
    the way the one-shot trace does (no folding) and records, for every node
    id, the RFC 6901 JSON Pointer of the rule value that node was compiled
    from. Logic::pointer(id) and Logic::pointers() read them back, so a
    debugger places each ExpressionNode and ExecutionStep in the rule as
    written ("/if/1", "/!" for a lone argument, the key as written for an
    alias such as ?:) instead of re-deriving the compiler's canonical forms.
    An ordinary compile records none.
  • Logic::compiled_on(&engine) tells whether that engine instance
    compiled the rule (not one built alike or rebuilt from it). Any engine
    can still evaluate any rule; in 6.0 a rule evaluates only on its own
    engine, so a host can use this to find the places that rely on the
    name lookup now.
  • Engine::to_builder() starts a builder from a running engine: the
    same custom operators, config, templating mode, template key escape and
    folding setting. Both engines share each operator instance, so a host
    that rebuilds on every reload changes only what differs instead of
    registering every operator again. The engine now stores its operators
    as Arc<dyn CustomOperator>.
  • CustomOperator::info lets a custom operator declare what the
    engine may assume about it, as a CustomOperatorInfo: whether it is
    deterministic, whether it reads the data context, and how many arguments
    it takes. The default method returns CustomOperatorInfo::opaque()
    (nondeterministic, may read the context, any count), so existing
    operators are unchanged. A deterministic operator that does not read the
    context, called with constant arguments, is evaluated once at compile
    time and folded like a built-in. Logic::facts() trusts the declaration
    (is_deterministic(), reads_complete()), and a declared argument count
    is checked before any argument runs. Engine::custom_operator_info(name)
    reads it back. Box<dyn CustomOperator> and Arc<T> forward it.
  • Arc<T> implements CustomOperator (for any
    T: CustomOperator + ?Sized, Arc<dyn CustomOperator> included), so
    one operator instance and its state can be registered on several
    engines, for example on every engine a host builds on hot reload,
    without a wrapper type.
  • all-operators feature enables every operator family. The
    bindings and the benchmark now depend on it instead of listing the
    families one by one.
  • docs/src/operators/operators.json, a machine-readable operator
    catalogue rendered from the table and checked by a snapshot test. The
    feature table in the operators overview is generated from the same
    table, and the React editor's registry test checks its picker entries
    and argument counts against the catalogue.

Added (bindings)

  • The 5.8 API in every binding. WASM, Node, Python, Go, JVM, .NET and
    PHP gain the per-compile templating mode (compileTemplate /
    compileStrict), compileChecked (failing with error type
    CompileError and its diagnostics), check with a mode, the operator
    catalogue (operators, the schema of docs/src/operators/operators.json),
    rule facts (Rule.facts), the engine's truthy, and an option that
    refuses a custom operator named like a built-in (strictOperatorNames
    and its per-language spellings). Errors also carry their node-id
    breadcrumb. Python gains template_key_escape, which the other bindings
    already had. truthy reads a string as JSON text in every binding
    (truthy("[]") is false), and no binding reads a metered budget of
    0 as a budget nothing fits in: it is the engine's own budget across
    the C ABI and refused where the budget can be left out (Python,
    JavaScript). .NET takes an escape outside the BMP (Rune or string).

  • C ABI v2, minor 1. New entry points: datalogic_engine_compile_mode,
    datalogic_engine_compile_checked, datalogic_engine_check,
    datalogic_engine_operators, datalogic_engine_truthy,
    datalogic_rule_facts, datalogic_session_evaluate_metered,
    datalogic_engine_builder_set_template_key_escape,
    datalogic_engine_builder_set_strict_operator_names,
    datalogic_error_diagnostics_json, datalogic_error_node_ids_json,
    datalogic_traced_session_evaluate_mode and datalogic_abi_minor(). Existing symbols are unchanged, so v2 wrappers
    keep working; a wrapper that calls the new ones checks
    datalogic_abi_minor() >= 1 at load. The mode enum is exported as
    datalogic_mode.

  • evaluateInt / evaluateFloat in Node and WASM, the typed-result
    names the other bindings use. evaluateNumber is deprecated.

  • One JSON wire format per document. The bindings share
    crates/datalogic-bind (not published), which defines the traced-run,
    catalogue, facts and diagnostics JSON and the custom-operator bridge,
    replacing four copies of the trace serialiser and the type-name helper.

  • Operator families in every binding: families (Node, WASM,
    Python), Families (Go), withFamilies (JVM, PHP), WithFamilies
    (.NET), over the new C entry point
    datalogic_engine_builder_set_families (a JSON array of family names).
    An unknown family name is a ConfigurationError; five scenarios check
    the option in all eight bindings.

  • Traced runs carry pointers. Every binding's evaluateWithTrace
    envelope (datalogic_bind::traced_json) adds pointers, mapping each
    node id to the JSON Pointer of the rule value it was compiled from; the
    JVM, .NET and PHP TracedRun models expose it (pointers(),
    Pointers, $pointers). It is absent when the rule does not compile.
    schemas/trace.v1.json lists it, and two scenarios check it in all eight
    bindings. Each binding's traced evaluation also takes a compile mode
    ("template" / "strict", or its CompileMode), as
    TracedSession::with_mode does in Rust, so a rule compiled with
    compileTemplate can be traced; a scenario checks it in all eight.

  • A scenario suite every binding runs (bindings/scenarios/api.json),
    and a test that keeps PHP's FFI header and the JVM and .NET native
    declarations in step with the generated datalogic.h.

  • Versioned wire schemas (schemas/*.v1.json, JSON Schema 2020-12)
    for the traced-run envelope, serialised errors, the operator catalogue,
    rule facts and check diagnostics. datalogic-bind's tests validate real
    output against them and reject unlisted properties, so a format change
    is a reviewed schema change.

Fixed (UI)

  • The debugger places trace steps by the engine's pointers. It matched
    each trace node to the rule by re-implementing the compiler's canonical
    forms (alias folding, var / val normalisation, single-argument
    unwrapping) and fell back to loose and positional guesses, so a compiler
    change could silently attach steps to the wrong node. It now resolves each
    node's pointer against the rule it shows and pairs operands by identity;
    child-matching.ts and its heuristics are gone, and a step no node
    claims goes to the nearest placed node whose pointer strictly encloses it.
    A trace without pointers, or converted without the rule as written, pairs
    operands with children by their expression text, then by position.
  • Adding a case to a switch in the editor works again. The editor
    compared the operator's argument limit (3) against the node's cells (a
    switch with one case has four), so "add case" did nothing once the
    catalogue gave switch its real limit, and the context menu and
    properties panel hid it. Every add action now asks one check
    (canAddArgument), which lets the case, else-if and path-segment editors
    grow a node past the limit, since they grow one argument rather than
    adding one.
  • The UI no longer carries a stale @goplasmatic/datalogic-wasm 5.4.0
    devDependency; every build already resolved the package to the WASM built
    from this tree. A build-time type check keeps the editor's hand-written
    WASM interface in step with the generated typings.
  • The CommonJS build (require) starts the WASM engine again; Jest,
    CJS SSR and older-bundler consumers got an editor without evaluation.
    The editor shows a banner when the engine fails to load.
  • Keyboard shortcuts apply only while focus is inside that editor,
    instead of taking keys from the host page and driving every editor on
    it.
  • The selection, open properties panel, pan and zoom survive the
    onChange round trip
    in a controlled editor; they reset ~300 ms after
    each edit. Two editors on a page keep their properties-panel labels and
    focus to themselves.
  • The bundled React Flow styles and the editor's handle and edge
    overrides no longer restyle other React Flow canvases
    on the page, and
    touch panning gets upstream's touch-action: none back.
  • Debugger stepping re-renders only the nodes that change, and long
    traces no longer slow playback quadratically. Inline config /
    customOperators objects no longer make the editor re-check its inputs
    every render.
  • uuid, lucide-react and @dagrejs/dagre are no longer installed as
    dependencies (they were always bundled), and dist no longer carries
    dangling sourceMappingURL comments.

Deprecated

  • The WASM CompiledRule class and the free evaluate(logic, data, templating) and evaluateWithTrace(logic, data, templating) functions:
    build an Engine and use its compile, evalStr and
    evaluateWithTrace. evaluateNumber in Node and WASM: use
    evaluateFloat. All are removed in 6.0.

Changed

  • A custom operator call no longer looks its operator up by name. The
    compiler records the operator's slot on the engine that compiled the
    rule, and dispatch indexes it directly; a rule evaluated on another
    engine still finds that engine's operator by name, as before. A rule
    calling eight custom operators measured 181 ns per evaluation before and
    75 ns after.
  • ErrorKind::BudgetExceeded exists in every build. The variant
    was compiled in only with the budget feature, so code outside
    datalogic had to match on Error::tag() == "BudgetExceeded". It is now
    always present (ErrorKind is #[non_exhaustive], so this is
    additive); only the budget feature raises it.
  • One declarative operator table. Every built-in operator is now one
    row in operators/table.rs plus one function. The OpCode enum, name
    lookup, dispatch arms, builtin_operator_names(), and the constant
    folding, CSE and scope classifications are generated from the row or
    derived from the facts it declares, replacing six hand-maintained
    classifier lists. Fixed-arity operators (the string, object, datetime,
    math, tensor and flagd sem_ver families, plus !, !!, in,
    substr, type, length) are plain typed functions whose argument counting, evaluation
    and result conversion are generated. Every InvalidArguments message
    is unchanged, all suites pass on every compile path, and the canonical
    benchmark is within noise.
  • Editor argument counts for !=, !==, switch and match. The
    React editor offered != and !== as chainable, but the engine
    compares only the first two operands and ignores the rest; they are now
    two-operand nodes. switch / match accept at most a value, the case
    list and a default, as the engine reads. Found by the registry test
    against the catalogue's new argument counts.
  • Nested ! / !! always collapse to one operator. The optimizer
    already rewrote !(!x) to !!x and !!(!!x) to !!x; it now also
    rewrites !(!!x) and !!(!x) to !x, except under a custom truthy
    evaluator (see Fixed). Results are unchanged; a rule with that shape
    shows the shorter form in Logic::to_json() and in traces.
  • Tensor error precedence. When a tensor operator call has two
    problems, a different one may now be reported: a missing argument is
    reported before any argument is evaluated, and an error raised while
    evaluating a later argument now wins over a coercion error on an
    earlier one. Calls that succeed are unaffected.
  • sort with a literal key expression is no longer constant-folded.
    Its key runs per element, like every other iterator body, and is now
    classified that way. Results are unchanged; the rule is simply
    evaluated at run time.

Fixed

  • Constant folding no longer changes what a rule means. A few
    operators read whether an argument is written as a literal: a single
    literal array is an error for +, *, max and min but a computed
    one is summed or scanned; sort rejects a literal null source but
    returns null for a computed one; a literal var / val path is split
    differently from a computed one; switch reads only a literal case
    table. Folding turned an expression with no data reads into a literal
    first, so {"+": [{"if": [true, [1, 2], 0]}]} was NaN on the default
    engine and 3 with folding off or in a trace, and
    {"var": {"cat": ["a", ".b"]}} read a then b instead of the key
    "a.b". Those positions are now declared in the operator table
    (literal_args) and an expression there keeps its own node; everything
    inside it still folds. Logic::facts() follows: a path computed from
    literals is reported as computed.
  • sort by a field reads a missing field as null. With a plain
    {"var": ..} key, an element without the field sorted before one whose
    field is null; with any other key expression they tied and kept their
    input order. They now tie on both paths.
  • A fractional slice bound is an error whether written or computed.
    A literal 1.5 was silently ignored while a computed one raised NaN;
    both raise NaN now. Whole floats (2.0) are still indices.
  • A fractional missing_some minimum rounds up. 2.5 means at least 3
    present, as JSONLogic's present >= need reads it. A literal minimum was
    truncated and a computed one fell back to 1.

These were found by a new reference interpreter in the test suite
(tests/oracle/), which evaluates rules without any optimization and is
compared with the engine on every suite case and on generated rules.

  • filter with a strict comparison against null now sees missing
    fields.
    {"filter": [list, {"===": [{"var": "v"}, null]}]} dropped the
    items that have no v field (and !== kept them), although a missing
    field reads as null everywhere else. Only filter's
    field-against-literal fast path was affected; all / some / none
    and traced evaluation were already right.

  • map arithmetic stays exact next to an overflowing element. A
    map whose body is +, - or * on a field and a literal, or on two
    fields, computed the whole array in f64 as soon as one element
    overflowed i64, rounding exact neighbours past 2^53:
    {"map": [list, {"+": [{"var": "x"}, {"var": "y"}]}]} turned
    i64::MIN + 3 into i64::MIN, and {"-": [{"var": ""}, i64::MAX]}
    returned i64::MIN for every element. Each element is now computed
    exactly as the arithmetic operators compute it. This also affected
    reduce over such a map when the fold could not be fused (for
    example with a non-number initial value).

  • Partial constant folding of + and * gives what evaluation gives.
    The static arguments of a call with dynamic ones were regrouped and
    folded together, but integer overflow into f64, f64 rounding and
    numeric-string coercion do not regroup:
    {"*": [0.1, {"var": "x"}, 10]} was 3 folded and
    3.0000000000000004 with folding off. Only a leading run of integer
    literals that folds exactly is folded now, and only while three or more
    arguments remain, since the two-argument forms coerce differently.

  • Iterator predicates compare as ==, === and in do. The
    filter / all / some / none fast paths compared integers exactly
    under === (the operator compares numbers as f64) and compared two
    strings byte for byte, without the datetime feature's check for two
    spellings of one instant. {"filter": [xs, {"===": [{"var": "k"}, 9007199254740992]}]} over k = 9007199254740993 returned [] though
    the bare === is true, and "2024-01-01T00:00:00Z" did not match
    "2024-01-01T00:00:00+00:00" inside an iterator. A comparison that
    needs the datetime check now runs on the general path.

  • Nested ! / !! keep their meaning under a custom truthy
    evaluator.
    Folding collapsed {"!": [{"!": [x]}]} into {"!!": [x]}
    (and, new in this release, the other nested forms), which assumes a
    boolean's truthiness is itself; a TruthyEvaluator::Custom need not
    agree. The collapse is skipped under a custom evaluator, as the CSE
    pass already was.

  • A computed timezone fails the same way folded or not. Folding
    turned {"cat": ["Nowhere/", "Zone"]} in format_date / parse_date
    into a literal, which the compile-time zone check rejected with a bare
    InvalidArguments; unfolded it was Unknown timezone: Nowhere/Zone.
    The zone position is declared literal_args.

  • Traced sort by a field records each key. The keys were read on a
    fast path, so the trace showed no step for them.

  • Error-path pointers escape like trace pointers. PathStep's
    json_pointer did not escape / and ~ in an operator name (/~1/0
    under /), and for a rule compiled for tracing it is now that rule's
    recorded pointer.

  • A huge missing_some minimum stays huge on 32-bit targets. On
    wasm32 a minimum past u32::MAX wrapped to a small one.

  • Logic::to_json() reads back as the rule. A call with one argument
    was written with the argument in place, so an argument that is an
    array read back as the argument list ({"max": [[1, 2]]} became
    {"max": [1, 2]}), and and / or / if, which take only an array,
    read back as an error ({"or": [0]} became {"or": 0}). Both now keep
    the array. Literal-shape arguments staying unfolded in this release made
    the shapes reachable on the default engine.

  • A reduce can no longer build a value deep enough to abort the
    process.
    A fold that wraps its accumulator each step
    ({"reduce": [xs, [{"var": "accumulator"}], null]}) nested one level per
    item, and serialising, comparing or copying the result recursed once per
    level: 100,000 items overflowed an 8 MiB stack and aborted with
    fatal runtime error: stack overflow, which no catch_unwind can stop.
    The accumulator may now nest at most 1,024 levels (four times what the
    parser accepts as input), and passing that is an InvalidArguments
    error. Accumulators are measured against the previous step's parts and,
    for bodies of built-ins, only every few steps, so folds to numbers and
    folds that rebuild flat lists cost what they did.

  • format_date with an unknown chrono specifier is an error, not a
    panic.
    A raw specifier chrono does not know ("%Q") or a trailing %
    panicked inside chrono's formatter. It is now
    InvalidArguments("Invalid date format").

  • A rule compiled on one engine follows the evaluating engine's
    settings.
    Constant folding evaluates under the compiling engine's
    number coercion, NaN and division handling, loose equality and
    truthiness, so {"/": [1.5, 0]} compiled on a default engine kept
    1.797e308 on an engine set to return null on division by zero, while
    the same division computed at runtime returned null; a dead if branch
    was dropped by the compiling engine's truthiness. A rule whose compile
    folded something under those settings now keeps its source and is
    compiled again on an engine whose settings differ (once per distinct
    setting, cached on the rule). Rules evaluated on the engine that
    compiled them, or on one with the same settings, are unchanged.

  • A record with a datetime or timestamp field is ordinary data.
    Any object carrying such a key was taken for the boundary form of a
    datetime, so === and == judged two different records equal by that
    field alone, in matched them, distinct dropped all but one, and
    type reported "datetime" or "duration". Only the single-key form
    ({"datetime": "..."}, {"timestamp": "..."}) is a datetime now.

  • Logic::to_json writes valid JSON and keeps dotted val keys.
    Paths, missing / exists paths, template keys, custom operator names
    and throw types holding quotes, backslashes or control characters
    came out unescaped (so the trace tree's expression strings broke
    too), and {"val": "a.b"} came back as {"var": "a.b"}, which reads
    a then b. Such reads are now written in the val form; other output
    is unchanged.

  • Error::resolve_path names a var default and template fields
    right
    on a rule not compiled for tracing: /var/1 (was /var/0) and
    /b (was /1), as a traced compile records them.

  • Error::operator names the innermost failing operator, custom
    operators included, and plain and traced runs agree. It was the root
    operator unless a deeper site set one, and the traced run always
    reported the root. Behaviour change in that field and in the
    serialized error's "operator".

  • fractional weights past 32 bits no longer overflow. [i64::MAX, 1] returned null and [2^40, 2^40] split differently from [1, 1] in
    release builds (a debug build panicked). Weights clamp to i32::MAX, as
    flagd's are 32-bit; weights within 32 bits pick exactly as before.

  • Tensor constructors refuse more than 2^28 elements. zeros, full,
    scatter, rle_expand, one_hot and pad sized a buffer from the
    rule's dimensions with only a usize overflow check, so
    {"zeros": [[1000000, 1000000], "f64"]} asked for 8 TB and hung or
    aborted the process. Past 2^28 elements (2 GiB of f64) they are now
    InvalidArguments.

  • Metered counts no longer depend on data types, tracing or
    MissingVar.
    Iterator fast paths now charge what the general path
    charges for the same data, and the double charge when a fused
    reduce(map(...)) gave up is gone. Behaviour change: counts for
    fast-path shapes rise to match the general path.

  • The reduce fast path no longer treats accumulator.x as the whole
    accumulator
    ({"+": [{"var": "current"}, {"var": "accumulator.x"}]}
    summed the accumulator itself).

  • Datetime arithmetic takes any number of operands, in either order:
    {"+": [dt, "1d", "1d"]}, {"+": ["1d", dt]} and {"-": [dt, "1d", "1d"]} raised NaN.

  • Integers above 2^53 compare, divide and sort exactly in == (with
    integer strings), ===, < and friends, /, % and sort, and
    variadic + / * coerce numeric strings as the binary forms do.
    Behaviour change: such values are no longer rounded or judged equal.

  • NanHandling::CoerceToZero substitutes 0 as documented instead of
    skipping the value: {"*": [2, "x", 3]} is 0, not 6.

  • The strings "NaN", "inf", "infinity" and overflowing literals no
    longer coerce to non-finite numbers.
    Arithmetic applies NaN handling
    to them (it produced null), == and < raise NaN, and abs, ceil
    and floor raise InvalidArguments.

  • ceil / floor keep results outside the i64 range as floats
    instead of saturating to i64::MAX / i64::MIN.

  • lower / upper apply context-sensitive Unicode case rules
    ("ΟΔΟΣ" → "οδος").

  • type classifies strings with the datetime and duration parsers:
    "password1" is "string" (it was "duration"), and an offset or
    naive ISO datetime is "datetime".

Fixed (bindings)

  • Node: @goplasmatic/datalogic-node ships its index.js loader and
    index.d.ts typings again.
    5.1.1 through 5.7.1 published the
    package with only package.json, the README and the LICENSE, so
    require('@goplasmatic/datalogic-node') failed with
    MODULE_NOT_FOUND (the per-platform packages were complete). The
    release now hands the generated loader to the publish job, and refuses
    to publish the package without it.
  • Node: a panic in the engine throws instead of aborting Node. No
    export was guarded, so any panic killed the process (and a panic in
    evaluateStrAsync ran unguarded on the libuv pool). Every export now
    carries #[napi(catch_unwind)], and every call into the engine turns a
    panic into a thrown error (or a rejected promise) with
    name/errorType "InternalError".
  • Go: custom operators keep working after the Engine is closed or
    collected.
    Engine.Close() (also its finalizer) deleted the callback
    handles that Rules and Sessions from that engine still call, so a later
    evaluation crashed the process with misuse of an invalid Handle. The
    handles now belong to a registry that the Engine, every Rule, Session
    and TracedSession keep alive, and the callback state passes through C as
    a C-allocated box rather than a Go pointer, as cgo's pointer rules
    require.
  • .NET: custom operators keep working after the Engine is disposed or
    finalized.
    Engine.Dispose() freed the delegates' GCHandles while
    Rules and Sessions still called them, failing with
    operator handle had wrong type. The handles now belong to an object
    that the Engine, every Rule, Session and TracedSession hold.
  • C ABI: a custom-operator callback that re-enters the session running
    it gets DATALOGIC_STATUS_INVALID_ARG
    instead of undefined behaviour
    (memory corruption in Go, JVM, .NET and PHP); reset / free on that
    session do nothing, and allocated_bytes returns 0.
  • C ABI: builder setters called after datalogic_engine_builder_build
    fail with DATALOGIC_STATUS_INVALID_ARG
    (set_config_json,
    set_families, set_template_key_escape, add_operator); they
    returned OK and did nothing.
  • Traced evaluation keeps the result's object key order in every
    binding; keys came back sorted.
  • Node: allocatedBytes no longer wraps above 4 GiB. Python releases
    the GIL while compiling and checking. A typed-result mismatch on a
    datetime or duration reports got string, not got object.
  • Go, .NET, PHP, JVM: an engine builder dropped before Build no longer
    leaks its native builder
    , and Go, .NET and JVM Close / Dispose /
    close() free a handle exactly once under concurrent calls. JVM handles
    never closed are freed by a shared Cleaner.
  • PHP: Rules, Sessions and TracedSessions keep their Engine (and its
    custom operators) alive
    , wrapping a native handle a second time throws
    InvalidArgumentException instead of double-freeing it later
    (behaviour change), and the native library is found on Windows (the
    machine name was matched case-sensitively against AMD64 / ARM64).
  • Go, .NET (and JVM for non-string fields): a malformed batch item
    decodes like the other hosts
    , as tag "InternalError" with the raw
    JSON as the message.
  • JVM: the native library is extracted once to a per-user cache named by
    its SHA-256
    (~/.cache/datalogic/native/ or the platform
    equivalent, falling back to a temp directory) instead of a fresh temp
    directory per start, which piled up on Windows. The jar declares
    Automatic-Module-Name: com.goplasmatic.datalogic.
  • Go: the module tag's static libraries are about 6x smaller
    (darwin/arm64 81.6 → 13.5 MB): a debuginfo-free, LTO'd go-release
    profile. .NET ships net8.0 and net10.0 builds.
  • WASM: the npm package declares engines.node >=18, matching the
    Node package. Python wheels list Python 3.14.

Performance

  • Evaluating against an owned, serde or Roots input brings in only
    what the rule reads.
    A compiled rule whose reads are all known
    (Logic::facts(), reads_complete()) and that does not read the whole
    input now views just those paths: on the way down each path only the
    object keys it names, and the whole value at its end. Reading one field
    of an 8 MB context through Engine::evaluate or a Session takes 36 ns
    owned and 41 ns serde, where viewing the whole input took 2.96 ms and
    15.7 ms; a 1 KB context is 3 to 12 times faster. Roots keeps only the
    roots a rule reads. Results are unchanged: every suite case gives the
    same outcome projected and whole, under default, unfolded and
    MissingVar::Error engines. A rule with a computed path, a custom
    operator that reads the context, or a read of the whole input is viewed
    whole as before, as is a rule evaluated on an engine other than the one
    that compiled it, and traced runs. JSON text and ParsedData inputs
    are unaffected. tools/benchmark gains a projection binary for these
    numbers.
  • filter, all, some and none over a comparison predicate are
    faster and no longer layout-sensitive.
    The recognised predicate shape
    is now dispatched once per call instead of once per item. Over 1,000
    items: {">": [{"var": ""}, 500]} filters in 1.17 µs (was 3.2 µs, or
    6.0 µs in some builds of the same code), full all / some scans are
    3.7 to 3.9 times faster, and comparisons on a field are 26 to 31% faster.
  • map and reduce arithmetic fast paths fix their operation outside
    the loop.
    Over 1,000 items: reduce with {"+": [{"var": "current.score"}, {"var": "accumulator"}]} is 21% faster, a fused
    reduce over map 9 to 16%, map with two fields 13% and with a
    fractional literal 38%; the remaining shapes are flat to 5% faster. The
    timings are now the same across builds of the same code.
  • One-shot Engine::eval* and the top-level eval* functions project
    owned, serde_json and Roots input the same way.
  • The CSE compile pass is one post-order walk instead of re-walking
    subtrees at every node; a projection binary-searches wide read sets;
    template keys are borrowed instead of copied per evaluation; compiling
    a borrowed &OwnedDataValue no longer deep-clones it; split, stepped
    string slice, format_date, parse_date, now and missing copy
    less.
  • The second round of fixes in this release, measured against the tree
    before it, moves the canonical bench geomean +1.0% on the suites whose
    cases did not change; macro suites stay within +3% (checkout-40
    +1.4%).

Changed (tooling)

  • The Cargo.lock of every shipping workspace is committed and releases
    build --locked with a pinned toolchain; CI gains cargo-semver-checks,
    cargo-deny, a docs check, a WASM size gate, fuzzing and weekly macOS /
    Windows runs, and the release runs all of CI on the tag before
    publishing. Integration tests declare their required-features.
  • Dependency updates. Every Rust lockfile refreshed (napi 3.14.2
    in the Node binding). UI: @xyflow/react 12.12.0 (its bundled base
    CSS regenerated), vite 8.3.3, vitest 5.0.3, eslint 10.12.0,
    typescript-eslint 8.71.1, lucide-react 1.52.0 and smaller bumps;
    source-map-js 1.2.2 (#82, an event-loop DoS advisory). TypeScript stays on
    6.x until typescript-eslint admits 7. Node: @napi-rs/cli 3.10.8.
    JVM: maven-jar-plugin 3.5.1. .NET, Python, PHP and Go were already
    current.
  • The GitHub release attaches the @goplasmatic/datalogic-ui tarball
    again; the asset step looked for the package one directory too deep.

Every binding passes the same conformance battery: 66 suites / 2,128 cases.
Try rules live in the playground.
Running datalogic-rs in production? Add your project.