Adds one refused case per load-bearing rule (import allowlist, _ prefix,
with-item, with-body order) and a RecursionError parser case; the docstring
now says deliberately obfuscated cells get through, and the refusal lists
the straight-line and import rules.
Refs #146582
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
The binding check was scope-blind: a name bound only as a parameter, a
comprehension target, a local, a class attribute or under a branch/loop
counted as bound for a module-level read, which can still reach a helper
left by an earlier kernel cell. Now only straight-line top-level statements
qualify (no nested scopes, branches, loops, try or walrus), names count only
once an earlier statement bound them, frame/generator introspection and
typing.get_type_hints are refused, and parser exhaustion keeps the normal scan.
Refs #146582
A cell that only prints or writes text quoting a gateway lifecycle command was
refused with no hint of what matched. Allow a cell whose parsed code provably
cannot start or signal a process (pure-module imports only, no process-like
attributes, every name a builtin or bound in the cell); every other cell is
scanned exactly as before. The refusal now names the matched text.
Fixes#146582