Repository navigation
fix(python): treat a fixture renamed to caplog as an override - #10444
Conversation
collect_fixture_defs now records a fixture whose name= argument is the literal caplog under that public name, so the captured-log readings abstain instead of crediting a recorder that is not pytest's capture. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Md92nb17wXfHAmQNvaWYu3
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 31 minutes. View limit details
Comment |
…tch name= from the parsed keyword (#10418) Review findings on #10444: a later def of the binding must drop a renamed caplog override, and params= text spelling name=caplog is data. Adds a control fixture where the builtin caplog sits beside unrelated fixtures. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Md92nb17wXfHAmQNvaWYu3
…renamed-fixture-10418
|
Review of record, head d05b9b6. Gemini and CodeRabbit were quota-limited; Devin's three findings are the independent angle.
No blockers; merging on green Generated by Claude Code |
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm fixture attachment is driven by the public caplog name recorded for the renamed definition, matching the PR acceptance claim.
- Confirm the detector recognizes fixture decorators through decorator_names and accepts names ending in .fixture, but equivalent imported or aliased pytest fixture registration routes are not demonstrated.
Evidence gaps
- The changed behavior is supported by workspace and honesty-corpus fixtures, but the general cargo-test receipt is still scheduled rather than observed.
- Model proof intent was rejected by deterministic validation.
- The planned ripR sensor failed and cargo-test evidence was scheduled rather than shown, so automated Rust verification for this change is not available in the packet.
|
Answers to the automated verification questions on d05b9b6:
The cargo-test evidence is the required Generated by Claude Code |
wording Inherited combined-tree drift: #10444's caplog-override analysis change interacts with #10426's evidence-legend wording. The match-guard lane cannot affect these fixtures (no match arms in their inputs); carrying the re-bless so the merge gate sees a clean tree. Co-authored-by: Claude <noreply@anthropic.com>
Five wrapper fixtures from this PR, plus the two Python caplog fixtures from #10444 that landed on main without the legend lines. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsF3ov6sfWbX4wmQd5EWeZ
… main drift Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TJm1ic5tVeaxnwQM8c6xmr
…on main's goldens break Byte-identical copies of the two re-blessed fixtures from #10351, the fix of record for the #10444/#10426 crossing. No-op once #10351 lands. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdRXdT9261qDfiBsZW51xs
Byte-identical to the re-bless #10351 carries; main's goldens check fails on python_caplog_builtin_beside_fixtures and python_caplog_renamed_fixture until one of them lands. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FMEkYAqTh9LZtLbF2mzCYW
…check passes on main (#10444 and #10426 crossed) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes
wording Inherited combined-tree drift: #10444's caplog-override analysis change interacts with #10426's evidence-legend wording. The match-guard lane cannot affect these fixtures (no match arms in their inputs); carrying the re-bless so the merge gate sees a clean tree. Co-authored-by: Claude <noreply@anthropic.com>
…0462) * test(python): corpus cases for the property-check forms (rule 25) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TJm1ic5tVeaxnwQM8c6xmr * test(goldens): port the caplog re-blesses for the crossed #10444/#10426 main drift Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TJm1ic5tVeaxnwQM8c6xmr --------- Co-authored-by: Claude <noreply@anthropic.com>
…164 guard-arm) (#10414) * feat(analysis): evaluate exactly resolvable match guards A match arm guard now selects the arm when it evaluates to true over the exact bound inputs and falls through when false, exactly like the Rust match. The guard evaluator is fail-closed: one comparison whose operands each resolve through the shared #3295 evaluator (strings, chars, booleans, plain decimals) or str::len() on an exact string; ordering comparisons are exact for indices only, equality for every scalar. Anything else — boolean combinators, unsupported method calls, unknown operands, mixed types — refuses the whole match rather than guessing. Earns the spec-b-0164-guard-arm corpus row (RIPR-SPEC-0164; lane of match_arm_controls guard-variant probe moves infection_unknown -> weakly_exposed, mirroring the #10196 literal-callee/char moves; the bare-identifier variant stays fail-closed. Spec Behavior, Example #2, controls-fixture note and Non-Goals updated; guards remain a named limitation only in their unevaluable forms. Co-authored-by: Claude <noreply@anthropic.com> * style(analysis): collapse guard-introducer match arm for clippy Co-authored-by: Claude <noreply@anthropic.com> * test(goldens): grace re-bless python_caplog fixtures for #10444 x #10426 wording Inherited combined-tree drift: #10444's caplog-override analysis change interacts with #10426's evidence-legend wording. The match-guard lane cannot affect these fixtures (no match arms in their inputs); carrying the re-bless so the merge gate sees a clean tree. Co-authored-by: Claude <noreply@anthropic.com> * fix(analysis): strip balanced outer parens so parenthesized guards stay exactly resolvable Devin review on #10414: `if (kind.len() > 2)` left parens attached to the operands, downgrading a resolvable match to unknown. Strip balanced outer parens around the whole guard (repeatedly) and around each operand, honoring quotes; unbalanced input stays fail-closed. Also update the module overview, which still claimed every guard refuses. Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
…turn-value finding (#10389) (#10445) * fix(rust): a boolean assert! in a dead context no longer credits a return-value finding (#10389) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes * test(golden): re-bless module_reach_super_import_in_file_tests for the reworded repair-route line (combined-tree drift on main) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes * fix(rust): limit boolean assert! nested-macro credit to known comparison macros in plain #[test] tests (#10389) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes * fix(rust): keep dead contexts visible under nested comparison macros; cache scans; update SPEC-0197 (#10389) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes * fix(rust): refuse nested comparison macros when any other or gated use of the name exists (#10389) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes * test(python): take the caplog golden re-blesses of #10351 so goldens check passes on main (#10444 and #10426 crossed) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes * test(rust): a shadowing use of the comparison macro name withholds credit (#10389) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes * fix(rust): gate a comparison macro import only on attributes attached to its use (#10389) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes --------- Co-authored-by: Claude <noreply@anthropic.com>
…mport (#10460) * fix(python): recognize a fixture declared through an aliased pytest import (#10454) from pytest import fixture as fx (also pytest_asyncio) now registers like pytest.fixture in collect_fixture_defs, in both the plain and the name=caplog paths, so an aliased caplog override abstains and aliased fixtures count for fixture reach. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Md92nb17wXfHAmQNvaWYu3 * test(goldens): re-bless the two caplog fixtures for the #10426 evidence legend lines #10444 merged while #10426 changed the human report; the two caplog fixtures it added still expected the old layout. Outputs are the deterministic bless of current main. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Md92nb17wXfHAmQNvaWYu3 * fix(python): ignore a fixture alias that a later import rebinds; trace fixtures.rs under SPEC-0238 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Md92nb17wXfHAmQNvaWYu3 * test(python): cover the pytest_asyncio fixture alias Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Md92nb17wXfHAmQNvaWYu3 --------- Co-authored-by: Claude <noreply@anthropic.com>
…9845) * fix(rust): withhold gaps for owners reached without a placeable call (#9442, #9443) An owner passed as a function value, generated by an item macro, or called inside block_on / a local Future-polling helper has no call ripr can pair with the assertion. Those read weakly_exposed; they now read static_unknown under the new rust_indirect_owner_call_unresolved limit. comment after the owner's tail no longer defeats the owner-return pin, so shape-hostile-cfg-attr-test credits. Re-blessed: 5 rows (1 credited, 4 limited); no other row moved. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rDKCvewzinJrP5bh5iuSY * fix(rust): review fixes for the indirect-owner limit (#9442) Pattern bindings of the owner's name are locals; a value use counts only in a listed test when a related test already calls the owner; ignored-test and unrelated-binding controls; cache schema bumps; judged-panel kind mirror. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rDKCvewzinJrP5bh5iuSY * chore(xtask): inventory indirect_owner as an is_test_file consumer (#9442) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rDKCvewzinJrP5bh5iuSY * test: follow cache generation 1.91 in the LSP pin, schema examples and boundary_gap snapshots (#9442) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rDKCvewzinJrP5bh5iuSY * fix(rust): cache generation 1.92 on top of the skip-list bump; re-bless the async rows (#9442) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rDKCvewzinJrP5bh5iuSY * test: bind the receipt to the regenerated unchanged-after-attempt snapshot (#9442) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rDKCvewzinJrP5bh5iuSY * fix(rust): a separate cfg_attr(ignore) beside a cfg_attr test is ignored; raise trap floor Review finding: `#[cfg_attr(all(), test)] #[cfg_attr(all(), ignore)]` made the function a live test while `is_ignored` read only a literal `#[ignore]`. `is_ignored` now also reads a known-true `cfg_attr` introducing `ignore`. Adds unit and integration negatives; trap_floor 33 to 35. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FMEkYAqTh9LZtLbF2mzCYW * test(cache): follow file-fact generation 1.46 in the store-failure fixture Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FMEkYAqTh9LZtLbF2mzCYW * test: twin value-only mention now withholds under the indirect-owner limit Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FMEkYAqTh9LZtLbF2mzCYW * fix(rust): leave typed fn-pointer bindings to the typed pointer reading; restore pointer goldens Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FMEkYAqTh9LZtLbF2mzCYW * Keep a sync owner under block_on a gap; leave local executors to the framework rule (#10143) The known-executor shape now needs an async owner and a callee that is not defined in the test's file; trap-weak-oracle-executor-wrapped returns to gap. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FMEkYAqTh9LZtLbF2mzCYW * Withhold a bound-expected value through a Future executor again; align SPEC-0240 A same-file helper that takes a Future is read by the indirect-owner rule (the framework rule needs a literal expectation); the executor shape needs an async owner. Adds the bound-expected control and binds the local block_on test to the two intended limit reasons. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FMEkYAqTh9LZtLbF2mzCYW * docs: describe the function-value form as an untyped binding in all five places A typed fn-pointer binding is left to the typed reading (RIPR-SPEC-0115, #9478). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FMEkYAqTh9LZtLbF2mzCYW * Re-bless the two python_caplog goldens drifted by #10444 crossing #10426 Byte-identical to the re-bless #10351 carries; main's goldens check fails on python_caplog_builtin_beside_fixtures and python_caplog_renamed_fixture until one of them lands. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FMEkYAqTh9LZtLbF2mzCYW * Fix unchanged-after-attempt content commitment for 1.109 snapshots Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FMEkYAqTh9LZtLbF2mzCYW --------- Co-authored-by: Claude <noreply@anthropic.com>
#10467) * fix(agent): preserve executable Windows root spellings (#10116) * test(agent): pin established percent-root behavior without extending verbatim policy * test(goldens): port #10351's caplog re-bless so this PR can go green on main's goldens break Byte-identical copies of the two re-blessed fixtures from #10351, the fix of record for the #10444/#10426 crossing. No-op once #10351 lands. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdRXdT9261qDfiBsZW51xs --------- Co-authored-by: Steven Zimmerman <steven@perllsp.org> Co-authored-by: Claude <noreply@anthropic.com>
Governing issue or accepted claim: #10418 (follow-up to #9546 / #10407), parent #9412.
Acceptance delta (one sentence): A test whose
caplogis supplied by@pytest.fixture(name="caplog")in its module or a conftest no longer has its logged-text check credited or called a gap; it abstains.Why
#10407 made the captured-log readings require pytest's own
caplog, butcollect_fixture_defsrecords only plain fixtures, so a renamed override was invisible and still credited.What
fixtures.rs: a fixture whose decorator has the literalname="caplog"(or'caplog') is recorded under that public name. Other renamed fixtures stay unrecorded (existing behavior and tests unchanged).fixtures_tests.rs:given_a_fixture_renamed_to_caplog_then_the_logged_text_abstainscovers the override through real files and a control where the fixture is renamed to something else (builtin still credited). It fails without the change (checked).python_caplog_renamed_fixture(real conftest,static_unknown).Local:
cargo xtask precommitandcheck-evidence-promotion-honestypass.Generated by Claude Code