[eric] browser: flag a wall at 2 repeats and make stuck-nudges diagnose the real cause first

This commit is contained in:
ciregenz
2026-06-04 13:08:25 -07:00
parent a32f53d092
commit a4b3475d3b
2 changed files with 21 additions and 15 deletions
+2 -1
View File
@@ -47,5 +47,6 @@ def test_non_excluded_tool_still_loops_after_threshold():
# that need it (clicks/types/etc.).
key = ("BrowserClick", '{"selector":"#x"}', "clicked")
# below threshold -> not a loop; at/over threshold within the window -> loop
assert _detect_loop([key], key) is False
assert _detect_loop([], key) is False # 1st occurrence: not yet a wall
assert _detect_loop([key], key) is True # 2nd identical (threshold=2): a wall
assert _detect_loop([key] * 5, key) is True