Skip to content

fix(python): require receiver identity for attribute-sink credit and qualify nested owners - #11182

Merged
EffortlessSteven merged 19 commits into
mainfrom
fix/python-attribute-sink-nested-owners
Nov 1, 2026
Merged

EffortlessSteven merged 19 commits into
mainfrom
fix/python-attribute-sink-nested-owners

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

  • Python attribute-sink credit now requires receiver identity: an assertion on a different receiver that only coincides on value + attribute name (conn.status == 'active' vs changed self.status = 'active') stays weakly_exposed/orthogonal, not exposed.
  • Nested Python functions get qualified parent.inner owners instead of attributing nested changes to the outer function.
  • Candidate head: a5a28074f8dcfd0f7657c0b380aa58ccadff9e93.

Swarm / Source Boundary

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge, dependency, or repo-ops development for ripr-swarm

Source-of-truth Links

Proposal: none
Spec: docs/specs/RIPR-SPEC-0028-python-adapter.md
ADR: none
Plan item: Python-excellence goal — entity-identity alignment (no wrong-receiver credit) and nested-owner attribution
Governing issue or accepted claim: #1267 (attribute-receiver identity for changed-sink exposure credit; same-value residual)
Acceptance delta (one sentence): A same-value assertion on a foreign receiver no longer credits exposed for a changed Python attribute sink, and nested defs are owned as parent.inner.

Candidate Relationships

Candidate branch (GitHub PR head is authoritative after publication): fix/python-attribute-sink-nested-owners
Stack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): none
Accepted winner and losing candidate disposition (when decided): none

Scope

  • One analyzer behavior seam: Python sink alignment receiver identity + owner collection for nested functions.

Scope Classification

  • One production behavior

Production delta:

  • sink_alignment.rs: value+attribute co-observation for method owners requires the asserted receiver to be bound to the owner (attribute_receiver_bound).
  • owners_tests.rs/source_facts.rs: recurse into function bodies, qualify nested owners.

Evidence/support delta:

  • New adversarial fixture python_adversarial_attribute_sink_same_value_other_receiver (golden: weakly_exposed), honesty-corpus must_not_promote case, nested-owner unit test, repair-card inventory pin update, changelog fragment.

Single acceptance criterion:

  • Foreign-receiver same-value fixture is weakly_exposed/orthogonal while the bound-receiver inverse stays exposed, with focused tests and gates green.

Non-goals:

  • tests/-dir subject vanishing (needs scope ruling), nested defs inside if/try within a function body, nested-class SymbolId, .pyi/.pyw routing, SARIF preview disclosure, wrong-receiver WeaklyExposed vs NoStaticPath reclassification.

Support-tier Impact

  • none

Claim/proof notes:

  • Python stays preview; no tier or public claim change. No killed/survived promotion.

Policy Impact

  • none

Proof

cargo test -p ripr --lib -- nested_function_owners sink_alignment python_repair_card_corpus_pins_alignment_inventory # 14 passed
cargo xtask check-changelog-fragments # pass
cargo xtask fixtures # exit 0
cargo xtask check-evidence-promotion-honesty # pass
cargo xtask check-python-judged-panel # exit 0
cargo xtask goldens check # exit 0
cargo xtask check-fast # ran 6 gates, pass (committed-diff selector: 0 files pre-commit)

Result, failures, or skipped proof:

  • Red reproduced independently: pre-fix binary classified the new fixture exposed/changed_sink_token; post-fix weakly_exposed/orthogonal; 9 falsification probes fail closed correctly. Full single-run cargo test -p ripr --lib -- python not established clean on this host (git-timeout flakes pass isolated); hosted CI owns that matrix. Candidate review before publication: REVIEW_INCOMPLETE (hosted evidence pending).

Claim Boundary

May claim: the two fixes above with their fixtures/tests. Must not claim: Python excellent overall, tests/ handling, nested defs in if/try, or a clean full Python suite on this host.

Rollback

