feat(engine): finalize after tool iteration limit
This commit is contained in:
@ -608,6 +608,12 @@ def test_agent_loop_records_max_tool_iterations_as_failed_skill_effect(tmp_path:
|
||||
provider_name="stub",
|
||||
model="stub-model",
|
||||
),
|
||||
LLMResponse(
|
||||
content="Based on the available tool result, the container likely failed during startup.",
|
||||
finish_reason="stop",
|
||||
provider_name="stub",
|
||||
model="stub-model",
|
||||
),
|
||||
]
|
||||
),
|
||||
)
|
||||
@ -621,7 +627,9 @@ def test_agent_loop_records_max_tool_iterations_as_failed_skill_effect(tmp_path:
|
||||
)
|
||||
loaded = loop.boot()
|
||||
|
||||
assert result.finish_reason == "max_tool_iterations"
|
||||
assert result.finish_reason == "max_tool_iterations_finalized"
|
||||
assert "Based on the available tool result" in result.output_text
|
||||
assert "Tool loop stopped" not in result.output_text
|
||||
effect_records = loaded.run_memory_store.list_skill_effects("docker-debug", version="v0007")
|
||||
assert effect_records[-1].run_id == result.run_id
|
||||
assert effect_records[-1].success is False
|
||||
|
||||
Reference in New Issue
Block a user