[eric] agents: convention fixes on merge surface (public cross-file helpers, pydantic approval memory, resolve_ask @typechecked)

This commit is contained in:
ciregenz
2026-06-24 22:36:17 -07:00
parent e221cb1c49
commit 6561dd6743
8 changed files with 49 additions and 48 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ async def test_can_use_tool_deny_returns_deny():
async def test_can_use_tool_ask_routes_through_approval():
ctx = p_ctx()
with patch.object(gate_hooks.path_gate, "maybe_override_policy", return_value=("ask", None)), \
patch.object(gate_hooks, "p_resolve_ask", new=AsyncMock(return_value=ApprovalDecision(behavior="allow"))):
patch.object(gate_hooks, "resolve_ask", new=AsyncMock(return_value=ApprovalDecision(behavior="allow"))):
result = await gate_hooks.can_use_tool(ctx, "Write", {"file_path": "/x"}, None)
assert isinstance(result, PermissionResultAllow)