Revert the squash commit; fixture, corpus case, inventory pin, and changelog fragment revert with it. No schema or public-contract change.

Spec-Test-Code Traceability

  • Spec: RIPR-SPEC-0028
  • Tests: nested_function_owners_get_qualified_names, sink-alignment tests, new fixture golden
  • Code: crates/ripr/src/analysis/language/python/{sink_alignment,owners_tests,source_facts}.rs
  • Golden outputs: fixtures/python_adversarial_attribute_sink_same_value_other_receiver/expected/
  • Metrics: repair-card alignment inventory pin (17,27,31,1)
  • ADR/learning: none

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.
  • Unknowns include stop reasons where applicable.

CI Economics

n/a — no workflow, lane, or protection change.

Engineering Check

  • No new panic, unwrap, expect, todo, or unimplemented in production code.
  • Errors are reported with actionable context.
  • Public JSON/schema changes are documented. (none)

Gates

  • cargo fmt --check (via workflow proof)
  • cargo xtask check-evidence-promotion-honesty
  • cargo xtask check-python-judged-panel
  • Hosted required CI — pending on exact head

…qualify nested owners

Same-value/different-receiver attribute assertions (conn.status=='active' vs Session self.status='active') no longer credit exposed; they stay weakly_exposed/orthogonal, pinned by a new adversarial fixture and an evidence-promotion-honesty must_not_promote case. Nested Python functions get qualified parent.inner owners. Refs #1267, RIPR-SPEC-0028.
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 148 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 4e0eca61-087b-44c6-bc1d-a778bb72a982
Commits

Reviewing files that changed from the base of the PR and between 7f2aada and ab5cdd1.

Files selected for processing: 22
  • changelog.d/1267-python-attribute-sink-same-value.md
  • crates/ripr/src/analysis/language/python/owners_tests.rs
  • crates/ripr/src/analysis/language/python/owners_tests/tests.rs
  • crates/ripr/src/analysis/language/python/python_tests.rs
  • crates/ripr/src/analysis/language/python/related_tests.rs
  • crates/ripr/src/analysis/language/python/sink_alignment.rs
  • crates/ripr/src/analysis/language/python/source_facts.rs
  • crates/ripr/src/output/gap_decision_ledger.rs
  • fixtures/evidence-promotion-honesty-corpus/corpus.json
  • fixtures/python-verdict-corpus/expected/rows/py-shapes-decorator-log-name.json
  • fixtures/python-verdict-corpus/expected/rows/py-shapes-decorator-loop-bound-slack.json
  • fixtures/python-verdict-corpus/expected/rows/py-shapes-decorator-loop-bound.json
  • fixtures/python_adversarial_attribute_sink_same_value_other_receiver/SPEC.md
  • fixtures/python_adversarial_attribute_sink_same_value_other_receiver/diff.patch
  • fixtures/python_adversarial_attribute_sink_same_value_other_receiver/expected/CHANGELOG.md
  • fixtures/python_adversarial_attribute_sink_same_value_other_receiver/expected/check.json
  • fixtures/python_adversarial_attribute_sink_same_value_other_receiver/expected/human-full.txt
  • fixtures/python_adversarial_attribute_sink_same_value_other_receiver/expected/human.txt
  • fixtures/python_adversarial_attribute_sink_same_value_other_receiver/input/ripr.toml
  • fixtures/python_adversarial_attribute_sink_same_value_other_receiver/input/src/conn.py
  • fixtures/python_adversarial_attribute_sink_same_value_other_receiver/input/src/session.py
  • fixtures/python_adversarial_attribute_sink_same_value_other_receiver/input/tests/test_session.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Candidate review (pre-publication pass, author self-review): reviewed_head_sha: a5a2807; integration_basis: origin/main 8092849; claim_boundary: Python attribute-sink receiver identity + nested-function owners only. Inspected: sink_alignment.rs attribute_receiver_bound, owners_tests.rs recursion, new adversarial fixture golden (weakly_exposed/orthogonal), honesty-corpus must_not_promote case, repair-card inventory pin. Proof observed: 14 focused tests pass at root; fixtures/honesty/judged-panel/goldens/changelog all exit 0; independent workflow verification reproduced red (pre-fix exposed) -> green and 9 fail-closed falsification probes. Blocking findings: none for this claim. Non-blocking/residual: nested defs inside if/try in a function body still uncollected; tests/-dir vanishing, SARIF preview, .pyi/.pyw routing explicitly out of scope. Disposition: REVIEW_INCOMPLETE until hosted exact-head CI is inspected; not merge-ready yet.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 30, 2026 15:07
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

