Skip to content

Commit 10c41b5

Browse files
Trecekclaude
andcommitted
fix(review): add 'none' strength for guards that produce no stdout output
A guard returning an empty dict (no stdout) was classified as 'soft', causing test_works_as_is_hooks_have_soft_or_better to pass even for a completely non-functional guard. Introduce 'none' strength when result is empty so the meta-test correctly detects inactive guards. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a555ea5 commit 10c41b5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/execution/backends/test_hook_deny_efficacy_probe.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,9 @@ def test_probe(
285285
hook_output = result.get("hookSpecificOutput", {})
286286
decision = hook_output.get("permissionDecision")
287287

288-
if decision == "deny":
288+
if not result:
289+
strength = "none"
290+
elif decision == "deny":
289291
strength = "hard"
290292
else:
291293
strength = "soft"

0 commit comments

Comments
 (0)