Repository navigation
REQ 122
The live-assistance broker shall admit a model-proposed MCP call only when the exact canonical tool and argument pair equals the next entry in the sealed deterministic run grant.
Epic #250 permits automated per-run tool admission through deterministic policy, not model-written authority. REQ-121 binds a run to one newly created VM; this requirement prevents model output or tool responses from changing that precompiled authority after the run begins.
Before each MCP call, the broker validates the tool name, effect, closed-schema arguments, order, run ID, grant/policy/contract digests, current host identity, expiry, and exact bound VM UUID. It rechecks host identity and expiry when an in-flight call completes; a late result is refused and cannot advance the plan. On abort/cancellation it retains unresolved in-flight state and blocks teardown until settlement or independent reconciliation. Teardown is also denied if the current host identity differs from the grant; the exact UUID is reported unresolved instead of issuing cleanup against another host. Unknown, changed, repeated, skipped, replayed, expired, wrong-UUID, or out-of-order calls are denied before client invocation or their result is accepted. The broker owns a canonical grant snapshot, so caller mutation of grant dictionaries/lists cannot widen its call sequence. Model output and MCP results cannot create, amend, extend, or replay grants. Any pinned tool may run only when its exact call appears in the deterministic grant. plan-only results and returned command text remain inert and are never executed. Coordination-write or mutating calls use only exact arguments compiled from trusted policy, never free-form model authority. The model cannot revoke or skip reserved exact-UUID teardown; no failed workload retries on that VM. Broker failures expose only a bounded safe category and preserve the original run outcome.
TEST-123 executed fake broker/model/MCP cases through PR #252, implementation 65a931f712bc478c00a9ca0100d38ef918fde642, merge fd998aab3551f3ed5665bf809ebc3f08f79209de. The cases verify exact sequence/effect/argument checks, no call on mismatches, no plan expansion, in-flight expiry/host-change rejection, immutable broker snapshots, abort-before-teardown, and inert plan-only command results. Full local suites passed 2,193 Python and 108 .NET tests; all seven applicable PR checks passed. The tests are offline and do not establish model quality or live behavior.
SYS-REQ-030; REQ-121; epic #250; P0 #251
High
scripts/tests/test_assisted_benchmark_live_policy.py executed test_broker_enforces_exact_call_order_and_teardown_once, test_broker_rejects_mcp_completion_after_grant_expiry, test_abort_with_inflight_call_blocks_teardown_until_call_settles, test_broker_detects_host_identity_change_during_inflight_call, test_broker_denies_changed_arguments_and_wrong_vm_then_only_tears_down_bound_vm, test_plan_only_tool_result_is_marked_inert_and_failure_does_not_retry, and test_sealed_run_grant_cannot_be_replayed_in_a_second_broker.
Implemented offline broker in scripts/assisted_benchmark_live_policy.py: LiveRunBroker.begin_call, complete_call, abort, and teardown_target; it reuses scripts/assisted_benchmark_contract.py (tool_registry, authorize_tool_call). The #250 in-capture coordinator remains unimplemented and unqualified.
Implemented in develop through PR #252; exact-call broker behavior is offline-tested. No live capture coordinator or model-utility qualification is claimed.