Skip to content

fix(python): recognize bounded unittest list equality oracles - #7737

Merged
EffortlessSteven merged 13 commits into
mainfrom
codex/python-unittest-list-equality
Oct 14, 2026
Merged

EffortlessSteven merged 13 commits into
mainfrom
codex/python-unittest-list-equality

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Python preview now recognizes a bounded unittest.TestCase.assertListEqual as an exact oracle for a changed whole-list return, including short numeric elements and ordinary call spellings such as labels (), (labels)() and module-qualified variants. Python-equal changes such as [1, 1] → [1, True] retain a weak finding and an explicit limitation without an invented exact-assertion repair card.

Closes #7312, a narrow leaf of #6585.

Scope

Requires a module-level canonical TestCase, ordinary undecorated self-only method, sole assertion statement, zero-argument imported free-function operand and literal-list expectation. Decoded literal returns must prove unequal lengths or a different same-kind scalar. Mixed scalar kinds, nonliteral/unpaired returns and incomplete multiline changed-line pairs remain conservatively uncredited.

One bounded AST callee identity supplies list-specific relation, operand filtering and module-call alignment. Import authority, rebinding vetoes, method exclusions and recursive rejection of derived callees remain. Effectful/nested/derived shapes remain static_unknown; malformed changed owners retain partial-analysis evidence. Generic textual call matching, general diff/CLI selection, shared rendering/routing and ranking baselines are unchanged.

Eight regression functions, five source-derived fixtures and four independent honesty rows cover the claim. Governing contracts: RIPR-SPEC-0028, SPEC-0238 and SPEC-0108. Changelog: changelog.d/7312-unittest-list-equal.md.

Provenance and validation

Pinned CPython v3.14.0 commit ebf955df7a89ed0c7968f79faec1de49f61ed7cb: assertListEqual implementation and testEquality. Fixtures and literal expected values were independently authored; native interpreter Python 3.12.14. Full provenance and limitations: fixtures/python_unittest_list_equal/ORACLE.md.

  • Real pre-repair CLI RED and repaired CLI GREEN, native correct/wrong implementations with nonempty test counts, assertion-removal, unrelated/fake-receiver, duplicate-method, equality and advisory-card mutation controls are retained.
  • Devin's ordinary-call spelling finding was reproduced on exact 61550c5 and repaired. The same literal verifier rejects that executable and accepts final d05.
  • Eight focused regressions, all 570 Python adapter tests, all 410 goldens, honesty and dogfood pass. Golden drift is confined to the positive fixture's three oracle-text fields and blessing record.
  • Final d05 precommit and check-fast both exit 0; 15 gates and 59 independently matched paths against base 872eb81f28a3f363abe27c3cdb88f223f12d8b82. Actual final-head CLI passes all nine literal cases after the policy rebuild, native exit 0, SHA256 fdbce8ecaae5511869b59117dfef583acc1b5d23b77584932f5f95e314d4a989.
  • Hosted qualification run 38490263675 completed successfully at 2026-10-14T01:21:18Z for head d05a06a8abf580e90d4db447d8108669ad96a335. Actual Rust job 115613622113 logs check out baa78fb8697a4f3667299332c3ad4a6586101a16, parents c96a7929f8c694eb62cff2dbe2ad7ee94beea815 + d05, tree d836ffcfb6e7ec1c8f36463cb4d225314a3e43c4. All eight leaf regressions pass individually; totals: 15,435 tests passed, 2 skipped; 2 doctests passed, 1 ignored. Policy, Clippy, all-feature checks, goldens, fixture contracts, verdict corpora and PR evidence steps succeeded.
  • Final live enumeration: 41 check runs, 21 successful and 20 skipped; none failed or nonterminal. Both finding threads are resolved. Skipped or quota-limited provider output remains missing provider evidence.

Independent LLM source, oracle, generated-output and integration reviews found no actionable blocker. The pre-Ready exact-head review record and post-merge currentness verification preserve evidence and limits. The PR used Draft for the joined repair wave and returned to Ready at 2026-10-14T00:27:15Z.

Delivered state and limits

PR_MERGED: GitHub records EffortlessSteven merging at 2026-10-14T01:28:08Z as ff4a2fcd6fac21a93b8fb04f1b0befc80311a601. The final verification pass observed the completed merge and made no merge or auto-merge call.

Landed parent: 43257ab95a483eabd9338bc5e5034d872cc0ee70; landed tree: f5e1e793376fa50f029db34c6b1ee6015fa54717. Native Git composition of that parent with reviewed d05 produces exactly the landed tree; the 59-path squash delta matches the candidate path set. Main advanced after qualified baa, so this is landed-content verification, not execution of every source file on ff4. Independent applicability review found the implementation, eight regressions and five fixture trees unchanged, with no material effect from intervening classmethod, deletion-continuation or disabled-language-advice changes.

The earlier live gh api repos/EffortlessMetrics/ripr-swarm/branches/main/protection/required_pull_request_reviews read returned Forbidden. That route remains stopped and was not retried. This executor did not acquire protection-policy authority; merge metadata does not prove enforcement details. No bypass or settings change occurred. This audit gap is retained separately from the observed merge and successful qualification.

Malformed test indexing remains a pre-existing limitation outside this leaf. Parent #6585 remains a broader claim. Rollback: revert this leaf's oracle/alignment changes together with its evidence, specs, traceability and changelog.

Resource closeout: the single clean source worktree/common Git and all source/proof receipts remain. Target cache, toolchain and the three distinct RED executables were released only after all 34 archive chunks were extracted and verified; the actual final d05 CLI is archived too. All archive hashes were rechecked. Free space rose from 25,522,847,744 to 29,935,554,560 bytes (4,412,706,816 bytes net); the original 19,148,419,072-byte stop floor and 12 GiB cumulative growth budget were preserved. An initial symlink-timestamp verification failure stopped before any toolchain original was released; corrected restoration then completed with native exit 0. Manifest and executable-to-archive mapping: /workspace/ripr-proof/resource-closeout.json. Restore: python3 /workspace/ripr-proof/recoverable_closeout.py --restore. No active expanded-cache consumer remains.

Owner: Codex source thread 01a0f5ca-1f3e-7133-89f1-64b544b500c0 / #7312. Receipts: /workspace/ripr-proof/spaced-call/{hosted-success-receipt.json,hosted-rust-success-excerpt.log,landed-tree-verification.json,final-policy-wording/}.

@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 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Summary by CodeRabbit

  • New Features
    • Python analysis now recognizes qualifying unittest list-equality assertions as strong evidence that a changed list result is observed.
  • Bug Fixes
    • Avoids treating unsupported, modified, skipped, nested, or derived-result assertion cases as proof that a change is exposed; these remain uncertain in reports.

Walkthrough

The Python analyzer now recognizes a bounded form of unittest.TestCase.assertListEqual as strong exact-value evidence when it observes a whole returned list. Tests and fixtures cover valid assertions and cases that must remain unknown.

Changes

Python unittest list-equality oracles

Layer / File(s) Summary
Bounded assertion recognition
crates/ripr/src/analysis/language/python/oracles.rs, crates/ripr/src/analysis/language/python/oracles/unittest_list.rs, docs/specs/RIPR-SPEC-0028-python-preview-static-facts.md, docs/specs/RIPR-SPEC-0238-python-oracle-and-reach-rules.md, changelog.d/7312-unittest-list-equal.md
Adds eligibility checks for unittest classes and methods, recognizes a sole literal self.assertListEqual call with a static zero-argument owner call, and promotes that bounded form to strong exact-value evidence.
Test collection and owner alignment
crates/ripr/src/analysis/language/python/owners_tests.rs, crates/ripr/src/analysis/language/python/source_facts.rs, crates/ripr/src/analysis/language/python/sink_alignment.rs
Passes unittest eligibility through synchronous test collection, disables it for async and inherited-mixin tests, withholds modified oracles, and filters alignment by owner observation and test source line.
Positive classification and fixture
crates/ripr/src/analysis/language/python/classify/tests.rs, .ripr/traceability.toml, fixtures/python_unittest_list_equal/*
Adds positive classification cases and a CLI fixture that expects exposed classification for a changed list element observed by assertListEqual.
Unsupported-case controls and evidence
crates/ripr/src/analysis/language/python/classify/tests.rs, fixtures/evidence-promotion-honesty-corpus/corpus.json, fixtures/python_unittest_list_equal/ORACLE.md, fixtures/python_unittest_list_equal_effectful_argument/*, fixtures/python_unittest_list_equal_nested_class/*, fixtures/python_unittest_list_equal_derived_result/*
Adds controls that retain unknown results for effectful arguments, nested test classes, derived owner results, and other unsupported assertion paths. The oracle record describes the evidence and its limits.

Priority: ⬇️ Low

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant TestImportContext
  participant collect_assertions_from_statements
  participant unittest_list
  participant sink_alignment
  TestImportContext->>collect_assertions_from_statements: pass standard unittest eligibility
  collect_assertions_from_statements->>unittest_list: check eligible class, method, and literal assertion
  unittest_list-->>collect_assertions_from_statements: return bounded recognition result
  collect_assertions_from_statements->>sink_alignment: provide assertions
  sink_alignment->>unittest_list: check whether the assertion observes the owner
Loading
Merge Risk: 🟡 Moderate · up to 50c3b

The analyzer can report a Python list change as detected by a test that passes for both versions. Correct the equality check before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 34.38% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 32 functions across 15 files. (33 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Issue #7312 is the active direct target. The PR adds bounded assertListEqual recognition for an eligible module-level unittest.TestCase method, a direct zero-argument imported call, and a literal …
Out of Scope Changes check Passed The changes stay within issue #7312. Production changes affect Python oracle extraction, test context, source facts, and sink alignment. The added tests, fixtures, specifications, traceability, oracle…
Title check Passed The title clearly and concisely identifies the main change: bounded recognition of Python unittest list-equality oracles.
Description check Passed The description provides detailed scope, proof, provenance, limitations, rollback, integration status, and pending CI details. However, it does not follow the repository template structure and omits e…
Full details: Docstring Coverage

Explanation

Docstring coverage is 34.38% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 32 functions across 15 files. (33 skipped: 33 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the lists in rows
And marks the bounds that each one knows
If calls are clear, strong clues appear
If paths are strange, the answer’s unclear
The burrow keeps both truths in view

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]

This comment was marked as resolved.

@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.

Refuted

  • Active-view/resizable-buffer concerns apply to this Python oracle PR; refuted because: Diff exclusively modifies Python preview oracle extraction (oracles.rs, oracles/unittest_list.rs, owners_tests.rs, sink_alignment.rs, source_facts.rs) and adds fixture JSON; no Rust array/slice resize, no JS ArrayBuffer/TypedArray, no allocator boundaries introduced.
  • literal_call's two-arg assertion list could allocate or copy large literals and behave like a worker-handoff transfer target; refuted because: Python lists are represented as rustpython_parser AST nodes (Expr::List of Expr::Constant), parsed once into the existing module AST. There is no Vec that escapes the parsing call, no SharedArrayBuffer analog, and no clone used by literal_call itself. The string repr reused by literal_text is the only allocation and is consumed synchronously by classify_case.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

@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.

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • Python-equality mixed scalar edge cases (e.g. 2 vs True, large int vs rounded float) stay conservatively uncredited; spec and tests document this but no fixture pins each individual case.

Verification questions

  • Confirm method/class owners are explicitly excluded by observes_owner; classmethod/static/instance attribute chains are bounded. Sibling property/descriptor helpers and decorator-based parameterization remain outside the bounded path.
  • Confirm oracles.rs collect_assertions_from_statements mutates first assertion's kind/strength/shape when standard_unittest_list and the single-statement body matches a bounded assertListEqual call. This ADT promotion in a 'collect' function is a side effect beyond collection, blurring the helper's responsibility contract.

Refuted

  • literal_change_discriminated allocates and retains a Vecast::Constant whose lifetime depends on a parser-owned Mod; potential use-after-free if a caller retains the vector beyond the call.; refuted because: Each call to source_facts::parse_module_result takes a borrowed &str text and an owned &Path, returns an owned Mod<...> with no ties to outside memory. The function-local Vecast::Constant is built from constant.value.clone() on Expr::Constant nodes inside the local Mod and is consumed entirely within the zip + early return; nothing returns, leaks, or escapes the function. Same reasoning applies to literal_return, which only consumes the parse and drops it on return. No new borrowed alias or shared ownership is introduced.
  • Two-arg assertion list literal could allocate large structures and resemble a worker-handoff transfer target; refuted because: Lists are Expr::List of Expr::Constant AST nodes parsed once; no Vec is cloned, no SharedArrayBuffer analog exists, and allocation lifetime is synchronous within classify_case. Diff has no transfer or detach boundary.
  • assertTupleEqual/assertSetEqual/assertCountEqual should be promoted alongside assertListEqual in this PR; refuted because: PR body and ORACLE.md scope to #7312 narrow leaf; tuple/set/counter equality has different element semantics; SPEC-0028/0238 deltas only mention assertListEqual; parked, not blocker.

Parked follow-ups

  • effectful/nested/derived/rebinding controls each map to a dedicated honesty-corpus row with must_not_promote + static_unknown/unknown; no sibling call shape was left unaccounted for among the surfaces enumerated by eligible_class, eligible_method, literal_call, observes_owner and withhold_modified_oracles.
  • Bounded scope: oracles.rs adds only an assertListEqual unknown row; assertTupleEqual/assertSetEqual/assertCountEqual are untouched and outside this leaf's bounded evidence per #7312/#6585 framing.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

@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

  • Equivalent-value positive fixture (python_unittest_list_equal_equal_values) depends on literal_change_discriminated decoding both old and new returns through literal_return re-parse. Old return is supplied via classify_change_for_owner diff lines; if the diff text includes statement continuation (e.g. line-joined literals) the decoder returns None and credit is silently withheld rather than flagged.

Verification questions

  • Confirm ripr sensor failed exit code 2 in this packet; cargo-test is scheduled-late without a receipt. Red/green claim rests on prior composed head evidence and honesty corpus, not a fresh sensor run this PR.
  • Confirm reopened: [1, 1] to [1, True] must not be credited; literal_change_discriminated handles this by requiring unequal lengths or a same-kind scalar difference.
  • Confirm collect_assertions_from_statements now mutates the first assertion's kind/strength/shape when standard_unittest_list is true and the body is one bounded assertListEqual call. Side effect inside a 'collect' helper blurs the responsibility contract documented in existing reviewer's confirmation question.
  • Confirm sibling path not traced: dotted callee rebinding against a module-qualified free function (e.g. from mod import Owner then Owner() rebinding). observes_owner uses oracle_operand_calls(text, callee); if callee resolution does not strip leading module segments, observation may under-credit.

Refuted

  • JavaScript Worker/postMessage, SharedArrayBuffer, ArrayBuffer.transfer, and Pyodide/Emscripten heap crossing surfaces are not introduced or modified by this diff. The PR is a Python preview oracle leaf with Rust classifier changes only.
  • Adding new array/slice allocations in the Python oracle promotion path creates a use-after-free hazard analogous to a resizable buffer detached across workers.; refuted because: Diff only adds Vecast::Constant for decoded scalar constants inside a synchronous classifier call. No buffer is shared with another thread, worker, or async task; no detach/transfer analogue exists in Rust + rustpython_parser.
  • literal_call's two-arg assertion list could allocate or copy large literals and behave like a worker-handoff transfer target on a shared active view; refuted because: Refuted: Python lists are rustpython_parser AST Expr::List of Expr::Constant parsed once into the existing module AST. No Vec escapes the parsing call, no SharedArrayBuffer analog, and no clone used by literal_call itself. The string repr reused by literal_text is allocated and consumed synchronously by classify_case.
  • observes_owner excludes Method and ClassMethod owners entirely as a 'visible owner rebinding cannot supply sink alignment' guard, even when literals match and rebinding is absent, contradicting the PR body's 'classmethod/static/instance attribute chains are bounded' framing and possibly over-bounding.; refuted because: The exclusion is a conservative safety guard that the equal_values regression indirectly supports but no fixture exercises the negative case for a method-bodied owner. This is intentional belt-and-suspenders inside a preview/bounded path, matching the existing 'broader assertion forms remain explicitly limited' spec clause; reviewer-bounded-by-design is acceptable for a preview adapter. Not blocking, parked as scope-control follow-up to add a fixture if regression appears.
  • The collect_assertions_from_statements promotion to ExactValue/Strong/ExactAssertion for the first assertion in a single-statement body could silently promote a non-assertListEqual assertion if standard_unittest_list is true and method shape matches but body is unrelated; refuted because: The promotion is gated by four layered checks before mutation: (1) standard_unittest_list flag from owners_tests.rs requires eligible_class returning true (single canonical TestCase base, no extra bases/keywords/decorators, only test_* methods or string constant statements, and matching unittest import); (2) eligible_method requires self-only args, no decorators, no varargs/kwargs; (3) body must be exactly [Stmt::Expr(_)] with Expr::Call and literal_call passes (which independently requires assertListEqual on self with 2 args, Expr::List of Expr::Constant, and zero-arg owner call); (4) out.first_mut() only mutates the first assertion which was already collected. Mutation only happens when all four preconditions hold, so unrelated bodies do not trigger promotion. The 18-row withholds_unresolved_or_nonobserving_calls test matrix plus eligibility tests cover boundary exhaustively.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

Parked follow-ups

  • AdT promotion in collect_assertions_from_statements mutates first assertion kind/strength/shape; borrow scope is local and no shared view is widened; function remains single-responsibility within its parameter pack.

@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.

Disposition: REVIEW_INCOMPLETE — no actionable source, oracle, generated-output or integration finding remains on 61550c57f9a092dfb5e24967fd55f4f7bdb4f168 (tree 8cd295fd14318a764004e0507a2f9a9a5940738e). Hosted qualification and live protection authority remain separate open dimensions.

This is the delivery owner's accountable COMMENT incorporating independent LLM review by /root/list_oracle_review, not self-approval. Independent review inspected the admitted TestCase/method identity, same-row free-owner operand, rebinding downgrades, all alignment branches, decoded literal equality, independent expected values, and actual JSON/human repair consumers. Accepted effectful/nested/derived/duplicate-declaration/equality/card findings are repaired. The final one-line test-only deletion removes an analysis-to-output dependency; actual CLI and corpus card controls remain.

Proof: baseline behavioral RED; seven focused regressions; 569 Python adapter tests; five actual CLI outcomes; 14 native runs with one unittest each; 410 goldens; honesty and dogfood; unchanged corpus checker rejects the retained actual bad advisory card (exit 1, forbidden verify command), then accepts restored hash-verified output (exit 0). Executable production proof is 0cd2b37, SHA256 24879894ab632eb5b89e2757985a6be9a685f691e32498075e0847e5bf2b265e; final production bytes are unchanged. Final-head cargo xtask precommit and cargo xtask check-fast both passed with observed native exit 0; terminal reports agree. Check-fast ran all 15 gates over 58 paths, independently matched to the Git merge-base diff and precommit selector. Final-head CLI revalidation also passed all five outcomes and the no-invented-guidance/card assertions; binary SHA256 99c30f7251709da9098f9537b5c1b4b2a6a354d0a085fc445feec52654807f00.

Live review triage:

  • CodeRabbit 4264694290: reproduced, repaired, reply 4264980212 verified, thread read back resolved. Aggregate bot status is not substituted for substantive review.
  • github-actions 23:11 mixed-number concern: classify/tests.rs::unittest_list_equal_requires_changed_python_literal_value explicitly pins 2/True and large-int/rounded-float to WeaklyExposed/Weak/Strong without typed repair guidance. The large mixed pair also has native before=1/after=0 with one registered test each; 2/True is unit-pinned. One fixture per scalar pair is nonblocking coverage expansion beyond the promised bounded support.
  • Owner question: observes_owner rejects Method and ClassMethod, including extracted static methods. Class owners cannot pass the mandatory old/new literal-return-list gate; method return edits select the narrower method owner.
  • Collection question: promotion changes only local collected evidence under canonical class/method and single-statement guards. Rebinding downgrades, admission, owner alignment and literal-value discrimination still govern exposure. No demonstrated correctness defect.

The later github-actions 23:29 review was also dispositioned independently. Real final-head CLI controls for implicit and explicit-backslash multiline returns each yield one weakly_exposed/strong/weak finding, an explicit cannot-establish-list-equality warning and no card. This is bounded decoding support, not a silent or clean result. Established owner_module_callees import/module authority rejects locally rebound aliases; observes_owner additionally rejects root rebinding and owner-attribute writes. An imported class named Owner is outside free-function credit. The review packet's missing/scheduled-late sensor receipt is not treated as proof; fresh final-head CLI exits and both final native policy exits are now observed. The 1/True reopening is covered by the repaired equal-values CLI/corpus control.

Actual fetched GitHub merge subject ef2dcda05bd09157fbac568224860c03cc0a4ca3, parents 6f9537a2349d5d448261938daf9954e0ed2e9b24 + reviewed head, tree 6d032c1e725b332feac35aacb25113882fb7e2c2, was independently inspected. New-main tests.py discovery/optional handwritten paths preserve this leaf's paths/config; subsequent Rust-arm and calibration changes have no identified applicability. No behind-only restack or unrelated full local graph is warranted. Actual hosted checkout/results must still be established.

Live classic required-review acquisition returned Forbidden at repos/EffortlessMetrics/ripr-swarm/branches/main/protection/required_pull_request_reviews; that route remains stopped. Protection is unknown, not absent. No merge/auto-merge readiness claim.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 13, 2026 23:40
@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!

@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 1 potential issue.

Devin Review

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 13, 2026 23:46

@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.

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • ripr sensor exited Some(2) without a receipt; cargo-test is scheduled-late but not yet landed. No security conclusion should assume fresh end-to-end CLI evidence for this PR. Re-run cargo test --locked --package ripr --test unittest_list_equal and the ripr binary against all five new fixtures before approval.

Verification questions

  • Confirm literal_change_discriminated re-parses 'return ...' via parse_module_result, returning false on statement continuation, missing prefix, or non-literal elements; the equal-values fixture's diff.patch only changes the literal so this is silent-withhold, not a crash.
  • Confirm alignment_units keys assertion expansion on test.line in addition to file/name. Two module-level classes with same name+file+line would conflate. ORACLE.md calls out duplicate method names across two classes; line-tie resolves it. No regression pins the line-tie invariant explicitly.
  • Confirm ripr sensor failed exit 2 in this packet and cargo-test is scheduled-late without a fresh receipt; red/green claim rests on prior composed head evidence and honesty corpus, not a fresh sensor run this PR. Verify the actual successor merge subject yields identical SHA-256 outcomes before Ready.

Refuted

  • literal_change_discriminated allocates and retains a Vecast::Constant whose lifetime depends on a parser-owned Mod; potential use-after-free if a caller retains the vector beyond the call.
  • literal_change_discriminated and literal_callee allocate parser-owned AST that could escape across worker/async boundaries or detach under GC.; refuted because: The new helpers are pure synchronous AST analysis: parse_module_result returns a Mod whose body is pattern-matched inline; any Vecast::Constant is consumed and dropped at function return. No JS-backed memory, no SharedArrayBuffer/TypedArray/Worker/MessagePort analogues exist in this Rust crate; nothing crosses a thread or async boundary.
  • literal_text re-parses attacker-controlled &str into ast::Constant vectors that live as long as the diff/patch text; an oversized list could trigger unbounded allocation in the parser (DoS primitive via diff).; refuted because: literal_return only accepts Expr::List of Expr::Constant with module.body == [Stmt::Expr(_)]; the parser is the same rustpython_parser already trusted for oracle input paths; allocation is bounded by literal length and yields None on syntax/structure mismatch, not panic. No unbounded-string sink added.

Parked follow-ups

  • owner_module_callees and oracle_operand_calls remain the only textual owner-call routes; observed_unit_filter no longer relies on 'callee(' textual match because literal_text/literal_callee gate reach, but classify_change_for_owner still calls body_calls_owner/exception_assertion_calls_owner first; ensure no shadow path retains a weak false positive.
  • collect_assertions_from_statements mutates first assertion's ADT after collection; helper name implies pure collection. Only the list-oracle path triggers it today. Prior reviewer flagged this as a contract blur.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.
  • Native one-test red/green on independent literal sources and CLI SHA-256 receipts are asserted by author but not witnessed by this lane; cargo-test is scheduled-late and ripr sensor failed exit 2.

@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.

Disposition: REVIEW_INCOMPLETE on d05a06a8abf580e90d4db447d8108669ad96a335, tree 8fd0dc6afe81ac474d12a02cac366ced11f3c88e. No remaining actionable source, oracle, generated-output or inspected integration finding. Actual hosted qualification and live protection authority remain open; this is not merge readiness.

This accountable author COMMENT incorporates independent LLM review by /root/list_oracle_review. It refreshes the previous615 review for the accepted Devin whitespace finding and all affected implementation, oracle, generated-output and integration dimensions.

Production: the bounded AST callee identity now serves list-specific related-test relation, operand filtering and module-call alignment. The recursive static-callee gate precedes name extraction. Exact import authority, root/attribute rebinding vetoes, method exclusion and decoded literal-equality discrimination remain intact. Non-list shapes cannot enter the new relation fallback. Generic call matching, general CLI/diff selection and ranking baselines remain unchanged. Seven spelling/import positives and seven rival/rebound/derived/subscript negatives challenge these seams.

Observed proof:

  • Native plain, spaced, parenthesized and spaced-dotted call witnesses each discover one unittest: correct [1,2] passes and wrong [1,1] fails. The unchanged independently literal CLI verifier rejects the retained actual615 executable (behavioral exit1) and accepts the repaired executable (exit0), with nonempty findings.
  • Eight focused regressions and all570 Python adapter tests passed before the e4cc source commit. All four tested Rust blobs matched that commit and final8bc; d05 changes one comment word only. No claim that those test commands ran on a later commit.
  • All410 goldens, honesty and dogfood pass. Generated drift is only the existing positive fixture's three assertion-text fields and blessing record. Equal-value findings still retain weak/strong/weak and no invented guidance/card; unsupported controls remain static_unknown. Prior real bad-card corpus mutation red1/restored green0 remains applicable.
  • Finald05 precommit and check-fast both completed with native exit0. Reports bind head/base; independent Git comparison matches all59 selected paths against base872eb81f28a3f363abe27c3cdb88f223f12d8b82. Check-fast ran15 gates. Precommit has no skipped/limited commands; its ripr/xtask scoped Clippy passes, as does check-fast's existing workspace Clippy.
  • Actual finald05 CLI, version naming the complete head, SHA256 fdbce8ecaae5511869b59117dfef583acc1b5d23b77584932f5f95e314d4a989, passes the unchanged nine-case literal verifier with native exit0 after policy rebuild. Four spellings plus all five permanent fixtures match independent verdict/strength/discrimination tuples. No fabricated typed guidance/card is emitted for equal values.

Devin4265245398 is reproduced/repaired, final published reply4265407339 verified, and thread independently read back resolved. The latest github-actions00:17 review is dispositioned: its sensor exit2/no receipt and scheduled-late request remain provider-specific missing proof, not a clean sensor result. The suggested integration target does not exist; these regressions are actual library unit tests. unittest_list_equal_keeps_duplicate_method_declarations_distinct explicitly pins file/name/declaration-line identity in both class orders; retained real CLI RED/GREEN also demonstrates it. Multiline controls retain a nonempty weak finding, explicit limitation and no card. Approximate generic relation does not bypass the list-specific owner guards before credit. No new source counterexample was established. Fresh final CLI evidence is observed independently of that provider; executable hashes from different source identities need not match.

Actual fetched GitHub merge subject baa78fb8697a4f3667299332c3ad4a6586101a16 has parents c96a7929f8c694eb62cff2dbe2ad7ee94beea815 + reviewed d05 and tree d836ffcfb6e7ec1c8f36463cb4d225314a3e43c4. Independent read-only review found the new shared TS snapshot metadata does not change Python routed sets, lookup or bounded reads; Python does not consume the new accessor and routing is unchanged. The remote successor differs from reviewed8bc merge0ffd only by the comment word. No material prerequisite, conflict or behind-only restack is identified. This is inspected remote-tree evidence, not executed combined-tree or hosted checkout proof.

Fresh live readback: d05 is unchanged/Draft, both review threads resolved, no later material review, no observed failed draft workflow. Rust-only feature lane remains running; Security, Windows Advisory, Source of Truth, Printed Command Paste and read-only wheel runs pass. Droid is pending; no unavailable provider is called clean. Ready will request normal exact-head qualification once; old run38485691835 remains615-only.

The recorded live classic protection query returned Forbidden. That route remains stopped without retry, snapshot, alternative credential or bypass. Actual policy authority and hosted checkout/results are still required before protected merge or auto-merge.

Local receipts: /workspace/ripr-proof/spaced-call/{source-bound-tests.json,final-source-applicability.json,qualification-receipt.json,remote-merge-subject.json,final-policy-wording/}. Pinned provenance and limitations remain in fixtures/python_unittest_list_equal/ORACLE.md.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 14, 2026 00:27
@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!

@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.

Substantive Review Record (review-pr)

  • reviewed_head_sha: \d05a06a8abf580e90d4db447d8108669ad96a335\
  • integration_basis: \main\ (clean mergeable)
  • claim_boundary: Recognizes bounded Python unittest list equality oracles (\�ssertListEqual\ on list literals and owner calls, including spaced and parenthesized calls) with strict alignment to the mutated return expression.
  • changed_surfaces_and_semantic_owners_inspected:
    • \crates/ripr/src/analysis/language/python/oracles/unittest_list.rs: bounded AST-based callee identification for list assertion oracles, handling spaced calls, parenthesized invocations, and nested method calls while enforcing strict element-level equality checks.
    • \crates/ripr/src/analysis/language/python/related_tests.rs: shared static-callee validation without premature drop of spaced calls.
    • \ ixtures/python_unittest_list_equal_*: comprehensive fixture corpus covering simple, spaced, nested class, and unequal expectation fixtures.
    • \changelog.d/7737-python-unittest-list-equality.md\ and specs: documentation and changelog records.
  • blocking_findings: None. All review threads (including Devin and CodeRabbit findings on spaced calls and nested classes) are fully addressed and verified.
  • non_blocking_suggestions: None.
  • refuted_or_stale_findings: None.
  • proof_and_ci_observed: All checks passing; \Ripr Rust Small Result\ completed with SUCCESS; \Rust-only feature lane, \paste-*, and Python wheel qualifications succeeded; zero merge conflicts.
  • proof_or_review_missing: None.
  • affected_currentness_dimensions: Python preview oracle extraction and static exposure classification for unittest list assertions.
  • residual_assumptions_and_non_claims: Remains scoped to preview Python adapter; does not claim arbitrary expression evaluation outside bounded literals.
  • disposition: REVIEW_READY

@EffortlessSteven
EffortlessSteven merged commit ff4a2fc into main Oct 14, 2026
42 checks passed
@EffortlessSteven
EffortlessSteven deleted the codex/python-unittest-list-equality branch October 14, 2026 01:28

@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.

Post-merge currentness verification for reviewed head d05a06a8abf580e90d4db447d8108669ad96a335. Live GitHub already records this PR merged at2026-10-14T01:28:08Z by EffortlessSteven as ff4a2fcd6fac21a93b8fb04f1b0befc80311a601; this pass did not perform the merge.

Observed hosted proof: run38490263675 completed successfully at01:21:18Z. Actual Rust-gates job115613622113 logs check out baa78fb8697a4f3667299332c3ad4a6586101a16, parents c96a7929f8c694eb62cff2dbe2ad7ee94beea815 + d05, tree d836ffcfb6e7ec1c8f36463cb4d225314a3e43c4. The log individually records all eight unittest_list_equal regressions passing. Total nextest:15435 passed,2 skipped; doctests:2 passed,1 ignored. Policy, Clippy, all-feature checks, goldens, fixture contracts, verdict corpora and PR evidence steps succeeded. Fresh live enumeration returns41 check runs:21 successful and20 skipped, none failed or nonterminal; no unresolved threads. Skipped provider output is not called independent review.

Landed-content verification: fetched main is ff4, whose sole parent is 43257ab95a483eabd9338bc5e5034d872cc0ee70 and tree is f5e1e793376fa50f029db34c6b1ee6015fa54717. The 59-path squash delta exactly matches the candidate path set. Native Git composition of parent43257 + d05 produced exactly that landed tree; this validates content, not runtime execution. Main advanced after the qualified baa subject, so the two trees are not conflated.

Independent LLM applicability review confirmed the list helper, oracle promotion, classifier/alignment/source facts, all eight regressions, five fixture trees and repair-card consumers are unchanged. Four negative honesty rows remain intact. The intervening classmethod-effect changes do not affect this free-function path; deletion-continuation processing skips its paired return lines; disabled-language advice is outside enabled Python fixtures. No material composition defect found. Original literal red/green, native controls and finald05 local proof remain applicable. The actual changelog is changelog.d/7312-unittest-list-equal.md; derived/nested call results remain unsupported, not newly admitted.

Disposition: PR_MERGED; candidate qualification and landed-source integrity verified. This is a post-merge verification, not a retrospective claim that all source on ff4 was executed or that this executor acquired protection policy. The prior live branches/main/protection/required_pull_request_reviews read returned Forbidden; that denial remains preserved and the endpoint was not retried. Merge metadata alone does not establish enforcement details. No bypass/settings change or additional merge attempt occurred in this pass.

Issue7312 is already closed. Parent6585 remains a broader claim; this leaf does not close it. Local receipts: /workspace/ripr-proof/spaced-call/{hosted-success-receipt.json,hosted-rust-success-excerpt.log,landed-tree-verification.json}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

analysis(python): recognize unittest assertListEqual whole-list oracles

1 participant