守住 Agent Actions 動態白名單邊界
This commit is contained in:
@@ -1,3 +1,27 @@
|
||||
def test_agent_action_registries_keep_l2_and_l3_boundaries():
|
||||
import services.agent_actions as actions
|
||||
|
||||
assert set(actions.SAFE_ACTIONS) == {
|
||||
"retry_task",
|
||||
"query_km",
|
||||
"silence_alert",
|
||||
"flag_for_human_review",
|
||||
"route_to_km",
|
||||
"mark_for_relearn",
|
||||
}
|
||||
assert set(actions.OPS_ACTIONS) == {
|
||||
"pause_task",
|
||||
"resume_task",
|
||||
"force_retry_now",
|
||||
}
|
||||
assert set(actions.SAFE_ACTIONS).isdisjoint(actions.OPS_ACTIONS)
|
||||
|
||||
for action_name, func in actions.SAFE_ACTIONS.items():
|
||||
assert getattr(actions, action_name) is func
|
||||
for action_name, func in actions.OPS_ACTIONS.items():
|
||||
assert getattr(actions, action_name) is func
|
||||
|
||||
|
||||
def test_flag_for_human_review_writes_pending_memory(monkeypatch):
|
||||
import services.agent_actions as actions
|
||||
import services.openclaw_learning_service as learning
|
||||
|
||||
Reference in New Issue
Block a user