Fix import-driven cross-package lookup behavior in interpreter and RVM

This commit is contained in:
copilot-swe-agent[bot]
2026-06-09 19:15:12 +00:00
committed by GitHub
parent e865f13102
commit bc2fcc1cee
4 changed files with 161 additions and 34 deletions
+34
View File
@@ -95,3 +95,37 @@ cases:
}
query: data.rules.present
want_result: true
- note: import_cross_package_no_false_cycle
modules:
- |
package registry
import data.registry.packages.package_a
import rego.v1
allow_stage1 if package_a.allow_stage1
- |
package registry.packages.package_a
import data.registry
import rego.v1
allow_stage2 if registry.allow_stage1
allow_stage1 := true
query: data.registry.packages.package_a.allow_stage2
want_result: true
- note: dynamic_data_index_evaluates_matching_rules
modules:
- |
package registry
import rego.v1
allow_stage1 if {
name := "package_a"
data.registry.packages[name].allow_stage2
}
- |
package registry.packages.package_a
import rego.v1
allow_stage2 := true
query: data.registry.allow_stage1
want_result: true