Skip to content

rename cmp_* rules so they do not shadow builtins - #3

Merged
lynch1981 merged 3 commits into
mainfrom
dev
Aug 22, 2026
Merged

lynch1981 merged 3 commits into
mainfrom
dev

Conversation

@lynch1981

Copy link
Copy Markdown
Owner

No description provided.

OPA comparison operators desugar to builtins named gt/gte/lt/lte
(and equal/neq). Fixtures that used those identifiers as rule names
failed opa build with a type error. Use package foo / allow like the
other policy suites; file names still identify the operator.
Match the renamed t/cmp_*.t shape (package foo / allow) in the README
test-case example, and note in AGENTS.md that comparison builtin names
must not be used as rule names.
Rego orders same-type strings, so "b" > "a" is true. The fixtures
treated order compares as numbers-only. Align --- out and ref_lua
with OPA and drop the leftover ONLY on cmp_gt TEST 5.
@lynch1981
lynch1981 merged commit 0df34d0 into main Aug 22, 2026
1 check passed
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