core/agent: danger classification overrides YOLO tag in confirm pipeline

This commit is contained in:
2026-07-29 01:37:17 +08:00
parent 904ac3d982
commit 60f9c9b56d
3 changed files with 13 additions and 15 deletions
+2 -1
View File
@@ -446,7 +446,8 @@ async def test_yolo_rebuilds_tool_registry(tmp_path: Path) -> None:
)
try:
assert st.agent.tools is not None
# Soft-confirm hooks stay installed; YOLO only auto-allows YOLO-tagged tools.
# Soft-confirm hooks stay installed; YOLO mode does not bypass
# dangerous invocations — internal danger classification takes precedence.
assert st.agent.tools.soft_confirm is True
assert st.agent.tools.yolo is False
st.set_yolo("on")