Release 1.0.6: pin wirelog to v0.60.0, and port wirelog example 14 - #187
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves the bundled and validated wirelog ref from
v0.54.0tov0.60.0(peeled SHA300f3e5150095c85331b561f1f42d99c27b4746f), bumps PyreWire to 1.0.6, and ports wirelogexamples/14-arithmetic-operationsto 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()raisesInvalidIRError. 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_refusedreturnedLabelall-1 on 0.54.0 while still reportingBig(3)andBig(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 genericInvalidIRError, with no message naming the relations involved.WL_LOG=EVAL:1gets the engine's diagnostic.Positive
sidecompound 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
.declmay declare afloatcolumn, a fact may carry a float literal, andaverage()over afloatoperand returns a float. PyreWire needed no code change to carry this — afloatcolumn decodes as a Pythonfloatthrough the existing result path. The same release adds arithmetic expressions in a rule head and multi-line.declcontinuations.examples/14_arithmetic_operations.pyasserts wirelog's own golden output for that example:Two behaviors are demonstrated because they are easy to misread: arithmetic parses left-associatively (
A + B * Cis(A + B) * C, soprecedenceis 22 and not 14), and the typed float ingress canonicalizes-0.0and+0.0to the same+0.0, so twozero_inputfacts collapse to one row. The test asserts that row's sign bit rather than its value, since0.0 == -0.0in Python.One limitation, documented in the example and the CHANGELOG: float values reach a program through its source text only.
EasySession.insert()carriesint64lanes and raisesExecErroron a Pythonfloat. wirelog 0.60.0 addswirelog_session_insert_typed()for typed ingress; PyreWire does not wrap it yet. That is why the example usesBatchProgramwith 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:
black,isortandflake8clean. 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 withsystem_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 unmodifiedmainhere and passes in CI.https://claude.ai/code/session_01MqHwvCimcvrg1osEY5MH7o