refactor(goal): sustain one ReAct run until the goal closes (#6538)
* refactor(goal): sustain one ReAct run until the goal closes Keep active goals in the same runner beyond the ordinary iteration limit, with a final answer after successful closure. Remove cross-turn goal handoffs, continuation allowances and rollback bookkeeping while preserving input authorization, recovery, cancellation and terminal lifecycle ownership. Contributes to NAN-392 Co-authored-by: chengyongru <chengyongru.ai@gmail.com> * test(goal): consolidate sustained-run regression coverage Retain lifecycle, history, usage, provider-state privacy and checkpoint cancellation assertions in the existing long-run scenarios. Remove duplicate smoke cases and parameter combinations that do not exercise distinct behavior; keep real Gateway, authorization and generation regressions.
This commit is contained in:
1 parent
3545539128
commit
62c2ed4e7e
68 files changed
+2683
-1421
No files matched your search
@@ -28,10 +28,10 @@ def goal_message(**overrides):
|
||||
{"metadata": {"goal_requested": True, "_cron_trigger": {"job_id": "job"}}},
|
||||
{"metadata": {"goal_requested": True, "_local_trigger": {"trigger_id": "trigger"}}},
|
||||
])
|
||||
def test_background_input_cannot_authorize_initial_or_injected_work(overrides):
|
||||
def test_consumed_background_input_cannot_authorize_work(overrides):
|
||||
message = goal_message(**overrides)
|
||||
with goal_mutation_permission(True):
|
||||
with GoalInputScope(message) as scope:
|
||||
with GoalInputScope() as scope:
|
||||
assert goal_mutation_allowed() is False
|
||||
scope.consume_inputs([message])
|
||||
assert goal_mutation_allowed() is False
|
||||
@@ -39,7 +39,9 @@ def test_background_input_cannot_authorize_initial_or_injected_work(overrides):
|
||||
|
||||
|
||||
def test_revoked_permission_requires_a_new_explicit_request_to_reauthorize():
|
||||
with GoalInputScope(goal_message()) as scope:
|
||||
with GoalInputScope() as scope:
|
||||
assert goal_mutation_allowed() is False
|
||||
scope.consume_inputs([goal_message()])
|
||||
assert goal_mutation_allowed() is True
|
||||
revoke_goal_mutation_permission()
|
||||
scope.consume_inputs([goal_message(content="ok", metadata={})])
|
||||
|
||||
Reference in new issue
Block a user