From 1daa626a41a2dcb5d3ba76d843b242220e14b05d Mon Sep 17 00:00:00 2001 From: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> Date: Thu, 5 Nov 2026 00:07:03 +0800 Subject: [PATCH 1/2] test(benchmark): separate receiver guard checks from model delivery Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --- .../tests/test_checkpoint_joint_receiver.py | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/benchmark/tests/test_checkpoint_joint_receiver.py b/benchmark/tests/test_checkpoint_joint_receiver.py index 83ee843925..b3307421d7 100644 --- a/benchmark/tests/test_checkpoint_joint_receiver.py +++ b/benchmark/tests/test_checkpoint_joint_receiver.py @@ -125,6 +125,11 @@ def cli(*args): assert code == 0, output return json.loads(output) + def receiver_guard(*args): + # The receiver checks machine fields. run_native_work presents this + # same decision through the configured model transport afterwards. + return cli("quota", "should-run", "--context-delivery", "off", *args) + cli( "bootstrap", "--project", @@ -304,7 +309,7 @@ def lose_binding_reply(self, *args): "--turn-instance-id", turn, ] - guard = cli("quota", "should-run", "--runtime-profile", "generic_cli", *binding) + guard = receiver_guard("--runtime-profile", "generic_cli", *binding) assert guard["interaction_contract"]["agent_channel"]["delivery_allowed"] external_path = os.environ.get("LOOPX_JOINT_RECEIVER_NATIVE") external = json.loads(Path(external_path).read_bytes()) if external_path else None @@ -663,9 +668,7 @@ def run_native_work(current_guard, logs, purpose): hook = CheckpointWake(env, dict(pending_receipt)) assert not hook._first_replan({"capture": True, "obligation_id": "replan-new-destination"}) assert not (wakes.parent / "checkpoints").exists() - reviewed = cli( - "quota", - "should-run", + reviewed = receiver_guard( "--goal-id", goal, "--agent-id", @@ -682,9 +685,7 @@ def run_native_work(current_guard, logs, purpose): assert any( t["kind"] == "periodic_review_due" for t in obligation["triggers"] ), obligation - reviewed = cli( - "quota", - "should-run", + reviewed = receiver_guard( "--goal-id", goal, "--agent-id", @@ -865,9 +866,7 @@ def run_native_work(current_guard, logs, purpose): next_turn, ] - next_guard = cli( - "quota", - "should-run", + next_guard = receiver_guard( *next_binding, "--runtime-profile", "generic_cli", @@ -982,17 +981,13 @@ def run_native_work(current_guard, logs, purpose): "--execute", ) if not external: - final = cli( - "quota", - "should-run", + final = receiver_guard( "--goal-id", goal, "--agent-id", agent, # Readback is a scheduler observation, not another work # Turn whose unperformed closeout could block recapture. - "--context-delivery", - "off", "--runtime-profile", "generic_cli", "--available-capability", From 18e9d5ab97bd5073eb9dec3c88aa4e11010ad9b6 Mon Sep 17 00:00:00 2001 From: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> Date: Thu, 5 Nov 2026 00:17:24 +0800 Subject: [PATCH 2/2] test(checkpoint): read machine decisions during ordinary Goal adoption Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --- tests/control_plane/test_research_context_adoption.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/control_plane/test_research_context_adoption.py b/tests/control_plane/test_research_context_adoption.py index 8fcc072230..db81b382e1 100644 --- a/tests/control_plane/test_research_context_adoption.py +++ b/tests/control_plane/test_research_context_adoption.py @@ -283,14 +283,14 @@ def settle(turn, vision, *, review=False): 'observed_reality': 'The current ordinary Goal reads the inherited rejected candidate.', 'retained': ['Candidate 3 is rejected; keep candidate 7.'], 'evidence_refs': ['checkpoint:' + digest]}} initial = run('quota', 'should-run', *actor, '--todo-id', todo, '--turn-instance-id', 'ordinary-preparation', - '--runtime-profile', 'generic_cli', '--available-capability', 'shell') + '--runtime-profile', 'generic_cli', '--context-delivery', 'off', '--available-capability', 'shell') assert initial['interaction_contract']['agent_channel']['delivery_allowed'] settle('ordinary-preparation', vision) review = run('quota', 'should-run', *actor, '--turn-instance-id', 'ordinary-review', - '--runtime-profile', 'generic_cli', '--available-capability', 'shell') + '--runtime-profile', 'generic_cli', '--context-delivery', 'off', '--available-capability', 'shell') assert review['interaction_contract']['mode'] == 'autonomous_replan' review = run('quota', 'should-run', *actor, '--todo-id', todo, '--turn-instance-id', 'ordinary-review', - '--runtime-profile', 'generic_cli', '--available-capability', 'shell') + '--runtime-profile', 'generic_cli', '--context-delivery', 'off', '--available-capability', 'shell') control = review['replan_action_packet']['stride_control'] assert any(row['finding_id'] == 'negative-3' for row in control['explore_basis']['finding_refs']) decision = json.loads(json.dumps(control['minimal_example'])) @@ -321,7 +321,7 @@ def settle(turn, vision, *, review=False): assert actual_decision['explore_review']['considered_refs'] == ['negative-3'] # The accepted decision is read from canonical history, not the submitted JSON. following = run('quota', 'should-run', *actor, '--todo-id', todo, '--turn-instance-id', 'ordinary-experiment', - '--runtime-profile', 'generic_cli', '--available-capability', 'shell') + '--runtime-profile', 'generic_cli', '--context-delivery', 'off', '--available-capability', 'shell') assert following['interaction_contract']['agent_channel']['delivery_allowed'] # Source history and operational observations are never used as current work. result_path = workspace / 'complete-experiment.json'