Repository navigation
fix(python): read for/with/comprehension targets as a builtins-module rebinding (#12591) - #12702
Conversation
… rebinding (#12591) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmoz3yvGnngtDNnPKxG
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 49 minutes. View limit details
CodeRabbit Verify
|
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Review of record, head 7a10f90 (full diff read: 4 files, +159/-10) Angles: semantic owner, fail-closed direction, test stimulus/oracle, spec/public claim, schema.
No blocking findings. Hosted proof is requested by Generated by Claude Code |
|
Generated by Claude Code |
|
Delta review of record, head 650186a (previous review: 7a10f90) The only change is a merge of current Generated by Claude Code |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- The security-relevant behavior is fail-closed: recognizing a builtins-module rebinding makes the isinstance guard unknown rather than granting credit.
Verification questions
- Confirm the suite lacks a negative control where the builtin attribute appears in the target position but is not a store slot, so it may not discriminate binding from incidental target text.
- Confirm the changed detection path covers for, with-as, and comprehension targets through a shared binds_in_header helper.
- Confirm the implementation identifies header targets textually and does not use a Python parser, leaving unusual but valid store forms outside the demonstrated scope.
Evidence gaps
- Completed execution evidence for the modified Rust analysis path is not available in this review packet.
- Model proof intent was rejected by deterministic validation.
- The ripr sensor failed with exit code 2 and the cargo-test receipt remains absent, leaving red/green execution unconfirmed.
- Completion evidence for the new Rust tests is unavailable because the scheduled cargo-test receipt is absent.
- The exact-head runtime oracle remains incomplete because the ripr sensor failed and the late cargo-test receipt is absent.
Governing issue or accepted claim: #12591
Acceptance delta (one sentence): A Python isinstance guard now reads as unknown (fail-closed) when a
for,with ... asor comprehension target rebinds a builtin through the builtins module, while plainfor x in items:/with ctx() as x:still leave it readable.Adds
binds_in_headerbesiderebinds_targetinarm_activation.rs, positive and discriminating-negative controls inguard_atoms_tests.rs, the RIPR-SPEC-0260 rebinding rule extended, and a changelog fragment. Persisted facts are unchanged, soPYTHON_FILE_FACT_SCHEMA_VERSIONis not bumped.Closes #12591
Generated by Claude Code