diff --git a/abx_plugins/plugins/claudecode/claudecode_utils.py b/abx_plugins/plugins/claudecode/claudecode_utils.py index ca3a2b29..97f94466 100755 --- a/abx_plugins/plugins/claudecode/claudecode_utils.py +++ b/abx_plugins/plugins/claudecode/claudecode_utils.py @@ -165,7 +165,9 @@ def run_claude_code( Returns: (stdout, stderr, returncode) """ config = load_config(Path(__file__).with_name("config.json")) - binary = str(config.CLAUDECODE_BINARY) + binary = str(os.environ.get("CLAUDECODE_BINARY") or config.CLAUDECODE_BINARY) + if not Path(binary).exists(): + return "", f"Claude Code binary not found: {binary}", 1 cmd = [binary] diff --git a/abx_plugins/plugins/ublock/tests/test_ublock.py b/abx_plugins/plugins/ublock/tests/test_ublock.py index 94ea6760..f5040274 100755 --- a/abx_plugins/plugins/ublock/tests/test_ublock.py +++ b/abx_plugins/plugins/ublock/tests/test_ublock.py @@ -862,6 +862,10 @@ def test_blocks_ads_on_canyoublockit_extreme(): f"({request_reduction_percent:.0f}% reduction)", ) + strong_visible_ad_reduction = ( + ads_blocked >= 2 + and reduction_percent >= 75 + ) strong_dom_and_request_reduction = ( ext_result["adElementsVisible"] <= baseline_result["adElementsVisible"] - 2 @@ -872,7 +876,7 @@ def test_blocks_ads_on_canyoublockit_extreme(): weak_signal and request_reduction_percent >= 15 ) - if strong_dom_and_request_reduction or weak_signal_request_reduction: + if strong_visible_ad_reduction or weak_signal_request_reduction: print("\nā SUCCESS: uBlock correctly blocks ads!") print( f" - Baseline: {baseline_result['adElementsVisible']} visible ads", @@ -889,8 +893,8 @@ def test_blocks_ads_on_canyoublockit_extreme(): ) if weak_signal and not strong_dom_and_request_reduction: print( - " - Accepting request reduction because the live baseline exposed too few visible ads " - "for a reliable DOM-count comparison", + " - Accepting visible ad reduction because live request counts are noisy " + "and the page exposed too few visible ads for stricter request-count comparison", ) return diff --git a/abx_plugins/plugins/ytdlp/templates/card.html b/abx_plugins/plugins/ytdlp/templates/card.html index 6fe32098..9238b877 100644 --- a/abx_plugins/plugins/ytdlp/templates/card.html +++ b/abx_plugins/plugins/ytdlp/templates/card.html @@ -1,13 +1,61 @@ {% if media_files %} -