Skip to content

Fix harness self-test: UnboundLocalError grammar_map - #1

Merged
liontiger23 merged 2 commits into
mainfrom
fix/harness-self-test-unbound-grammar_map
Sep 7, 2026
Merged

liontiger23 merged 2 commits into
mainfrom
fix/harness-self-test-unbound-grammar_map

Conversation

@liontiger23

Copy link
Copy Markdown
Member

Move fallback assignment of self.versions from the raw_versions else branch (where grammar_map was not yet defined) to after grammar_map is assigned, guarded by hasattr(self, 'versions').

Fixes 45 failing self-tests in the harness-self-test workflow.

… 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.
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.
@liontiger23
liontiger23 force-pushed the fix/harness-self-test-unbound-grammar_map branch from 13e92a9 to 2728506 Compare September 7, 2026 00:41
@liontiger23
liontiger23 merged commit 3bf47bf into main Sep 7, 2026
1 of 2 checks passed
@liontiger23
liontiger23 deleted the fix/harness-self-test-unbound-grammar_map branch September 7, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant