From 3f13fd19c6efdefc9ff95745d90b3f89994f6123 Mon Sep 17 00:00:00 2001 From: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> Date: Wed, 28 Oct 2026 02:25:27 +0800 Subject: [PATCH] fix(benchmark): carry resolved mode to native context subprocesses Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --- benchmark/runtime/worker.py | 4 ++++ benchmark/tests/test_native_checkpoint_handoff.py | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/benchmark/runtime/worker.py b/benchmark/runtime/worker.py index 67d467e5d8..9d99ec4ebf 100644 --- a/benchmark/runtime/worker.py +++ b/benchmark/runtime/worker.py @@ -449,6 +449,10 @@ def run_once(env: dict[str, str]) -> dict: # Preserve this trial's resolved off/on choice in both preflight and solver # subprocesses; an omitted off must not inherit a machine-wide opt-in. env["LOOPX_CONTEXT_DELIVERY"] = execution.context_delivery + if execution.context_delivery == "on": + # The CLI validates this declaration before enabling native transport. + # Carry the resolved default as well as an explicitly supplied mode. + env["LOOPX_EXECUTION_MODE"] = execution.mode # Internal transport arguments are derived afresh, never ambient authority. env.pop("LOOPX_CODEX_CONTEXT_DIR", None) env.pop("LOOPX_CODEX_CONTEXT_TRUST_ARGS", None) diff --git a/benchmark/tests/test_native_checkpoint_handoff.py b/benchmark/tests/test_native_checkpoint_handoff.py index 17411246b0..73928f1d3f 100644 --- a/benchmark/tests/test_native_checkpoint_handoff.py +++ b/benchmark/tests/test_native_checkpoint_handoff.py @@ -128,11 +128,12 @@ def test_real_quota_output_is_held_across_native_fork(tmp_path): from benchmark.runtime.checkpoint import held_quota_decision from tests.control_plane.test_quota_settlement_cli import ( AGENT_ID, GOAL_ID, TURN_ID, _write_fixture, _configure_autonomous_replan_fixture, - _heartbeat_receipt_count, + _heartbeat_receipt_count, _initialize_fixture_authority, ) project, runtime, registry = _write_fixture(tmp_path / "authority") _configure_autonomous_replan_fixture(project, runtime, registry) + _initialize_fixture_authority(project, runtime) capture_root = project / "captures" capture_root.mkdir(mode=0o700) requests = [] @@ -220,11 +221,12 @@ def test_native_cli_interruption_retains_guard_beyond_tool_yield(tmp_path, outco from benchmark.runtime.checkpoint import held_quota_decision from tests.control_plane.test_quota_settlement_cli import ( AGENT_ID, GOAL_ID, TURN_ID, _write_fixture, _configure_autonomous_replan_fixture, - _heartbeat_receipt_count, + _heartbeat_receipt_count, _initialize_fixture_authority, ) project, runtime, registry = _write_fixture(tmp_path / "authority") _configure_autonomous_replan_fixture(project, runtime, registry) + _initialize_fixture_authority(project, runtime) capture_root = project / "captures" capture_root.mkdir(mode=0o700) requests = []