established.py is a MODULE — declare it, and record why an import scan says it is dead - #605
Merged
Merged
Conversation
…n says it is dead
The gate scored it UNVERIFIABLE: "it accepts `--zzz-not-a-flag` and exits 0."
That is TRUE, and it describes a module rather than a defective argument surface.
established.py 87 lines · 0 argparse · no __main__ · no argv read at all
class NotEstablished · def established · def zero_is_a_finding
⇒ Declared `# NOT-EXECUTABLE:`, the form runmarker.py already carries. Measured:
BEFORE ran 60 subject(s): 41 passed · 3 UNESTABLISHED · 7 UNVERIFIABLE
AFTER ran 59 subject(s): 41 passed · 3 UNESTABLISHED · 6 UNVERIFIABLE
established.py(not-executable)
⚠ AND THE PART WORTH KEEPING IS A FALSE ZERO OF MY OWN.
An AST sweep over ast.Import / ast.ImportFrom reports **0 importers** for this
module — non-test AND test. The control says the probe works: runmarker scores 14
on the same sweep, a nonexistent symbol scores 0.
Its user is tools/job-log.py, which loads it at job-log.py:71-75 with
_m = types.ModuleType("established"); _m.__file__ = _est
established, NotEstablished = _m.established, _m.NotEstablished
⇒ A runtime module load is not an import node. AST cannot see it.
⛔ I switched to AST EARLIER TODAY specifically to escape grep's use/mention
problem — a docstring usage example counted as an import, a line-anchored grep
scoring two 200-line suites at zero controls. AST fixed those and introduced the
opposite blind spot: grep found this dependency and AST did not.
⇒ Neither predicate is correct alone. Textual sees mentions as uses; structural
sees only the uses the language spells as structure. The declaration now says so
in the file, so the next import census does not conclude this module is dead.
⚠ NOT FIXED HERE: the other six UNVERIFIABLE instruments. They are two real
argument-surface shapes — four accept ANY flag and exit 0; two match `--self-test`
and DISCARD the remainder — and they are other roles' tools. Reported separately.
gate --self-test 0 · exit-code-gate 0 · check-tools-index 0 ·
test_established 0 · test_job_log 0 (its consumer, run because this file moved).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DTMf4EvaTEnDKXY47efRZZ
|
Warning Review limit reachedNext included review available in 29 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
established.pywas scored UNVERIFIABLE — "it accepts--zzz-not-a-flagand exits 0." That istrue, and it describes a module, not a defective argument surface.
Declared
# NOT-EXECUTABLE:, the formrunmarker.pyalready carries.⚠ The part worth keeping is a false zero of my own
An AST sweep over
ast.Import/ast.ImportFromreports 0 importers for this module — non-testand test. ⚠ CONTROL: the same sweep scores
runmarkerat 14 and a nonexistent symbol at0, so the probe works.
Its user is
tools/job-log.py, at:71-75:⇒ A runtime module load is not an import node. AST cannot see it.
⛔ I switched to AST earlier today specifically to escape grep's use/mention problem — a
docstring usage example counted as an import, a line-anchored grep scoring two 200-line suites at
zero controls. AST fixed those and introduced the opposite blind spot: grep found this dependency
and AST did not.
⇒ Neither predicate is correct alone. Textual sees mentions as uses; structural sees only the uses
the language spells as structure. The declaration now records this in the file, so the next import
census does not conclude the module is dead and delete it.
⚠ Not fixed here
The other six UNVERIFIABLE instruments —
daintree-control,discriminates,fleet-identity,pane-census,pipe-exit-scan,pretooluse-guard. Two real shapes:Both mean
--self-testexiting 0 establishes nothing. The remedy already exists in this repo(
merge-guard.py,disposition-ratchet.pyrefuse unrecognised arguments alongside--self-test),but these are other roles' tools and changing six argument surfaces in one PR is not this change.
Reported separately.
Verification
gate-selftests.sh --self-testscripts/exit-code-gate.sh tools 'test_*.py'scripts/check-tools-index.pytest_established.pytest_job_log.py🤖 Generated with Claude Code
https://claude.ai/code/session_01DTMf4EvaTEnDKXY47efRZZ