Repository navigation
Conversation
…m $params is read before any item Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
… comes after it Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…he root read before any item Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…nt of the item's key Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…tem's key has its base read before any item Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…nt of the item's key Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
… spec/OPEN.md Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…he root before any item of the walked list Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
… of the item's key Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…d line alias is not read before any item Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…line alias Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…m's key, and a bound alias in front of it (guards) Guards that pass as they are: `m` null and 3, `k` missing, null, 3 and empty in both engines, and a bound line alias in the chain in the Rust engine. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…puts entry in spec/OPEN.md The entry for a root read through a key from $params and then the item's key no longer says the row's inputs are settled: no rule decides them, and two cases expect different inputs. The entry on a one-line every with if any names the chain forms, and the entry on roots said again for each item drops the count form, which ergo.rego now says once. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
… key, in either order With xs holding an item and no m in the params the check fails as absent naming item 1 of xs, and with xs empty and if any it passes, since the root is read with each item and not at all when there is none. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…st rows in spec/OPEN.md Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…d when the whose of the later line leaves no item Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…se of the later line leaves no item Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…ck on an empty later list Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…ct on an empty later list An item of a count of that the that can't decide was dropped as said by the earlier item, because that item isn't an object, even when the sentence reads the alias only whole, as a key. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…n empty later list Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…s when a later whose fails one condition and leaves another undecided Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…st, which ergo.rego fails and Rust passes Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…a that keyed by an earlier alias Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
This was referenced Dec 5, 2026
This branch has not been deployed
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.
Stacked on #957, merge in order. The diff against
mainholds #957's commits until it merges.ergo.regonow says an earlier line's alias read as anamed bykey under a secondforline with, if any,whosewhoseleaves no item, as for.pass and for.if_any say._for_second_has_itemsinengines/rego/src/lines/for_lines.regocounts only the items the later line'swhosekeeps (or can't decide), so awhosethat leaves nothing is treated like an empty list.Changes the report:
for: every ys as y, every xs whose v is 1, if any, as xwithcount of zw.k that is in $params.m named by y named by x is at most 5,ys[3],xs[{"v": 2}]used to pass inergo.regoand now fails asunusablewithitem 1 of ys: y is 3, which isn't text, as the Rust engine already did. Other changes the review probed: without, if any,,every ys as y, every xs whose v is 1 as xwithys[3]andxs[{"v": 2}]wasvaluewithitem 1 of ys is 3and is nowunusablewithitem 1 of ys: y is 3, which isn't text; item 1 of ys is 3, and a single keynamed by ywithynull addsitem 1 of ys: y is nullto the message.forcases "an earlier line's alias read as a named by key that isn't text, under a second for line with if any whose whose leaves no item, …" fromknown_differences, and their entry fromspec/OPEN.md.The Rust engine now fails a
count ofwhosethatreads an earlier line's alias as thenamed bykey when an item can't be decided, even when the later list is empty and the earlier item isn't an object, as for.roots says.item_rootsinengines/rust/engine/src/ops/for_line.rsdropped everynot_an_objectroot when the earlier item isn't an object, and now drops only those of a sentence orwhosethat reads into the alias, likey.k.Changes the report:
for: every ys as y, every xs, if any, as xwithcount of zw.k that is in $params.m named by y is at most x.n,ys["a"],xs[],zw[{"k": 1}, 5]and the params{"m": {"a": [1]}}used to pass in the Rust engine and now fails asnot_an_objectwithitem 1 of ys: item 2 of zw is 5, which isn't an object, asergo.regoalready did. Withys[3]andxs[],named by yandnamed by y.kwereunusablewith onlyy is 3, which isn't textand are nownot_an_objectwith, and item 2 of zw is 5, which isn't an objectadded. Without, if any,,every ys as y, every xs as xwithxs[]wasvaluewithxs is []and is nownot_an_objectwithxs is []; item 1 of ys: item 2 of zw is 5, which isn't an object.spec/OPEN.md. Itssentencescase still fails in both engines, only on wording: it also expectsitem 1 of ys: the check is false, which no rule gives. So it stays inengines/rust/known-failures.txtand inknown_differences, under the type 3 entry inspec/OPEN.md.Added after review: a guard test,
test_a_count_whose_key_from_the_first_lines_alias_is_left_to_the_items_when_the_whose_of_the_second_list_fails_one_condition_and_leaves_another_undecided, which covers the line_for_second_whose_keeps(wh) if wh.undecided != []and passes on the existing behaviour. A type 1 found by the review, on the base of #957 too, has a hand-writtensentencescase and aknown_differencesrow forergo.regoand an entry inspec/OPEN.md:for: every ys as y, every xs, if any, as xwithcount of zw.k that is in $params.m named by y named by x is at most 5,ys["a"],xs[],zw[{"k": 1}, 5]and the params{"m": {"a": {"a": [1]}}}fails inergo.regoasnot_an_objectwithitem 2 of zw is 5, which isn't an object, and passes in the Rust engine, which is right (for.roots, for.if_any). The case'sinputsare copied from the Rust engine, because no rule decides them. Three more differences found by the review are listed inspec/OPEN.md(type 2, type 3, type 2). No engine code changed.cuts: Rust 27 to 27, Rego 82 to 82
Wasm budgets (
ERGO_WASM_BUDGETS_ONLY=1): 28.9 of 29 MB, 19.4 of 20 MB, 42.0 of 45 MB,for114.4 of 118 MB (as onmain), 52.3 of 53 MB.Sweep (
python3 spec/sweep.py --limit 500, 477 cells), on this branch and onmain: 296 cells differ between the engines on both, type 1: 0, type 2: 15, type 3: 281, and the lists of cells are the same on both, so the sweep shows no change..github/pr-facts.sh:Run: the full
opa test engines/rego dist/ergo.rego spec:spec examples:examples --ignore src --timeout 900s --coverage(no line listed as not covered by.github/build-ergo.sh where; I did not keep its exit code),opa eval --strict-builtin-errors ... 'count(data) > 0'(true), the threeopa check --strictforms,opa fmt --list,regal lintbugs (no violations),python3 spec/check_rules.py,.github/rego-layers.py,.github/no-inline-tests.sh, the comment listing (none),.github/message-cuts.sh --against origin/main, the oracle validate (0 differ),cargo test --workspace(2795 pass, 0 fail),cargo clippy --all-targets -D warnings,cargo fmt --check. Not run: the Docker checks, the Wasmopa test --target wasmruns, the other.github/*_test.shscripts,spec/check_grammar.py,spec/sweep_test.py, the packages checks.🤖 Generated with Claude Code
https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn