Repository navigation
feat(python): row-owned missing_input for RelatedTestMiss (#5491) - #9587
Conversation
A strong related-test row on a predicate-boundary finding gains missing_input only when its own owner calls all bind and resolve both compared operands off the boundary. no_call_path stays withheld. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
|
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 59 minutes. View limit details
Comment |
There was a problem hiding this comment.
Code Review
This pull request implements row-owned support for the missing_input miss reason in Python related-test rows (RIPR-SPEC-0224, #5491). It introduces python_row_boundary_omission to check if a test's own calls leave a changed predicate boundary unexercised, and updates the row miss classification logic to annotate strong rows with MissingInput accordingly. The changes are accompanied by comprehensive unit tests, updated specifications, and blessed golden test fixtures. The feedback suggests a minor improvement in boundary.rs to simplify pattern matching and avoid explicit dereferencing of Copy types.
… unknown operands (#5491) Require direct owner calls only (no helper, alias, map/partial, fixture, dynamic or foreign-receiver reach), a readable old equality pair, unrebound compared parameters, an unchanged relational operand pair, and same-kind comparable literals. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
There was a problem hiding this comment.
Confirmed findings
- crates/ripr/src/analysis/language/python/row_reach.rs:159 — receiver_is_owner_instance only inspects a single direct assignment with
variable = Class(...); ac = Cart(); c.foo(); c = Cart(); c.can_reserve(...)pattern where the receiver is re-instantiated identically may be accepted as owner even if a prior binding shadowed it. Consider requiring the last assignment before the call to be the Class(...) one, not merely the unique one. - KEYWORDS list is a duplicate of Python's reserved set; relying on it to gate
def/classheaders is redundant with thehead.ends_with("def")/head.ends_with("class")check two blocks below. The def/class guards are sufficient; KEYWORDS only screens language-reserved words, but the only consumer effect is the!after_dotshort-circuit, which is already covered by receiver logic. Drop KEYWORDS to shrink the textual reader and remove a maintenance hazard (any new Python keyword silently changes reachability). (crates/ripr/src/analysis/language/python/row_reach.rs:39).
Verification questions
- Confirm row_reach.rs introduces a 330-line textual Python reader inside
pythonmodule; not behind a language-portable trait, so TypeScript/Ruby ports cannot reuse it. - Confirm code_only rejects plain f-strings on prefix scan, but an f-string with no {...} brace (e.g. f'just text') is silently accepted and its interior scanned. Mild: f-strings with method calls or conversion fields are unmodeled but not in test surface.
- Confirm positive + negative omission tests cover import-resolved same-name other-module, non-predicate family, unresolved/computed operand, old-equality operands, helper/map/partial/alias/fixture, rebound parameter, mixed-kind literals, moved-operand relational change.
- Confirm devin-ai bug-1 'aliased boundary calls labeled missing' reopens on this diff: row_reaches_owner_only_by_direct_calls treats a local alias
f = can_reserve; f(4,4)as a direct call and would still claim missing_input, undermining the omission. Mitigation: test 'alias' asserts no_missing_input. Verify test actually exercises the post-omission path through python_row_boundary_omission, not run(). - Confirm module-qualified owner reach only counts when the dotted prefix matches a known call_name.
from pricing.legacy import bulk as bis not represented in call_names, sob(101)does not register as an owner call; MissingInput would be wrongly claimed if the body still places the input off-boundary. - Confirm goldens re-blessed with miss='missing_input' + why; spec marks row-owned (predicate boundary) yes; changelog fragment updated. No public-facing test on other Python sinks (assertion_return, return_pure) annotated missing_input.
Refuted
- provably_unequal's integer_offset branch can re-evaluate the same prefix for each row; not a correctness bug, just O(n*m) on operand texts. No allocation failure.
- owner_call_names being made pub(super) without re-export could leave TypeScript/LangAdapter consumers calling the old path with stale inputs; refuted because: TypeScript adapter does not import the python boundary module; boundary.rs is python-only and owner_call_names is a same-crate helper. No external caller is introduced.
Evidence gaps
- ripr sensor exit 2 in packet and cargo-test receipt absent means the new omission code path is unverified at review time.
- Model proof intent was rejected by deterministic validation.
… the owner (#5491) Fail closed by existence: autouse fixtures, pytestmark, setup/teardown hooks, module-level calls, test-module rebinding of the owner name, decorated owners and conftest fixtures or hooks on the directory chain. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
# Conflicts: # crates/ripr/src/analysis/language/python.rs
…classes and conftest top-level effects (#5491) Class bases and decorators, module and conftest top-level calls or attribute assignments count as implicit reach; the variable-receiver branch is removed; the spec states the visible-evidence-only limits. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
There was a problem hiding this comment.
Confirmed findings
- Keyword detection is incomplete for Python syntax such as async definitions, causing valid assertion text to be rejected as an unknown call rather than safely ignored.
- KEYWORDS list in row_reach.rs:39 duplicates Python's reserved set and is only consumed by the
!after_dotshort-circuit; the seeded github-actions review (2026 review-summary) flagged it as a maintenance hazard. Source-route scope is wiring, not dedup, so demoted to summary. - The textual reader can falsely recognize an owner identifier inside an attribute or subscript as an indirect owner reference and suppress a valid missing_input row.
Refuted
- The new textual Python reader could advance into UTF-8 continuation bytes or return an invalid slice.; refuted because: The scanner only begins at ASCII bytes and advances only across ASCII identifier bytes; all string slicing occurs at token starts already found by that scanner, and normal Rust UTF-8 string operations preserve valid boundaries.
- This PR creates an exploitable memory-corruption or secret-disclosure vulnerability.; refuted because: The reviewed production changes contain no unsafe/native operation, pointer, buffer conversion, secret handling, or externally exposed runtime path; unsafe-review found no new gaps.
- The active-view-specific UB lane should identify a resize, detach, transfer, or stale length-snapshot hazard.; refuted because: The diff contains Python source analysis and row-miss classification only; no ArrayBuffer/TypedArray backing store, mutable view, resize, detach, transfer, or length snapshot operation is changed or invoked.
- The two conftest propagation paths create divergent behavior between workspace and repo analysis modes.; refuted because: Both paths use the same reach_conftests insertion predicate and shared mark_implicit_reach_by_conftest helper; the remaining duplication is orchestration, not currently divergent policy.
- The row-reach and boundary-analysis additions create a worker/async lifetime or ownership hazard.; refuted because: The additions are bounded synchronous Rust computations over owned AST/text data; they do not enqueue work, expose JS objects, detach resources, or transfer ownership to another thread.
Evidence gaps
- Security confidence is limited by failed automated analysis and missing late test execution evidence, not by a demonstrated exploit path.
- Model proof intent was rejected by deterministic validation.
- Full cargo-test and ripr proof receipts are unavailable or failed in the supplied sensor packet.
Parked follow-ups
- Implicit-reach policy is applied through two separate workspace/repo pipelines rather than one shared extraction-to-classification boundary.
There was a problem hiding this comment.
Confirmed findings
- crates/ripr/src/analysis/language/python/row_reach.rs:145 — Add a regression for an unknown attribute/property call reachable from a direct owner test, such as
assert receiver.can_reserve(5, 3), and assert it does not producemissing_input. The current after-dot allowlist accepts every identifier beginning withassert(and several fixed names) without proving it cannot invoke the owner or an unknown wrapper. - SAFE_BARE_CALLS treats calls named list, dict, set, sorted, all, any, sum, and similar helpers as harmless, but a test can rebind or shadow one with a project helper that invokes the owner.
Verification questions
- Confirm the implementation does not parse the test body AST, so calls embedded in comprehension/lambda/generator control flow may be classified without sufficient syntactic precision.
- Confirm the scanner's safe-call allowlist may classify an unknown method or property call on a known attribute receiver as safe, potentially missing owner reach outside direct calls.
Refuted
- Row-owned missing_input evidence could leak secrets or create a denial-of-service exploit through malformed Python input.; refuted because: Rejected as a security finding: the code analyzes local repository text and produces classification metadata; it does not expose secrets, execute Python, allocate attacker-controlled native buffers, or perform unbounded external work beyond ordinary analysis limits.
- Passing owner/test references through boundary omission and conftest marking could create ownership or aliasing UB.; refuted because: Rejected: Rust's shared-reference call signatures safely permit concurrent immutable borrows; conftest marking occurs before classification, and no &mut receiver is aliased while shared references are live.
- The diff broadens into sibling crypto/compression/runtime helpers that require UB-specific scrutiny.; refuted because: The patch changes only Python static-analysis and presentation paths; no unsafe or native implementation path is changed, and unsafe-review reports zero new gaps.
- The Python row-reach scanner may slice into UTF-8 continuation bytes or operate on a resizable/detached buffer.; refuted because: No ArrayBuffer, TypedArray, slice, resize, detach, transfer, or backing-store API is involved. String slices occur only after scanning ASCII identifier bytes, and all resulting ranges begin at valid character boundaries.
- Test
assert can_reserve(5,3) == Trueis tautological for aqty >= on_hand->qty > on_handchange and could mask off-boundary false positives; refuted because: provably_unequal treats 5,3 as same Kind::Number and unequal (5!=3), so off_boundary returns true; row_reach admits the call (direct import-resolved call, no alias/helper/conftest); predicate family gate fires. Strong claim, real inputs, not tautological. - The Python row-reach changes introduce a worker/async memory-crossing defect.; refuted because: No worker, async runtime, JS boundary, GC-managed handle, detach, transfer, raw allocation, or thread-sharing operation is introduced; the analysis paths execute synchronously in Rust.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
Parked follow-ups
- The classifier's visible-evidence limits may permit false negatives, but no exploitability or safety impact is established; limits are explicitly documented.
… missing_input (#5491) The row guard is a closed-world allowlist: subscript or call-result callees, non-inert test decorators, pytest_* hooks in the test module and rebound import aliases withhold the claim; instance methods are never claimed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
… direction-preserving changes (#5491) Only the unittest.TestCase assertion API and pytest raises/warns/approx are safe callees; assert/check/verify helpers, non-test class methods and star imports withhold the claim; a relational change must keep its direction. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
…ned condition edits (#5491) An owner that calls its own name, another project function or a same-class callee keeps no miss; a relational change must leave the rest of the line identical, and an equality change must be the whole condition. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
… missing_input (#5491) A keyword captured by **kwargs no longer stands for a body local of the same name when resolving the compared operands. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
# Conflicts: # changelog.d/5491-python-related-test-miss.md # crates/ripr/src/analysis/language/python.rs # crates/ripr/src/analysis/language/python/boundary.rs # crates/ripr/src/analysis/language/python/source_facts.rs
EffortlessSteven
left a comment
There was a problem hiding this comment.
REPAIR_REQUIRED — independent source/producer review of head b77f754f1e8d7283073cd33bd35be3f4a11cfa84, tree 6fea864cce634dd2344f3ae93c4b420b606b1fb8, base/integration parent 2939c0d6951faa60b7fdd6f2ddc4332a9295421e.
Two current P1 findings validate the unresolved parts of review 5616658614: builtin shadowing and fixed assertion API names admitted without receiver identity. The arbitrary assert* prefix allegation is superseded: current code uses UNITTEST_API, and the receiver.assertWhatever(...) control correctly retains no miss.
Observed producer/native matrix (11 cases, exact-head CLI, no product edits):
Subject beside direct assert can_reserve(5, 3) == True |
Actual row miss | Required row miss | Native hidden boundary |
|---|---|---|---|
ordinary list([1]), ordinary sum([1]) |
missing_input |
missing_input |
none |
imported helper aliased list |
missing_input |
none/unknown | (4,4) |
local list = boundary_probe |
missing_input |
none/unknown | (4,4) |
module def list(values) wrapper |
missing_input |
none/unknown | (4,4) |
ordinary unknown bare helper, receiver.invoke |
none | none/unknown | (4,4) |
receiver.approx, receiver.assertEqual project helpers |
missing_input |
none/unknown | (4,4) |
receiver.assertWhatever |
none | none/unknown | (4,4) |
unresolved can_reserve(n, 3) |
none | none/unknown | unexecuted parameterized row |
Every case has a separate strong test_direct_control row, which retains missing_input. All 11 CLI invocations exit 0, each yields exactly one weakly_exposed finding with two strong rows and complete analysis. The 5 mismatches are product-contract failures, not invocation failures. For each of the 5, native Python profile events record subject calls [(5,3),(4,4)]; the test passes at >= and raises AssertionError at >. The direct control passes both. No pytest installation or dynamic setup is needed. The unresolved fixture row is a producer-only control; native invocation reports TypeError and supplies no runtime witness.
Minimal subject and helper:
# src/subject.py; diff changes > to >= on the if line
def can_reserve(qty, on_hand):
if qty >= on_hand:
return True
return False
# src/helpers.py
from src.subject import can_reserve
def boundary_probe(values):
return can_reserve(4, 4)
invoke = approx = assertEqual = assertWhatever = boundary_probeFor the imported-builtin case:
# tests/test_subject.py
from src.subject import can_reserve
from src.helpers import boundary_probe as list
def test_direct_control():
assert can_reserve(5, 3) == True
def test_subject():
assert can_reserve(5, 3) == True
assert list([1]) == TrueFor the attribute cases replace the helper import with import src.helpers as receiver, and the final call with receiver.approx([1]) or receiver.assertEqual([1]). Config: [languages]\nenabled = ["python"] (two lines). Producer command: ripr check --root <case> --diff <case>/diff.patch --format json.
Proof observed: cargo build --locked -p ripr exit 0 (Rust/Cargo 1.95.0, Linux); CLI SHA-256 2b66925e4460be7cf6c8804ac4d30f94e013ee9081ede15d409e3a4af2fb4272; Python 3.12.14; 11-case matrix and native witnesses retained, matrix SHA-256 18b2e2879a382f392596ee812fca50cf175de36572872a40183052b5f72265fb. cargo test --locked -p ripr --lib analysis::language::python::row_miss_tests: 42 passed, 0 failed, native exit 0. Existing tests therefore do not discriminate these 5 cases. Initial offline build failed because serde_json 1.0.154 was absent from the cache; the subsequent locked online build succeeded without lockfile/source edits.
Reconciliation: the three original inline threads are resolved with owner replies and named regressions; these findings concern the remaining call-identity gap. Source review followed row reach → boundary omission → row miss → JSON/human output, the conftest/admission wiring, operand/call binding and recursion gates, all changed production files, spec/traceability and four fixture golden deltas. Golden changes inspected add only miss/why and corresponding human explanation. Full golden/hosted qualification was not repeated.
Remote evidence observed: the head remains unchanged; 3 completed successful service checks (Graphite AI Reviews, Graphite mergeability, GitGuardian), 0 Actions runs for this head. These do not establish required merge qualification. GitHub reports mergeable=false; integration conflict details are not independently established. Protection evidence is incomplete: GET /repos/EffortlessMetrics/ripr-swarm/branches/main/protection/required_pull_request_reviews was denied with 403 Resource not accessible by integration; it was not retried through another route. The connector rejected rules/branches/main as an unsupported URL (400), so no ruleset conclusion is drawn.
Next action: the canonical writer on claude/python-missing-input-5491c should adopt the two bounded call-identity repairs and producer regressions. Reuse the existing related_tests::builtin_is_shadowed authority where suitable instead of adding another rebinding model; prove framework receiver/import identity for fixed attribute APIs or retain unknown. Preserve ordinary builtin and unknown-helper controls, row isolation and miss-only semantics. No branch push, competing implementation, Ready change, merge or release was performed. Re-review changed commits and complete integration/required checks/protection verification before merge.
…only with established identity (#5491) A bare builtin is inert only while the test and module do not rebind it, and raises/warns/approx/assert* are trusted only on self in a unittest.TestCase class or the real pytest import; any other receiver withholds the claim. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
# Conflicts: # crates/ripr/src/analysis/language/python/term_activation.rs # docs/specs/RIPR-SPEC-0224-examined-test-miss-evidence.md # fixtures/python_named_constant_boundary_repair_gap/expected/CHANGELOG.md # fixtures/python_return_comparison_boundary/expected/CHANGELOG.md # fixtures/python_same_stem_sibling_owner_not_related/expected/CHANGELOG.md # fixtures/python_src_layout_package_import/expected/CHANGELOG.md
There was a problem hiding this comment.
Confirmed findings
- resolve_operand accepts an owner-side name as resolved without proving its value, so a test input may not be provably off the boundary yet still receive missing_input.
Verification questions
- Confirm broad sibling coverage of alternate Python call/import/decorator forms is not demonstrated by the available changed-file evidence.
- Confirm conftest reach marking is implemented in both repository and source-facts paths, but the two paths use different sources of truth for unreadable conftests.
- Confirm crates/ripr/src/analysis/language/python/row_reach.rs:123 — The direct-call proof is based on a textual identifier scanner. A valid Python form that places a callee in a context the scanner does not recognize could be admitted as safe and yield a false
missing_input. Prefer AST-based call collection, or add a regression matrix covering nested calls, comprehensions, lambdas, walrus expressions, and conditional expressions. - Confirm a sibling syntax variant could still evade the textual direct-call reader and be incorrectly treated as reaching the owner only through direct calls.
- Confirm the new reach marker is attached to test.constant_rebinding.implicit_reach and can suppress missing_input for any test under a conftest, even when the conftest has no owner-relevant path.
Refuted
- The new textual Python reader may slice invalid UTF-8 or otherwise corrupt memory.; refuted because: The scanner advances only across ASCII identifier bytes, while code_only iterates Unicode scalar values. The diff contains no unsafe memory operation or mutable backing store.
- This change may introduce a worker/async/GC memory-boundary defect.; refuted because: The changed production code synchronously parses and inspects Rust-owned strings and AST facts. No worker, async, FFI, GC, detach, or transfer boundary was added, so such a defect is outside this diff's surface.
- No sibling path can reach the owner outside the row's direct calls.; refuted because: The implementation is intentionally fail-closed for many dynamic, alias, fixture, decorator, and implicit-reach forms, but the available evidence does not cover every Python syntax variant; therefore the absolute claim is not established.
- The new Python source reader could trigger OOB slicing, use-after-free, type confusion, or information disclosure.; refuted because: The changed code uses safe Rust string/vector operations, validates optional values before use, and processes source text without unsafe/native access or secret-bearing output.
Evidence gaps
- Integration evidence is not yet complete because the ripr sensor failed and cargo-test is scheduled late rather than having a reviewed receipt.
- Model proof intent was rejected by deterministic validation.
…#5491) A project callable passed by reference to a trusted call (pytest.raises, assertRaises, sorted/max key=) or a test that mentions builtins withholds the claim; arguments may only be literals, unshadowed builtins and exceptions, plain locals and nested calls. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
There was a problem hiding this comment.
Confirmed findings
- fixtures/python_return_comparison_boundary/expected/CHANGELOG.md:1 — Regenerate and bless the four changed fixture goldens instead of committing source-edited expected files. Each expected CHANGELOG says the bless command was not executed, leaving the checked-in JSON/text outputs unverified against the golden tool.
Verification questions
- Confirm the row reach guard treats every owner call as direct, but trusted-call argument validation may conservatively reject valid keyword-only owner calls; this can suppress missing_input rather than create a false omission.
- Confirm conftest reach classification is duplicated in source-facts and repo-evidence paths.
- Confirm the closed-world textual scanner can classify unsupported valid Python syntax as safe rather than unknown.
- Confirm the implementation relies on a textual Python reader for a soundness-sensitive affirmative claim. Unsupported valid syntax can be interpreted as safe instead of unknown, so human verification should cover the full Python grammar surface or replace the scanner with AST-backed call collection.
Refuted
- This change may cross memory, async, GC, detach, or transfer boundaries in a worker.; refuted because: The changed implementation contains no JavaScript runtime, worker, async task, GC handle, native resource, detach operation, or buffer-transfer API. The new Python analysis operates on owned Rust strings and collections without unsafe code or cross-thread ownership transfer.
- The change could execute project code or disclose secrets while analyzing a test module.; refuted because: It performs static parsing and textual inspection only; it does not invoke Python, import modules, evaluate expressions, or read secret material.
- A byte-oriented scanner can panic or create invalid UTF-8 slices when it advances through multibyte text.; refuted because: The scanner begins only at ASCII identifier bytes and advances only across ASCII identifier bytes. Slices are taken at those token starts or at ranges derived from Rust string ranges, preserving character boundaries.
Evidence gaps
- The changed fixture goldens are marked pending and explicitly say no goldens-bless command was executed, so their expected outputs are source-edited rather than validated by the deterministic golden checker.
- The new row-level miss can be promoted into user-facing golden output without a completed native fixture proof in this packet.
- Model proof intent was rejected by deterministic validation.
- The ripr sensor failure prevents treating the packet as complete proof.
…with the tool A name is a plain local only if assigned once on one balanced physical line from closed words and every other occurrence is a bare operand. Fixture goldens regenerated via cargo xtask goldens bless. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
…ntries and close main's truncated RIPR-SPEC-0288 entry Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
There was a problem hiding this comment.
Confirmed findings
- fixtures/python_return_comparison_boundary/expected/CHANGELOG.md:281 — Regenerate and bless the four changed fixture goldens instead of committing expected files whose changelog still says the bless command was pending. The checked-in JSON/text outputs therefore have no completed generation receipt proving they match the producer.
- The fixture blesses a missing_input claim for
is_large(500)while the changed predicate istotal == 100, demonstrating an exact-value oracle that is not discriminating the changed boundary. - Implicit reach is propagated through PythonTestRebinding.implicit_reach, mixing environment/setup facts with ordinary value-rebinding facts in a shared test-wide bit.
- The textual reach scanner can admit a qualified pytest API even when the receiver is rebound through a module attribute.
Verification questions
- Confirm changed golden outputs contain Pending CHANGELOG entries and do not record that the bless command was executed.
- Confirm equality-boundary omission checks operands but does not prove the owner call reaches the changed predicate, so an unrelated exact-value assertion can be labeled missing_input.
- Confirm the closed-world direct-call reader treats a safe builtin call as harmless without proving the receiver and arguments cannot dispatch project code in all syntactic forms.
- Confirm the implementation makes a positive missing_input claim from a hand-written Python scanner rather than an AST. The new matrix covers many adversarial shapes, but it does not exhaust valid Python grammar. A human should verify unsupported-expression behavior before treating the claim as fully sound.
- Confirm python missing_input now depends on a second textual call reader whose shadowing, receiver, and callable-reference rules can drift from the AST-backed related-test and oracle authorities.
- Confirm crates/ripr/src/analysis/language/python/row_reach.rs:570 — A project module can expose
pytest.approx, and the scanner trusts the method name from the import spelling alone. The test-module import check does not cover writes through another module, so this can incorrectly retainmissing_inputeven though an indirect owner call may reach the boundary. Prove the receiver remains the real pytest API, or treat an unresolved qualified receiver as unknown.
Refuted
- The change introduces an exploitable memory-corruption primitive.; refuted because: No unsafe or native operation is present; Rust string slicing and byte scanning are used, and the reviewed code does not expose an unvalidated unchecked slice.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
…assignment Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
…main's #8989 test vs #8990 field) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
… as a definition Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX
There was a problem hiding this comment.
Confirmed findings
- A direct owner call inside an assert expression may be skipped by the textual scanner.
- The semicolon statement rule does not match a definition header followed by a semicolon.
- starts_definition_header does not implement its documented semicolon behavior: it examines only the current physical line, so
x = 1; def helper():is not recognized as a definition header. The following helper call is then vetted as a normal callee, but a semicolon-separated definition is still a definition context and should be excluded consistently. Add a regression coveringx = 1; def helper():. (crates/ripr/src/analysis/language/python/row_reach.rs:555).
Verification questions
- Confirm the four updated fixture expected outputs carry Pending CHANGELOG entries, so the repository contains golden diffs without an executed-bless receipt. A human should regenerate them with the documented cargo xtask goldens bless command and verify no drift.
- Confirm the return-comparison golden labels an unrelated exact-value assertion as missing_input.
- Confirm fixtures/python_return_comparison_boundary/expected/CHANGELOG.md:281 — Regenerate the four changed fixture goldens with the repository bless command. These checked-in CHANGELOG entries still say
Pending, so they do not prove that the expected JSON and human outputs were produced by the current producer.
Refuted
- This diff changes a JS-backed worker or async handoff boundary.; refuted because: The diff changes Rust static-analysis code and Python-analysis modules. It contains no JavaScript runtime, worker, event-loop, GC, detach, transferable-object, or thread-transfer implementation.
- The new Python row-reach reader may maintain an active view over a resizable or transferable backing store.; refuted because: No such backing store or memory-transfer API is touched; the implementation reads immutable Rust string slices and does not expose a resizable view.
Evidence gaps
- Fixture expected CHANGELOG files still describe a pending bless operation despite changed golden outputs being committed.
- All four changed fixture changelogs retain Pending bless entries.
- The four changed goldens are committed with pending changelog entries rather than completed bless receipts.
- Model proof intent was rejected by deterministic validation.
There was a problem hiding this comment.
Reporter summary
The strongest issue is that the four changed fixture golden sets were not actually blessed: each expected/CHANGELOG.md still contains a Pending entry, and the late cargo-test receipt timed out after 900 seconds, so there is no completed test or golden-generation proof for this head. A substantive source-route objection also remains: row_reach.rs makes affirmative fail-closed claims using a textual Python reader, but nested calls, comprehensions, lambdas, walrus/conditional expressions, and semicolon-separated definitions are not comprehensively modeled; arguments_are_closed explicitly skips nested-call names on the assumption that the outer scanner will vet them, which is not sufficient for control-flow-sensitive or expression-hidden reachability. The previously reported receiver-rebinding, alias, shadowed-builtin, and foreign-framework-receiver concerns appear addressed in the changed code and regression coverage, but those changes remain unverified because the ripr sensor failed and cargo-test timed out.
left a comment
There was a problem hiding this comment.
Bounded post-landing verification: both P1 findings in review 5632273318 are repaired on final candidate 0f213fef67d584cbd9cb44a16e6e41df5c6d1d12 (tree eb41e28c4c375773b5581076324222b77fa312f3).
Observed source repair: bare safe calls now consult related_tests::builtin_is_shadowed; fixed framework API names now pass after_dot_api_is_trusted. The owner replies at discussion_r4365307427 and discussion_r4365307614 describe the repair and producer regressions. Those test-source additions were inspected; the PR body's 997-test and golden results remain author reports in this bounded verification.
Executed independent proof: built this exact candidate with cargo build --locked -p ripr, native exit 0. Reused nine retained original fixture cases, verifying their Python/config/diff bytes against the prior SHA256 manifest. All nine CLI commands exited 0 with complete analysis, one weakly_exposed finding and two strong rows. All five former mismatches (imported/local/module-defined list; receiver.approx; receiver.assertEqual) now retain miss=None. Ordinary list/sum controls keep missing_input; unknown bare/attribute helpers retain None. Every separate strong direct control still keeps missing_input. Verification driver exit 0. Binary SHA256: 9d743a0e376741976d958bcd27e0fd086ad299c4ddc0626b7679e107b76c9030.
Native Python witnesses were reused, not rerun: unchanged fixture bytes retain the original [(5,3),(4,4)] profile and pass-at->=/AssertionError-at-> discrimination for the repaired cases. Original native matrix SHA256: 18b2e2879a382f392596ee812fca50cf175de36572872a40183052b5f72265fb.
Landing identity: squash commit 72cd9ef2af6bb0515e22c7e533bf322f89f680c2, tree e73a1009f9cf149200b34b4cd5651d17c85402ab; the entire Python analyzer subtree is identical to the verified final candidate (git diff --quiet exit 0). This verifies the original two repairs after landing, not full merge/release qualification.
Review 5636635161 is anchored to this final candidate but its failed sensor/timed-out tests are not completed proof. This targeted producer receipt fills the executable gap for the two original findings only. No concrete residual of either original defect remains in the retained cases; broader grammar/golden questions were not investigated or cleared. No new issue, competing patch, author-branch change or qualification campaign. Prior branch-protection GET denial (403 Resource not accessible by integration) remains preserved without retry.
Governing issue or accepted claim: #5491
Acceptance delta (one sentence): Python related-test rows now carry
missing_inputwhen a Strong row on a predicate-boundary finding has own owner calls that all bind and resolve both compared operands off the boundary (fail-closed, closed-world;no_call_pathstays withheld).What changed
boundary.rs:python_row_boundary_omissioncomputes the omission from one row's own calls (import-resolved owner calls, both operands resolved to literals/declared parameters/module constants, new and, for==, old operands off boundary). The relational path requires the same direction and an identical rest of the line; recursion and wider line edits withhold. Keywords bind only declared, keyword-bindable parameters.row_reach.rs: closed-world reach guard. Only direct import-resolved owner calls; any non-direct owner mention, shadowed builtin, untrusted after-dot receiver, callable passed by reference into a trusted call, or non-plain local argument withholds. Trusted API names bind only toselfon a unittest.TestCase class or the realpytestimport.admission.rs/source_facts.rs/fixtures.rs/repo/evidence.rs: implicit reach (autouse fixtures,pytestmark, setup hooks, star imports, helper defs, conftest) withholds module-wide.row_miss.rs: Strong +ProbeFamily::Predicaterows may getMissingInput; class gate unchanged; onlymisschanges.cargo xtask goldens bless.Proof
cargo xtask precommitexit 0,check-traceabilityexit 0,cargo test -p ripr --lib language::python997 passed;goldens checkhas no drift (only the offlineowner_return_pin_fallible_literalfixture cannot fetch its dependency; hosted CI owns it). Producer-level regression tests pair each withheld shape with a strong direct-control row. Eight independent exact-head reviews, plus the repo owner's review, were addressed.Documented limits (spec): autouse fixture imported by name, import side-effect sidecars,
from conftest import helper,-p/ini/addopts/sitecustomizeplugins, unnamed-shape decorators, attribute writes through other modules.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01MgavuLHJQpW3ywBXBiGzkX