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
…t's key before the item's key Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
… a root with no key for it fails on an empty list Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…t's key before the item's key Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…ot with no key for the subject's key fails on an empty list
The test that pinned no fault for $params.m named by $params.k when m is
{} now says it is missing, as tally.walk and for.roots say.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…ject's key before any item, and drop its open entry Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
… that isn't an object fails as unusable Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…ct, so the root fails as unusable on an empty list Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…ct fails the root as unusable on an empty list Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…list the Rust engine's new causes as open Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…an object, and the null one, before the item's key on an empty list Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
… it among the known backward calls Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…e item's key before any item Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…e item's key before any item Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…e every or some Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…e every or some Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
… any item, and drop the two cases Rust passes from its known failures Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
… in OPEN.md what still differs after the one-line every fix Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…wn differences Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…h the item's key to each item Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…em in a one-line every or some, so it is said once Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…e a field as a step that isn't an object Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
… a field, even on an empty list Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…y comparison to each item Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…item's key before any item Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…s whose to each item Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…item's key before any item Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…one-line every, and pin the list-prefix root Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
…he item's key before any item Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn
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 #960 (which is stacked on #959 and #957). Merge in order. Until they merge, the diff against main includes their commits.
Fixes the type 1 entry in
spec/OPEN.md(one-lineeverywith, if any,whosewhosereads a root through the item's own key). Both engines now read that root once, before any item, as tally.walk and for.roots say:_keyed_whose_condsinengines/rego/src/lines/roots.regoadds the walk's ownwhoseto the conditions_for_keyed_roots_saidreads, so_walk_root_flawsees the root.whose_rootsinengines/rust/engine/src/ops/walk.rsadds thekey_base::base_ofroots of thewhosepaths, read with the item's keys.Changes the report: a one-line
everyorsome … whosethat reads a root through the item's own key on the left side of the comparison ($input.m named by key,$params.m named by key,$input.m.d named by key, and chains through$params.korpr.key) now reads the root once, before any item. A root on the value side (v is in $params.m named by key,tags contains …,v is $params.m named by key, any comparison) is read with each item, as on #960's head, in both engines., if any,andtests[], it fails asabsent,nullorunusable($input.m is missing,is null,is 3, which isn't an object, and the same for a list and text) when the root is missing,nullor not an object. Before, it passed. Probed with the chainnamed by $params.k named by keyandpr.keytoo., if any,(every … exists,some … exists) overtests[],ergo.regofailed asvaluewithtests is []and now says the root's cause, like the Rust engine already did. The verdict is the same.ergo.regosaid the root in each item (item 1 of tests: $input.m is null) and now says it once ($input.m is null). Same verdict and cause. The Rust engine did not change., if any,. Verdicts of non-empty lists did not change in either engine.$inputand$params, missing,null, 3, object, list and text, empty and one item) against read a keyed root through the subject's key before any item, so a root with no key for it fails on an empty list #960's head: no verdict differs between the engines.Fixed after review (8329928): the root that a
containsreads through the item's key (whose tags contains $input.m named by key) is left to each item, as in the Rust engine and thederivedcases, soergo.regono longer says it twice; the sevenderivedrows passed again then. And a list before a field in such a root ($input.m.d named by keywithm[], also$params) now fails asunusablewith$input.m is [], which isn't an objectinergo.regotoo, on an empty list and with items, like the Rust engine; its type 1 entry is out ofspec/OPEN.md. Asentencescase now pins it ($params.m.d named by key,m[]), and both engines pass it.Narrowed after the second review (362da8a): the branch also read the root on the value side of every comparison but
containsbefore any item (Rego) and of every comparison but the list ones (Rust), soevery tests whose v is in $params.m named by key, if any, existswith nomandtests[]failed inergo.regoand passed in the Rust engine, a type 1. Now_keyed_walk_conddrops the right side of any comparison and Rust'swhose_rootsreads onlyleft_path(), so only the left side's root is read before any item. Probed on #960's head and this branch, both engines, 40 value-side shapes (is,is not,is at least,is at most,is more than,is one of,is not one of,is in,starts with,is alphabetically before,contains,does not contain,contains all of,contains none of;everywith, if any,andsome;mmissing and 3;tests[]): no verdict differs from #960's head or between the engines. Only the three left-side$params.m.dshapes changed, in both engines.Found, not fixed (both engines pass, the rules say fail; type 1 entries in
spec/OPEN.md, with cases that are known failures in both lists): a root on the value side of a one-lineevery … whoseover an empty list (two groups,is inandcontains,mmissing and 3), and a root from the subject (pr.m named by key, missing,null, 3). Thederivedcase "… says the root and then the list's own problem / the root is null and the list is empty" pinsevery xs whose tags contains $input.m named by key, if any, existsas passing, the wrong verdict; it is unchanged and named in the entry. Also inspec/OPEN.md: a type 2 (theoutcomeof a root that isn't an object in asomewithout, if any,) and a type 3 (ergo.regodropstests is []there).Cuts: Rust 27 to 27, Rego 82 to 82 (
.github/message-cuts.sh --against origin/mainpasses).Lists: the two
$params.mnull and not-an-object rows and the$params.mmissing-key row are out ofengines/rust/known-failures.txt. The five rows added in 4b32a0d (value-side$params.mmissing and 3, subjectpr.mmissing, null and 3) are in bothknown_differencesandknown-failures.txt, and name real cases. Three rows stay in both lists:sentences"a root read through the item's own key, in a one-line every with if any, is read once, before any item, …" (missing, null, 3). They fail only on the order ofinputs: both engines put$input.mbeforetests[], the case putstests[]first, and walk.inputs doesn't decide the order.spec/OPEN.mdhas it as a type 2 entry, and the type 1 entry of this PR is gone.Checks on 362da8a, after
.github/build-ergo.sh:opa check --strictforms,opa fmt --list,regal lint(no violations),python3 spec/check_rules.py,.github/rego-layers.py,.github/no-inline-tests.sh, no comments in.regofiles,.github/message-cuts.sh --against origin/main,test_every_known_difference_names_a_case.cargo test -j 2 --workspace --no-fail-fast: all pass (2799 tests, including--test cases).cargo clippy --workspace --all-targets -- -D warningsandcargo fmt --checkpass. The sentence oracle: 3533 checks, 0 differ fromergo.rego.ERGO_WASM_BUDGETS_ONLY=1): 28.9 of 29 MB, 19.4 of 20, 42.0 of 45,for114.4 of 118 (114.4 on main), 52.3 of 53.python3 spec/sweep.py --limit 500on this branch and on origin/main: the same 477 cells, 296 differing cells on each side, the output identical apart from the Rust commit line, 0 type 1, 15 type 2.opa test engines/rego dist spec:spec examples:examples --ignore src --timeout 900s --coverage(about 35 minutes): exit 1, one failure,data.spec_test.test_the_derived_cases_pass_part_6_of_6. It passes on 8329928, so 362da8a broke it inergo.regoonly (the Rust--test casespasses). The case is thederivedgroup "a count over a list reached through a list, whose whose compares the item's value with a root read through a key the item holds, puts in each item entry the field the whose read inside the item", checkxsv(count of ys.v whose v is not $input.m named by key is 0), rows "the root is null / is missing / isn't an object and the items have the key but their own value is missing or null". The item entries'inputsareys[0].v(usable,{"key": "a"}) where the case wantsys[0].v.v(absent, or null for item 2). Messages, causes and verdicts are the same. Cause:_keyed_walk_condnow drops the right side of every comparison, where it dropped it only forincludes. As the run failed, there is no coverage JSON and no not-covered list..github/pr-facts.sh:Not run: coverage lines (see above), the Wasm run of the whole suite and
wasm-tests.sh, thepackages/checks,spec/check_grammar.py, the Docker checks,docs-run.sh.🤖 Generated with Claude Code
https://claude.ai/code/session_01MzW4N4nUhpU9sV5yVyXkyn