Skip to content

Fix the NameError failing every PR validation - #1371

Merged
tangosdev merged 1 commit into
mainfrom
fix/validate-merge-nameerror
Aug 10, 2026
Merged

Fix the NameError failing every PR validation#1371
tangosdev merged 1 commit into
mainfrom
fix/validate-merge-nameerror

Conversation

@tangosdev

Copy link
Copy Markdown
Owner

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:

File "/home/validator/clone/tools/validate_merge.py", line 98, in <setcomp>
    if asm_policy.has_draft_banner(git_text(rev, path))}
NameError: name 'asm_policy' is not defined

tools/validate_merge.py:29 imports the module as import asm_policy as AP, so the bare name asm_policy does not exist. #1367 added the function_snapshot draft-banner filter using the un-aliased spelling. It is the only such use in the file; chaos_db_ci and rombuild_check are both referenced through their aliases correctly.

Why #1367 went green: the crash is in a code path only the validator worker runs, so submit and ratchet had 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:

  • before: function_snapshot('HEAD') raises NameError: name 'asm_policy' is not defined
  • after: returns a dict, 3 entries

Found while chasing #1369, whose validation went from mwccarm failed to Worker error the moment I merged current main into its branch. #1370 is green only because it was validated before #1367 reached its tree.

#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.
@tangos-validator

tangos-validator Bot commented Aug 10, 2026

Copy link
Copy Markdown

✅ PR validation — Passed

noverify: no source/build-data changes in this PR

Each changed src/*.c|*.cpp is compiled and its relocated bytes compared to the binary data on a private build box. Passing requires every changed file to reproduce the ROM byte-for-byte with correct relocation targets — this catches WRONG-DEST relocations and non-reproducing near-misses that ledger-scoped linkcheck skips.

@tangosdev
tangosdev merged commit 62d07f9 into main Aug 10, 2026
2 checks passed
@tangosdev
tangosdev deleted the fix/validate-merge-nameerror branch August 10, 2026 07:59
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