From 565bdaa56812fed33dd6e4576f36c56b9e3f8131 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Sun, 3 May 2026 23:29:14 +0200 Subject: [PATCH] chore: purge garbage scripts from repo and harden .gitignore --- .gitignore | 8 +++++++- rewrite_tests.py | 19 ------------------- test_llm_false_positive.py | 33 --------------------------------- 3 files changed, 7 insertions(+), 53 deletions(-) delete mode 100644 rewrite_tests.py delete mode 100644 test_llm_false_positive.py diff --git a/.gitignore b/.gitignore index 26284dc..8f15dce 100644 --- a/.gitignore +++ b/.gitignore @@ -31,8 +31,14 @@ Pipfile.lock *.ini *.db -# Debug artifacts +# Debug artifacts & garbage scripts (Rule 5: KRIEG DEM MÜLL) scratch*.py +rewrite_*.py +test_*.py +!tests/** +update_*.py +profile_dump.* +resp_dump.* test_compress.py test_fixtures.py output.txt diff --git a/rewrite_tests.py b/rewrite_tests.py deleted file mode 100644 index 76fea29..0000000 --- a/rewrite_tests.py +++ /dev/null @@ -1,19 +0,0 @@ -import os -import glob -import re - -for file in glob.glob("tests/e2e/test_workflow_*.py"): - with open(file, "r") as f: - content = f.read() - - # Remove FakeSAENormal class definition - content = re.sub(r'class FakeSAENormal:\n(?: {4}.*\n)+', '', content) - - # Remove monkeypatch.setattr for SituationalAwarenessEngine - content = re.sub(r' +monkeypatch\.setattr\(\n +["\']GramAddict\.core\.behaviors\.obstacle_guard\.SituationalAwarenessEngine["\'],\n +FakeSAENormal,?\n +\)\n', '', content) - # Also inline ones - content = re.sub(r' +monkeypatch\.setattr\("GramAddict\.core\.behaviors\.obstacle_guard\.SituationalAwarenessEngine", FakeSAENormal\)\n', '', content) - - with open(file, "w") as f: - f.write(content) -print("Removed FakeSAENormal from all tests") diff --git a/test_llm_false_positive.py b/test_llm_false_positive.py deleted file mode 100644 index 89db523..0000000 --- a/test_llm_false_positive.py +++ /dev/null @@ -1,33 +0,0 @@ -from GramAddict.core.llm_provider import query_telepathic_llm - -xml = """ - - - - -""" - -system_prompt = ( - "You are an Android UI navigation agent. Your job is to escape obstacles " - "(dialogs, modals, foreign apps, system popups) and return to Instagram. " - "Analyze the screen content (Screenshot AND XML) and return a JSON escape action.\n\n" - "Rules:\n" - "- If you see a dismiss/close/cancel/skip/not now button, click it\n" - "- If the Situation type is OBSTACLE_LOCKED_SCREEN, action must be 'unlock'\n" - "- If the Situation type is OBSTACLE_FOREIGN_APP, action must be 'back'\n" - "- If there is NO obstacle and the screen is a normal Instagram view (false positive), action must be 'false_positive'\n" - "- 'reason' must explain why.\n" - 'Output ONLY valid JSON matching: {"action": "click"|"back"|"unlock"|"false_positive", "x": int, "y": int, "reason": str}' -) -user_prompt = f"Situation: OBSTACLE_MODAL\n\nXML Hierarchy:\n{xml}\n\nWhat action should I take to clear this obstacle and return to Instagram? Return JSON only." - -print( - query_telepathic_llm( - url="http://localhost:11434/api/generate", - model="llava:latest", - user_prompt=user_prompt, - system_prompt=system_prompt, - images_b64=None, - temperature=0.0, - ) -)