Skip to content

Release 1.0.6: pin wirelog to v0.60.0, and port wirelog example 14 - #187

Merged
justinjoy merged 2 commits into
mainfrom
deps/wirelog-0.60.0
Sep 5, 2026
Merged

justinjoy merged 2 commits into
mainfrom
deps/wirelog-0.60.0

Conversation

@justinjoy

Copy link
Copy Markdown
Contributor

Moves the bundled and validated wirelog ref from v0.54.0 to v0.60.0 (peeled SHA 300f3e5150095c85331b561f1f42d99c27b4746f), bumps PyreWire to 1.0.6, and ports wirelog examples/14-arithmetic-operations to exercise the float support that arrives with the bump.

Compatibility

  • Runtime floor stays at 0.52.0. 0.60.0 adds 19 exported symbols and removes none; SONAME is unchanged (libwirelog.so.1). None of the new symbols is wrapped.

  • One compatibility break, at the engine level. wirelog#1021 refuses a recursive min()/max() aggregate that shares an SCC with any other relation. optimize() still succeeds; evaluate() raises InvalidIRError. Programs that ran on 0.54.0 can stop running here.

    Measured against both builds — the shape now covered by test_recursive_aggregate_sharing_an_scc_is_refused returned Label all-1 on 0.54.0 while still reporting Big(3) and Big(4): two nodes said to carry a label above 2 when no surviving label exceeds 1. The workaround is to break the feedback edge so the consumer lands in a later stratum. Upstream tracks narrowing the rule as wirelog#1135.

    wirelog's rejection is silent at the default log level and wl_plan_from_program() has no error channel (wirelog#1137), so PyreWire can only surface the generic InvalidIRError, with no message naming the relations involved. WL_LOG=EVAL:1 gets the engine's diagnostic.

  • Positive side compound patterns now work in any body-atom position (wirelog#994), so conjunction order no longer changes the result.

  • The remaining engine fixes in the range (wirelog#1075, #1083, #1074) are all unreachable through PyreWire's surface.

New: float support, and example 14

A .decl may declare a float column, a fact may carry a float literal, and average() over a float operand returns a float. PyreWire needed no code change to carry this — a float column decodes as a Python float through the existing result path. The same release adds arithmetic expressions in a rule head and multi-line .decl continuations.

examples/14_arithmetic_operations.py asserts wirelog's own golden output for that example:

result: ('negative', -12, -22, -85, -3, -2, -24)
        ('positive', 22, 12, 85, 3, 2, 44)
        ('precedence', 11, 5, 24, 2, 2, 22)
minimum(-17)  maximum(17)  average_value(2.5)  sample_count(3)  zero_observed(+0.0)

Two behaviors are demonstrated because they are easy to misread: arithmetic parses left-associatively (A + B * C is (A + B) * C, so precedence is 22 and not 14), and the typed float ingress canonicalizes -0.0 and +0.0 to the same +0.0, so two zero_input facts collapse to one row. The test asserts that row's sign bit rather than its value, since 0.0 == -0.0 in Python.

One limitation, documented in the example and the CHANGELOG: float values reach a program through its source text only. EasySession.insert() carries int64 lanes and raises ExecError on a Python float. wirelog 0.60.0 adds wirelog_session_insert_typed() for typed ingress; PyreWire does not wrap it yet. That is why the example uses BatchProgram with inline facts rather than a session.

The whole example program — both halves, not just the float one — is a parse error on 0.54.0 and older, so its test skips below 0.60.0 rather than partially running, and the example stays out of the ungated parametrize list the other ports share.

Validation

wirelog v0.60.0 built from source locally, suite run against both engines:

Engine Result
0.60.0 (new pin) 599 passed, 3 skipped
0.54.0 (old pin) 597 passed, 5 skipped — the two new gated tests skip cleanly

black, isort and flake8 clean. One pre-existing failure in both columns, test_installed_wheel_is_recognized_as_typed_by_mypy, is a local-sandbox artifact: the test builds a venv with system_site_packages=True, which from inside another venv resolves to the base interpreter's site-packages where mypy is not installed. It fails identically on unmodified main here and passes in CI.

https://claude.ai/code/session_01MqHwvCimcvrg1osEY5MH7o

Move the bundled and validated wirelog ref from v0.54.0 to v0.60.0 at
peeled SHA 300f3e5150095c85331b561f1f42d99c27b4746f and bump PyreWire to
1.0.6.

Keep the runtime minimum at 0.52.0. wirelog 0.60.0 adds 19 exported
symbols and removes none, and the SONAME is unchanged, so no PyreWire
code stops supporting 0.52.0. None of the new symbols is wrapped.

The bump carries one compatibility break, and it is an engine-level one
that reaches every PyreWire entry point: wirelog#1021 refuses a
recursive min()/max() aggregate that shares an SCC with any other
relation. optimize() still succeeds and evaluate() raises
InvalidIRError. Programs that ran on 0.54.0 can stop running here.

The refusal is right even though the rule is coarse. Such a consumer
reads the aggregate's per-iteration content, so what it observes is
decided by the evaluation strategy rather than by the program. Measured
against both builds: the shape now covered by
test_recursive_aggregate_sharing_an_scc_is_refused returned Label all-1
on 0.54.0 while still reporting Big(3) and Big(4) - two nodes said to
carry a label above 2 when no surviving label exceeds 1. The workaround
is to break the feedback edge so the consumer lands in a later stratum;
upstream tracks narrowing the rule as wirelog#1135.

wirelog's rejection is silent at the default log level and
wl_plan_from_program() has no error channel (wirelog#1137), so PyreWire
can only surface the generic InvalidIRError with no message naming the
relations involved. WL_LOG=EVAL:1 gets the engine's diagnostic.

Positive `side` compound patterns now work in any body-atom position
(wirelog#994), so conjunction order no longer changes the result. The
remaining engine fixes in the range - wirelog#1075, #1083 and #1074 -
are all unreachable through PyreWire's surface.

Validated by building v0.60.0 from source and running the suite against
it: 595 passed, 3 skipped, no new failures. The three tests gated on
0.54.0 behavior still pass.

Claude-Session: https://claude.ai/code/session_01MqHwvCimcvrg1osEY5MH7o
wirelog 0.60.0 brings float support, and nothing in PyreWire exercised
it. A .decl may declare a float column, a fact may carry a float
literal, and average() over a float operand returns a float; PyreWire
needed no change to carry any of it, because a float column decodes as
a Python float through the existing result path. The same release added
arithmetic expressions in a rule head and multi-line .decl
continuations.

The example ports wirelog examples/14-arithmetic-operations and asserts
that project's own golden output: the three result rows, min/max over
the int64 column, average_value 2.5, count 3, and the single
zero_observed row.

Two behaviors are demonstrated because they are easy to misread.
Arithmetic parses left-associatively, so A + B * C means (A + B) * C
and the precedence row derives 22 rather than 14. And the typed float
ingress canonicalizes -0.0 and +0.0 to the same +0.0, so two
zero_input facts collapse to one row - the test asserts the surviving
row's sign bit, not just its value, since 0.0 == -0.0 in Python.

Float values reach a program through its source text only, which is why
the example uses BatchProgram with inline facts rather than a session:
EasySession.insert() carries int64 lanes and raises ExecError on a
Python float. wirelog 0.60.0 adds wirelog_session_insert_typed() for
typed ingress and PyreWire does not wrap it yet.

The whole program - both halves, not just the float one - is a parse
error on 0.54.0 and older, so the test skips below 0.60.0 rather than
partially running, and the example is left out of the ungated
parametrize list that the other ports share.

Claude-Session: https://claude.ai/code/session_01MqHwvCimcvrg1osEY5MH7o
@justinjoy
justinjoy merged commit 9284bc0 into main Sep 5, 2026
17 checks passed
@justinjoy
justinjoy deleted the deps/wirelog-0.60.0 branch September 5, 2026 06:16
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