From 54d84d7c57529dcd8b8f118b288bf61c49fd8aa6 Mon Sep 17 00:00:00 2001 From: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> Date: Tue, 3 Nov 2026 09:28:14 +0800 Subject: [PATCH] test(context): inspect delivered rows for duplicate selections Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --- tests/control_plane/test_context_first_read.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/control_plane/test_context_first_read.py b/tests/control_plane/test_context_first_read.py index 9704539fa9..9ef9616131 100644 --- a/tests/control_plane/test_context_first_read.py +++ b/tests/control_plane/test_context_first_read.py @@ -246,8 +246,8 @@ def test_initial_read_preserves_empty_and_unknown_current_preference_values(tmp_ page, values = read_selection(view["first_read_command"]) pointer = f"/interaction_contract/agent_channel/work_context/sources/{len(sources) - 1}/content/current" assert values[pointer] == current - pointers = {row["pointer"] for row in json.loads(page["content"])["selections"]} - assert not any(key.startswith(pointer + "/") for key in pointers) # No duplicate delivered descendants. + wire_pointers = [row["pointer"] for row in json.loads(page["content"])["selections"]] + assert not any(key.startswith(pointer + "/") for key in wire_pointers) raw = Path(view["recovery"]["path"]).read_bytes() assert json.loads(raw) == before == decision assert capture_page_range(page, raw=raw, digest=page["sha256"]) is None @@ -301,8 +301,8 @@ def test_initial_read_uses_current_navigation_without_hiding_peer_constraints(tm outcomes = before["interaction_contract"]["agent_channel"]["work_context"]["sources"][0]["content"]["goal_acceptance_contract"]["outcome_requirements"]["outcomes"] assert values[prefix + "/0"] == outcomes[0] assert values[prefix + "/1"] == outcomes[1] # Shared work crosses Agent ownership. - pointers = {row["pointer"] for row in json.loads(page["content"])["selections"]} - assert prefix + "/0/id" not in pointers # Do not repeat a delivered parent. + wire_pointers = [row["pointer"] for row in json.loads(page["content"])["selections"]] + assert prefix + "/0/id" not in wire_pointers # Do not repeat a delivered parent. assert values[prefix + "/2/id"] == "independent" assert outcomes[2]["requirements"][0]["description"] not in page["content"] detail = read_context_capture(Namespace(capture_file=view["recovery"]["path"],