Fix the NameError failing every PR validation - #1371
Merged
Conversation
#1367 added the draft-banner filter in function_snapshot spelled asm_policy.has_draft_banner, but the module is imported as 'import asm_policy as AP', so the bare name does not exist. Every validation since has died with: NameError: name 'asm_policy' is not defined validate_merge.py line 98, in <setcomp> The gate reports this as 'Worker error / validate_merge produced no report', which reads like validator infrastructure rather than a repo bug, so it is worth naming: the crash is in a path only the worker runs, which is why #1367's own checks were green. Verified both directions on this tree: function_snapshot('HEAD') raises the NameError before the change and returns a dict after it.
✅ PR validation — Passednoverify: no source/build-data changes in this PR Each changed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every PR validation is currently dying before it produces a report. The gate surfaces it as
Worker error -- validate_merge produced no report, which reads like validator infrastructure, but it is a one-word repo bug:tools/validate_merge.py:29imports the module asimport asm_policy as AP, so the bare nameasm_policydoes not exist. #1367 added thefunction_snapshotdraft-banner filter using the un-aliased spelling. It is the only such use in the file;chaos_db_ciandrombuild_checkare both referenced through their aliases correctly.Why #1367 went green: the crash is in a code path only the validator worker runs, so
submitandratchethad nothing to say about it, and the byte gate that would have caught it is the very thing that broke.Verified both directions on this tree rather than by inspection:
function_snapshot('HEAD')raisesNameError: name 'asm_policy' is not definedFound while chasing #1369, whose validation went from
mwccarm failedtoWorker errorthe moment I merged current main into its branch. #1370 is green only because it was validated before #1367 reached its tree.