Repository navigation
fix(rvm): isolate nested query assertion mode - #929
Merged
Anand Krishnamoorthi (anakrish) merged 1 commit intoNov 9, 2026
Merged
Anand Krishnamoorthi (anakrish) merged 1 commit into
Anand Krishnamoorthi (anakrish) merged 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The tests use only outer == comparisons, leaving assertion-mode restoration regressions undetected in negated =, undefined-operand, and destructuring-filter paths.
1 open issue
What changed in this PR
This PR fixes RVM compilation so outer negation does not disable positive filters inside nested comprehensions and every queries, keeping policy results aligned with the interpreter.
Changes:
- Isolates nested-query assertion mode and restores the caller’s mode after compilation.
- Adds regression coverage for the interpreter and both RVM execution modes, including inner negation.
- Documents nested-query assertion behavior.
| File | Description |
|---|---|
tests/rvm/rego/comprehension_failure_differential.rs |
Adds cross-engine regression cases and suspendable completion checks. |
src/languages/rego/compiler/queries.rs |
Scopes assertion mode to query compilation and restores caller state. |
docs/rvm/architecture.md |
Explains nested assertion mode and negation behavior. |
Review effort: Max
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The := destructuring tests can mask a soft-mode regression that skips literal/reference checks, leaving both equality paths without matching and mismatching = regression coverage.
1 open issue
1 resolved since last review
Review effort: Max
Enforce nested query filters without leaking assertion mode or skipped root loads into the caller. Cover nested negation, destructuring equality, and skipped query paths across both execution modes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 84271ec2-b466-4cfe-bf58-848f4dceb842
Anand Krishnamoorthi (anakrish)
force-pushed
the
rvm-priority-one-query-scope
branch
from
November 9, 2026 16:57
6aee8e9 to
ce5c3a1
Compare
Anand Krishnamoorthi (anakrish)
marked this pull request as ready for review
November 9, 2026 17:02
David Pokluda (dpokluda)
approved these changes
Nov 9, 2026
Anand Krishnamoorthi (anakrish)
merged commit Nov 9, 2026
2bc7574
into
microsoft:main
59 checks passed
Anand Krishnamoorthi (anakrish)
deleted the
rvm-priority-one-query-scope
branch
November 9, 2026 18:57
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.


Prevent outer negation from disabling positive filters inside nested comprehensions and every queries. Restore the caller assertion mode after compilation and preserve inner negation.
Adds interpreter/native/suspendable regression coverage. Debug CI, formatting, clippy, feature checks, and no_std checks pass.