From 901944aae236243e7b522d3ec08aa2f0ee640152 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 31 Aug 2026 05:50:10 +0000 Subject: [PATCH] chore(fuzz): remove dead duplicate fuzz target fuzz/fuzz_opencode_normalize_output.py was an orphaned duplicate of fuzz/fuzz_opencode_review_normalize_output.py, which is the file actually named in .clusterfuzzlite/Dockerfile and imported by tests/test_fuzz_targets.py. The duplicate called NORMALIZER.extract_json_object(text), a function that no longer exists in scripts/ci/opencode_review_normalize_output.py (current API is iter_json_objects) -- it would AttributeError if ever executed and was reachable from no test, workflow, or doc. Deleted; no other file referenced it by name outside one unrelated case pattern in scripts/ci/strix_quick_gate.sh (a separate, pre-existing filename mismatch, out of scope here). --- fuzz/fuzz_opencode_normalize_output.py | 47 -------------------------- 1 file changed, 47 deletions(-) delete mode 100644 fuzz/fuzz_opencode_normalize_output.py diff --git a/fuzz/fuzz_opencode_normalize_output.py b/fuzz/fuzz_opencode_normalize_output.py deleted file mode 100644 index 0e034a2ee2..0000000000 --- a/fuzz/fuzz_opencode_normalize_output.py +++ /dev/null @@ -1,47 +0,0 @@ -"""Atheris fuzz harness for OpenCode review-output normalization.""" - -from __future__ import annotations - -import importlib.util -import pathlib -import sys - -import atheris - - -REPO_ROOT = pathlib.Path(__file__).resolve().parents[1] -NORMALIZER_PATH = REPO_ROOT / "scripts" / "ci" / "opencode_review_normalize_output.py" - - -def _load_normalizer(): - """Load the normalizer module without requiring package installation.""" - spec = importlib.util.spec_from_file_location( - "opencode_review_normalize_output", NORMALIZER_PATH - ) - if spec is None or spec.loader is None: - raise RuntimeError("Could not load OpenCode normalizer module") - module = importlib.util.module_from_spec(spec) - spec.loader.exec_module(module) - return module - - -NORMALIZER = _load_normalizer() - - -def TestOneInput(data: bytes) -> None: - """Feed arbitrary model text into the JSON extraction path.""" - try: - text = data.decode("utf-8", errors="ignore") - NORMALIZER.extract_json_object(text) - except (ValueError, UnicodeError): - return - - -def main() -> None: - """Run the Atheris entry point.""" - atheris.Setup(sys.argv, TestOneInput) - atheris.Fuzz() - - -if __name__ == "__main__": - main()