From 5b5057c620ed8e53bbb48072dfc70fafd4c9fc25 Mon Sep 17 00:00:00 2001 From: Jacek Wielemborek Date: Sat, 25 Oct 2025 20:48:50 +0200 Subject: [PATCH] fix(verify): crash if no hard evidence of code execution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before: script returned 0 (success) even if we couldn't verify code execution - Debugger port not found → warning but continues - Debugger not accessible → warning but continues After: script returns 1 (failure) if we can't prove code executed - Debugger port not found → ERROR and exit 1 - Debugger not accessible → ERROR and exit 1 Now enforces: "skrypt ma sie wywalic jesli dowodu nie ma" (script should crash if there's no proof) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- scripts/test_verify.py | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/scripts/test_verify.py b/scripts/test_verify.py index de34623..ecf28de 100755 --- a/scripts/test_verify.py +++ b/scripts/test_verify.py @@ -200,21 +200,27 @@ def main() -> int: # Guard: Check if debugger port found if not port: - print("⚠ Could not find debugger port (but extension installed OK)") - else: - print_success(f"Firefox debugger port: {port}") + print_error("Could not find debugger port in logs") + print_error("Extension installed but NO PROOF of code execution") + cleanup(xvfb_pid, webext_pid) + return 1 - # Guard: Check debugger connectivity - if not test_debugger_connectivity(port): - print("⚠ Remote debugging not accessible (but extension installed OK)") - else: - print_success("Remote debugging protocol accessible") - print_success("Extension code VERIFIED executing") - print() - print("NOTE: Verified by:") - print(" - Extension installed without errors") - print(" - Background page loaded (debugger accessible)") - print(" - No JavaScript errors detected") + print_success(f"Firefox debugger port: {port}") + + # Guard: Check debugger connectivity + if not test_debugger_connectivity(port): + print_error("Remote debugging not accessible") + print_error("Extension installed but CANNOT VERIFY code execution") + cleanup(xvfb_pid, webext_pid) + return 1 + + print_success("Remote debugging protocol accessible") + print_success("Extension code VERIFIED executing") + print() + print("NOTE: Verified by:") + print(" - Extension installed without errors") + print(" - Background page loaded (debugger accessible)") + print(" - No JavaScript errors detected") # Show process info print()