Conversation
Both come from an audit of all eighteen repos in this family, and both catch a class nothing else in this suite can see. First, §17's check #1: every call into a shared module is bound against the callee's real signature. A sibling repo shipped `classify(html, url=...)` in two of three engines against a callee whose second parameter is `status`, and BOTH crashed on their first fetch -- invisible to import, --help, compileall, the undefined-name walk and several hundred green assertions, because none of those calls a function the way a live run does. The check also fails on a call to a name the shared module does not define: bbb-scraper resolved the callee with getattr(..., None) and skipped whatever came back not-callable, so three calls into an API that did not exist sat under a green run of its own binding check. It is conservative by construction. A call using *args or **kwargs is skipped rather than guessed at, and a name bound anywhere in the calling file shadows a same-named module -- an engine takes `proxy_pool` as a PARAMETER, and proxy_pool.next() on that parameter is a method call, not a module attribute. Without that rule the check reports false positives on a clean repo. It also asserts that it found calls to bind at all, so it cannot pass by scanning nothing. Second: no statement the control flow can never reach -- anything after a return/raise/break/continue in the same block. The undefined-name walk beside it cannot catch this, and correctly so: it pools every binding in the file rather than tracking scopes, so a name used in dead code resolves against a real parameter elsewhere in the module. Six repos in this family carried the same fifteen unreachable lines, byte for byte, from their first commit -- a function whose `def` line had been lost, its body absorbed into the end of the function above. This repo's current tree is clean; the check is what keeps it clean. Run against this tree before being added: both clean, no findings. Both verified by control -- `return 1` followed by a statement, and a finish_run() call with fourteen positional arguments, each turn the suite red, and removing them turns it green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Both come from an audit of all eighteen repos in this family, and both
catch a class nothing else in this suite can see.
First, §17's check #1: every call into a shared module is bound against
the callee's real signature. A sibling repo shipped
classify(html, url=...)in two of three engines against a callee whosesecond parameter is
status, and BOTH crashed on their first fetch --invisible to import, --help, compileall, the undefined-name walk and
several hundred green assertions, because none of those calls a function
the way a live run does. The check also fails on a call to a name the
shared module does not define: bbb-scraper resolved the callee with
getattr(..., None) and skipped whatever came back not-callable, so three
calls into an API that did not exist sat under a green run of its own
binding check.
It is conservative by construction. A call using *args or **kwargs is
skipped rather than guessed at, and a name bound anywhere in the calling
file shadows a same-named module -- an engine takes
proxy_poolas aPARAMETER, and proxy_pool.next() on that parameter is a method call, not
a module attribute. Without that rule the check reports false positives
on a clean repo. It also asserts that it found calls to bind at all, so
it cannot pass by scanning nothing.
Second: no statement the control flow can never reach -- anything after
a return/raise/break/continue in the same block. The undefined-name walk
beside it cannot catch this, and correctly so: it pools every binding in
the file rather than tracking scopes, so a name used in dead code
resolves against a real parameter elsewhere in the module. Six repos in
this family carried the same fifteen unreachable lines, byte for byte,
from their first commit -- a function whose
defline had been lost,its body absorbed into the end of the function above. This repo's
current tree is clean; the check is what keeps it clean.
Run against this tree before being added: both clean, no findings. Both
verified by control --
return 1followed by a statement, and afinish_run() call with fourteen positional arguments, each turn the
suite red, and removing them turns it green.
Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
🤖 Generated with Claude Code