From d932b36b06fb322201a79bf408a772a7027a6e1f Mon Sep 17 00:00:00 2001 From: Ivan Trepakov Date: Mon, 7 Sep 2026 07:34:04 +0700 Subject: [PATCH 1/2] Fix Config.__init__: move self.versions fallback after grammar_map is defined The else branch of raw_versions referenced grammar_map before it was assigned, causing UnboundLocalError when config has neither 'versions' nor 'fuzz.grammar'. Move the fallback to after grammar_map is set. --- test/run_tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/run_tests.py b/test/run_tests.py index 5dcf7ee..fb1712b 100644 --- a/test/run_tests.py +++ b/test/run_tests.py @@ -89,9 +89,6 @@ def __init__(self, path): if not isinstance(raw_versions, list) or not all(isinstance(v, int) for v in raw_versions): raise StepError(f"config {path}: 'versions' must be a list of integers") self.versions = [str(v) for v in raw_versions] - else: - # Fall back to fuzz grammar keys if versions not specified - self.versions = sorted(grammar_map.keys(), key=int) self.out_dir = os.path.abspath(resolve( str(raw.get("out_dir", DEFAULT_OUT_DIR)), {"{root}": REPO_ROOT})) llvm_dis = raw.get("llvm_dis", "llvm-dis") @@ -102,6 +99,9 @@ def __init__(self, path): grammar_map = raw_fuzz.get("grammar") or {} if not isinstance(grammar_map, dict): raise StepError(f"config {path}: 'fuzz.grammar' must be an object") + # Fall back to fuzz grammar keys if versions not specified + if not hasattr(self, 'versions'): + self.versions = sorted(grammar_map.keys(), key=int) exit_map = raw_fuzz.get("exit") or {} if not isinstance(exit_map, dict): raise StepError(f"config {path}: 'fuzz.exit' must be an object") From 2728506dda4ddb86fdab049b21775559d391717d Mon Sep 17 00:00:00 2001 From: Ivan Trepakov Date: Mon, 7 Sep 2026 07:39:14 +0700 Subject: [PATCH 2/2] Limit workflow triggers: push on main, PR on any branch Set push trigger to main branch only so feature branch pushes don't fire workflows. Keep pull_request trigger unconstrained so PRs still get checks. This avoids duplicate runs when a PR is open while changes are made to its branch. --- .github/workflows/ci.yml | 1 + .github/workflows/tests.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8dd15af..8306dd2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ name: harness-self-test on: push: + branches: [main] pull_request: jobs: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b80797e..1db21c2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,6 +2,7 @@ name: tests on: push: + branches: [main] pull_request: jobs: