fix(sae): purge all hardcoded fallback coords — autonomous structural dismiss

- Removed hardcoded (540,150) fallback in _plan_escape_via_llm
- Added _find_structural_dismiss_target: scans raw XML for clickable
  dismiss/cancel/close buttons and extracts coords from bounds attrs
- LLM repeat detection now falls back to structural scan (not magic numbers)
- Temperature increases progressively when LLM is stubborn (0.1 → 0.7)
- Failure history injected as CRITICAL block into LLM system prompt
- Extended pre-commit test discovery to include tests/tdd/
- TDD: 7 new tests including meta-tests proving zero hardcoded coords
- Full suite: 100/100 passed
This commit is contained in:
2026-05-05 15:30:45 +02:00
parent f8fc8ace8e
commit 8d58c3cf89
3 changed files with 367 additions and 40 deletions

View File

@@ -21,10 +21,13 @@ else
# Heuristic: Try to find a matching unit test
test_file="tests/unit/test_${filename}"
core_test_file="tests/core/test_${filename}"
tdd_test_file="tests/tdd/test_${filename}"
if [ -f "$test_file" ]; then
TEST_TARGETS="$TEST_TARGETS $test_file"
elif [ -f "$core_test_file" ]; then
TEST_TARGETS="$TEST_TARGETS $core_test_file"
elif [ -f "$tdd_test_file" ]; then
TEST_TARGETS="$TEST_TARGETS $tdd_test_file"
else
# Try to find matching e2e tests by searching for each word in the module name
module_name="${filename%.py}"