check-no-panic-family rejected the two expect calls in nested_function_owners_get_qualified_names (PR #11182 Rust gates). Classification: candidate-introduced; local check-no-panic-family now passes.
graphite-app[bot]

This comment was marked as resolved.

Verdict-corpus regression from nested owners: py-hostile-nested-function moved credited->limited because tests call the enclosing function, never the nested name. body_calls_owner and the name-anchor gate now relate a nested Function owner through its enclosing call, and import_binds_owner_name accepts the enclosing import from the owner's module. Decorator rows py-shapes-decorator-{log-name,loop-bound,loop-bound-slack} re-blessed: verdict unchanged (limited/abstained), classification no_static_path->static_unknown since the changed line is now owned by the decorator wrapper inner. Local: verdict-corpus python 0/348 false, 16 focused tests, fixtures/goldens/honesty/judged-panel/no-panic all pass.
@EffortlessSteven

Copy link
Copy Markdown
Member Author

Repair wave on head e2bf86d: (1) check-no-panic-family failure was candidate-introduced expect in the new test - fixed, local gate passes. (2) Verdict-corpus regression: nested owners broke py-hostile-nested-function (credited->limited) because tests call the enclosing function; body_calls_owner/name-anchor/import binding now reach a nested Function owner through its enclosing call from the owner's module. Decorator rows py-shapes-decorator-{log-name,loop-bound,loop-bound-slack} re-blessed with reason in commit: verdict unchanged (limited/abstained), classification no_static_path->static_unknown because the changed line is now owned by the decorator wrapper inner. Local proof: verdict-corpus python 0/348 false verdicts, 16 focused tests pass, fixtures/goldens/honesty/judged-panel/no-panic/fmt all exit 0. Disposition remains REVIEW_INCOMPLETE pending new exact-head CI.

@github-actions

Copy link
Copy Markdown
Contributor

merge-ready is set, but this PR conflicts with main (head e2bf86d0), so GitHub creates no test-merge ref and no qualification run can start. Merge main into the branch and resolve the conflicts, then remove and re-apply merge-ready.

…sink-nested-owners

# Conflicts:
#	crates/ripr/src/analysis/language/python/related_tests.rs
#	crates/ripr/src/output/gap_decision_ledger.rs
@github-actions

Copy link
Copy Markdown
Contributor

merge-ready is set, but no qualification run exists for head 9a16b817: it was pushed after the label was applied, or the label event was dropped. Remove and re-apply merge-ready to request it again.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

CI classification: shard 4 failure is analysis::diff::model::tests::added_run_start_on_a_long_run_is_bounded, a growth-ratio timing test in code this PR does not touch; it passes locally on this exact head (1 passed, 1.87s). Classified inherited/load flake, not candidate. Requesting a fresh qualification run.

…nment

Graphite review on PR #11182: rfind byte index + 1 could land inside a multibyte char before an asserted receiver and panic on slicing. Both branches now use char_indices with len_utf8; regression test covers multibyte-adjacent plain and inline-construction receivers.

Copy link
Copy Markdown
Member Author

Review refresh, head 3ea9d29c695f511bed3a450a9cb6032842feb06c. The review of record on 012206c0 (correctness, tests, spec/contract, perf/security; no blocking findings; the single UTF-8 slicing thread fixed in 83dff04f8, replied and resolved) stands for the production, test and oracle dimensions, which did not change. The only change on this head is the merge of main plus one hunk in crates/ripr/src/output/gap_decision_ledger.rs: main's inventory tuple is now (21, 27, 30, 1) (#9185 +1 and #10990 -2 direct-aligned), and this PR adds one orthogonal card, so the pin is (21, 27, 31, 1) with main's comment blocks kept and this PR's orthogonal comment added. That tuple was derived by arithmetic from main's value, not by running the corpus locally (the box OOMs); the exact-head Ripr Rust Small Result is the proof, and a drift would show as corpus inventory drift in the lib shard. No open threads.


Generated by Claude Code

@EffortlessSteven EffortlessSteven left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review (fresh-context reviewer, head 3ea9d29): REPAIR_REQUIRED

Inspected:

  • The candidate's full contribution against its merge base 228777817b: 22 files, +1292/-14 - crates/ripr/src/analysis/language/python/sink_alignment.rs (+100/-2), owners_tests.rs (+54/-5), owners_tests/tests.rs (+33), source_facts.rs (+1), crates/ripr/src/output/gap_decision_ledger.rs (+4/-1), the new fixture python_adversarial_attribute_sink_same_value_other_receiver, the honesty-corpus must_not_promote case and the repair-card inventory pin.
  • crates/ripr/src/analysis/language/python/sink_alignment.rs:1097-1117 - the new attribute_receiver_bound closure; :1118-1131 - change_only_credit_ok and its call at :1287; :1334-1386 - asserted_attribute_receivers; :1388-1400 - the per_related_test memo helper.
  • crates/ripr/src/analysis/language/python/related_tests.rs:3015 owner_method_bound_locals, :3055 setup_bound_receivers, :3078-3084 instance_bound_receivers.
  • Hosted evidence at this exact head: Ripr Rust Small on GitHub Hosted / Rust gates job 124635761162 (run 41234375661) and job 124661244573 (run 41242661579), both failure, both at head_sha 3ea9d29c6; and the aggregate Ripr Rust Small Result jobs, both failure.
  • policy/user-text-baseline.toml and docs/USER_TEXT_GLOSSARY.md at main tip a69bf0214; crates/ripr/src/app/navigation.rs:198-201; crates/ripr/src/app/task_first.rs::no_seam_inventory_reason; crates/ripr/src/analysis/language/python.rs:804.
  • The branch's own history, which matters for the remedy below: 8fee7632b chore(policy): raise user-text ceilings for cumulative golden counts and c45aa186f chore(policy): set user-text ceilings to latest observed counts 3283/597.

Blocking:

  • The required check Ripr Rust Small Result is red at this head, and the cause is this candidate's own new golden. In both hosted runs at 3ea9d29c6 the failing step is check-user-text, reporting "2 plain-language term count(s) rose (delta or ceiling)". The gate's report names one file: the NEW path fixtures/python_adversarial_attribute_sink_same_value_other_receiver/expected/human.txt, with discriminator +2 (lines 31 and 50) and seam +1 (line 50), both reported as "new path, 0 at the merge-base". The fixture is ADDED by this PR, so the attribution is candidate-side, not inherited. Mechanism: policy/user-text-baseline.toml sets the golden-human ceilings discriminator max_lines = 5 and seam max_lines = 3, with the file's own instruction "never raise one", and the gate scores each golden file's per-file delta against the merge base, so a new golden counts every banned line as an increase. The banned lines are product output: crates/ripr/src/app/task_first.rs::no_seam_inventory_reason, reached from crates/ripr/src/app/navigation.rs:198-201, emits "no repair start offered: the seam inventory behind ripr repair and ripr agent repair --phase before covers Rust files only, so ... has no seam to start a repair from ... add the missing discriminator to that test by hand", and crates/ripr/src/analysis/language/python.rs:804 emits the Python preview Next step "strengthen the existing related test with a field/object assertion for missing discriminator".
  • The remedy is plain wording, not a ceiling change - and this branch has already tried the forbidden remedy. 8fee7632b and c45aa186f raise the golden-human ceilings (to 3283 and 597 on that older cumulative baseline); those raises are not in the current head, which carries main's per-file ceilings of 5 and 3, and the gate still fails with them in place. Do not re-raise the ceilings. The wording work needs an owner: #11856 ("fix(human): plain words for the check screen's repair-start refusals") owns crates/ripr/src/app/navigation.rs and lowers the ceilings rather than raising them, but I checked its diff and it does NOT touch crates/ripr/src/app/task_first.rs, so it does not cover the seam inventory sentence this golden captures, and I found no open PR that rewrites analysis/language/python.rs:804. #11357 is the broad plain-wording PR and may own the latter; I did not confirm that and I am flagging it as unestablished rather than asserting it. Until the wording lands, this candidate cannot pass the gate it fails.
  • Fail-fast leaves the candidate's own claim unexecuted. Because check-user-text fails first, every later Rust context at this head is skipped: RUST_TESTS_RESULT, GOLDENS_RESULT, FIXTURES_RESULT, VERDICT_CORPUS_RESULT, CLIPPY_RESULT, and the Ripr Rust Small tests on GitHub Hosted shards. The PR's single acceptance criterion - "Foreign-receiver same-value fixture is weakly_exposed/orthogonal while the bound-receiver inverse stays exposed, with focused tests and gates green" - therefore has no hosted execution evidence at 3ea9d29c6: the new fixture's golden, the honesty-corpus must_not_promote case and the nested-owner unit test were never run against this tree by the hosted lane.
  • The PR's own acceptance record does not describe the head. The body states "Candidate head: a5a28074f8dcfd0f7657c0b380aa58ccadff9e93"; the head is 3ea9d29c6. The Proof block also lists cargo xtask check-fast # ran 6 gates, pass (committed-diff selector: 0 files pre-commit) - a committed-diff selector that matched zero files did not exercise the commit under review - and it does not list cargo xtask check-user-text, the one gate that actually fails at this head.

Non-blocking:

  • The analyzer change is fail-closed in the right direction. attribute_receiver_bound (sink_alignment.rs:1097-1117) returns true for non-method owners, preserving prior behaviour where receiver binding is not modelled, and otherwise refuses the value-plus-attribute co-observation credit unless the asserted receiver is the owner's: it requires unit.test, owner_class_token and method_name_token to be present (:1101-1107), requires asserted_attribute_receivers to find at least one dotted receiver (:1108-1111), and then accepts only when that receiver is in the owner's method-bound locals or its setup-bound receivers (:1112-1116). asserted_attribute_receivers (:1334-1386) deliberately yields a callee() marker for an inline construction, so a fresh instance cannot match a bound local. The direction is right: a same-value assertion on a foreign receiver (conn.status == 'active' against a changed self.status = 'active') no longer credits exposed.
  • The new binding facts are derived from the related test's own source rather than from the finding, which is the correct input for "is this receiver bound to the owner".
  • Efficiency: the new closure recomputes per-test facts per assertion. change_only_credit_ok is invoked once per alignment unit (sink_alignment.rs:1287), and attribute_receiver_bound calls owner_method_bound_locals(test, owner, class, method) and setup_bound_receivers(test, owner, class, method) on every invocation (:1112-1113). Each of those makes several passes over the related test's body text - match_indices over the constructor call, assignment_count per class local, contains_attribute_call per setup receiver and per fixture - so the shape is O(findings x assertions) repeated body scans where O(findings x tests) would do. The same file already carries the remedy: per_related_test at sink_alignment.rs:1391 exists precisely to "memoize a fact that depends only on the related test holding an assertion, so a test with many assertions computes it once per finding rather than once per assertion and branch", and the new code does not use it. There is a smaller redundancy too: owner_method_bound_locals reaches setup_bound_receivers through instance_bound_receivers (related_tests.rs:3084), so the setup scan runs twice per invocation. The magnitude is unmeasured - no toolchain and no profile on this host - but the cost grows with the number of assertions in the related test, which is the case the memo helper was written for.
  • The body lists owners_tests.rs under "Production delta"; crates/ripr/src/analysis/language/python/owners_tests.rs and owners_tests/tests.rs are test modules. A classification slip in the acceptance record, not a code defect.
  • Duplicate landscape: I found no other open PR claiming the Python attribute-sink receiver-identity plus nested-owner credit. #11809 ("fix(python): fixture/setup/hook that replaces the owner keeps mocked_module") and #11771 are adjacent but distinct claims.

Not run:

  • The Rust toolchain on this host is not on PATH, so nothing was compiled or executed: not cargo fmt --check, not cargo xtask precommit, not cargo xtask goldens check, not cargo xtask fixtures, not cargo xtask check-user-text, and not the new nested-owner unit test. The check-user-text failure is established from the hosted gate log, not reproduced locally.
  • I did not audit the whole new fixture and honesty-corpus case line by line; I read the analyzer change, the two binding helpers, the memo helper and the hosted gate output.
  • The claim that the plain-wording owner for crates/ripr/src/app/task_first.rs::no_seam_inventory_reason and crates/ripr/src/analysis/language/python.rs:804 is #11357 is not established; I checked #11856's diff and it does not cover those two paths, and I did not diff #11357's contribution.

Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head 3ea9d29c695f511bed3a450a9cb6032842feb06c. Not an approval.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed findings

  • Nested function and async function collection are duplicated, including an out.last() dependency after push_function_owner; the helper shape permits qualification to depend on output ordering.
  • The implementation has separate FunctionDef and AsyncFunctionDef recursion paths, increasing drift risk, but no behavioral defect is demonstrated.

Verification questions

  • Confirm the new fixture verifies the foreign-receiver same-value case, but the reciprocal bound-receiver exposed case is not a focused regression in this diff.
  • Confirm nested function owners are recursively qualified, including functions nested in methods, with a focused regression test.
  • Confirm the receiver identity guard is wired into the value-plus-attribute fallback, while direct qualified observation remains a separate branch.
  • Confirm nested function owners are recursively collected, but qualification currently depends on mutating out.last() after push_function_owner.
  • Confirm the receiver-identity check applies only to the value-plus-attribute fallback; direct observation of the qualified sink still bypasses it.
  • Confirm the positive receiver-identity branch lacks a focused local-instance inverse test in the changed test set.

Evidence gaps

  • Current-head executable proof is not established: cargo-test receipt is absent, ripr failed with exit code 2, and the seeded thread records exact-head hosted failures.
  • The latest seeded independent review reports exact-head hosted Rust gate failures, despite prior green-run claims.
  • Model proof intent was rejected by deterministic validation.

Parked follow-ups

  • The receiver-identity gate is placed on the value-plus-attribute fallback rather than the direct observation branch; this preserves prior direct-sink semantics but leaves foreign-receiver behavior outside that narrower claim.

Copy link
Copy Markdown
Member Author

Red on head a76dff8: check-user-text per-path delta on the new golden python_adversarial_attribute_sink_same_value_other_receiver/expected/human.txt (discriminator +2, seam +1). These lines are fixed renderer output (the Python Next step and the "no repair start offered" line), not authored text; no branch-side edit passes without a baseline raise, which the gate forbids. Blocked on the renderer wording work tracked in #11619 (#12069 covers part of it). After that lands, merge main, re-bless this golden, and rerun.


Generated by Claude Code

EffortlessSteven and others added 2 commits November 1, 2026 12:03

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Devin Review

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REVIEW_READY — head ab5cdd1

Scope: the full PR diff against its merge base with main (7f2aada, so the main merge is not in the diff). I built ripr at this head and ran it on the new fixture; I did not run the lib tests (OOM on this host).

The hand-copied golden matches what the head produces. I ran ripr check --diff diff.patch --mode fast for --format human, human-full and json on python_adversarial_attribute_sink_same_value_other_receiver. The human and human-full outputs differ from expected/ only in the root path spelling that my invocation changes (root: ., /input/.); the JSON differs only in root/config_path, plus language_completeness and canonical_next_action, which xtask/src/reports/fixtures.rs strips before comparing and which the sibling golden also lacks. The only lines that differ from the sibling _other_receiver goldens are the two that quote the asserted value ("active" vs "closed"), as they should. The bless step is still CI's job, but the content is right.

CHANGELOG. The repo CHANGELOG.md is untouched; the entry is changelog.d/1267-python-attribute-sink-same-value.md. The "pending entry (34)" is the fixture's own expected/CHANGELOG.md, which bless writes.

"Discriminator (observed, advisory)". The heading lives in output/human.rs and output/human/sections.rs on main and in currentness_matrix_python_deleted_statement; this PR touches none of those and the new goldens do not contain it. It is a wording-thread item, not a blocker here.

Production change. The receiver-identity gate (attribute_receiver_bound) only narrows credit: value+attribute co-observation now needs the asserted receiver bound to the owner instance, and inline Session().status can't match. Non-method owners keep prior behavior. The multibyte test covers the char-boundary panic. Nested-function owners get qualified names and spans, with a test.

Non-blocking

  1. body_calls_owner/import_binds_owner_name/related_test_relation now treat a call or mention of the enclosing function as reaching its nested function. The positive test calls the nested def from its parent; there is no negative case where the parent never calls it (defined but unused, or only returned). That can credit reach it hasn't earned. Worth one more test or a follow-up issue.
  2. The Function/AsyncFunction arms in collect_owners_from_statements are duplicated line for line.
  3. Three python-verdict-corpus rows (py-shapes-decorator-*) flip no_static_path to static_unknown with changed_since_labeling: true. That moves toward abstention, so I consider it the honest direction, but I did not re-bless them; CI's verdict-corpus check is the first real check.

Not established: Ripr Rust Small Result at this head.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Review of record — head ab5cdd146b3ddc1766a07a8477c5f11f00c0c8c9

Angles: (1) independent exact-head review by the coordinator's reviewer, disposition REVIEW_READY at ab5cdd1, who built the head and matched the golden; (2) hosted evidence on this exact head; (3) review-thread triage.

  • Hosted: Ripr Rust Small Result success (job 124874109602, 14:16Z) with Admit, Rust gates and all four shards green. The gates job ran verdict-corpus check-all on this head: python 361 cases 0 false, rust 818 cases 0 false, typescript 371 cases 0 false, perl 94 cases 0 false. The three py-shapes-decorator-* rows now read static_unknown instead of no_static_path, and the corpus check accepts them.
  • Merge delta since review: main merged in (7f2aada) and one golden re-blessed to the fix(human): plain words for the non-Rust terminal, the no-spot refusal and the Python preview next step (#11619) #12123 wording (copied from the sibling python_adversarial_attribute_sink_other_receiver). CI goldens/fixtures checks pass on it.
  • Threads: 3 total, 0 unresolved. Graphite UTF-8 slicing finding fixed earlier (83dff04). Two Devin findings (parent-call and parent-import reach for nested functions) concern reach the enclosing function already had before nested owners were split out, so they are not a regression and are tracked with negative-fixture work in Python: add negative test for nested-function reach via the enclosing call #12141. The first run failed eligibility only because those threads arrived mid-run; they were answered and resolved, and a fresh run passed.
  • Non-required: ub-review cancelled (advisory).

No blocking findings. Merging with expectedHeadSha.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit e9c5b8e into main Nov 1, 2026
105 of 107 checks passed
@EffortlessSteven
EffortlessSteven deleted the fix/python-attribute-sink-nested-owners branch November 1, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants