From bec159a580e26a7059439d0a13ebf6c84fb63b90 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 6 May 2026 19:38:42 +0000 Subject: [PATCH] test: align VM ObjectSet collision expectations Agent-Logs-Url: https://github.com/microsoft/regorus/sessions/34a4e1b3-d364-46c4-9998-b00780f5d339 Co-authored-by: anakrish <35780660+anakrish@users.noreply.github.com> --- tests/rvm/vm/suites/object_operations.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/rvm/vm/suites/object_operations.yaml b/tests/rvm/vm/suites/object_operations.yaml index 6cc96df..b7085e6 100644 --- a/tests/rvm/vm/suites/object_operations.yaml +++ b/tests/rvm/vm/suites/object_operations.yaml @@ -6,9 +6,9 @@ # Covers dynamic keys, collisions, non-string keys, and template validation cases: - - note: object_key_collision_overwrite - description: Setting same key twice should overwrite the value - example_rego: "{\"key\": 1, \"key\": 2}" + - note: object_key_collision_conflict + description: Setting same key twice with different values should raise a rule output conflict + example_rego: "p[key] := value if { value := [1, 2][_] }" literals: - {} - "key" @@ -26,9 +26,9 @@ cases: - "Load { dest: 2, literal_idx: 2 }" # value 1 - "ObjectSet { obj: 0, key: 1, value: 2 }" - "Load { dest: 3, literal_idx: 3 }" # value 2 - - "ObjectSet { obj: 0, key: 1, value: 3 }" # Overwrite + - "ObjectSet { obj: 0, key: 1, value: 3 }" # Conflict - "Return { value: 0 }" - want_result: {"key": 2} + want_error: "multiple outputs" - note: object_dynamic_key_generation description: Generate object keys dynamically from loop iteration