Repository navigation
fix(rust): a comparison macro import must name the macro as a direct item of its crate (#10389) - #10494
Conversation
…item of its crate (#10389) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes
…10389) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes
|
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 30 minutes. View limit details
Comment |
…nd-to-end deeper-path case (#10389) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes
There was a problem hiding this comment.
Decision
- Needs one test-proof clarification before upstream.
Verification questions
- Confirm the PR's cited focused test commands provide the intended red/green proof, but the final cargo-test receipt is not yet present in the packet.
Refuted
- The new direct-item parser creates a worker/async handoff, ownership-transfer, GC, or detach risk.; refuted because: The diff only parses Rust source text into a BTreeSet and compares synchronous admission-test inputs. It adds no threads, tasks, callbacks, native handles, shared ownership, or transfer operations.
- The change could create a denial-of-service or crash through malformed use-tree parsing.; refuted because: The parser operates on already-collected lexical use trees and uses bounded string operations; no unbounded recursion, indexing, allocation loop, panic path, or attacker-controlled external input was introduced in this diff.
Parked follow-ups
- The change does not implement Rust scope resolution; matching is intentionally lexical and the PR claim boundary excludes unrelated-module use statements.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- Full test execution remains pending because cargo-test was scheduled late and the ripr sensor failed with exit code 2; this limits assurance that unrelated classifier paths retain their prior behavior.
|
Review of record for head ffa5c98. This PR only narrows a lexical import check from #10445, so the review is by angle on that diff.
Open threads all have a fix or an evidence-backed reply. Merging. Generated by Claude Code |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Independent exact-head follow-through (2026-10-26 UTC). No actionable source findings emitted within the assigned lexical scope.
reviewed_head_sha: ffa5c98e670b2d8fc3df387024ff5313bf833a0b
integration_basis: PR base acc616cf18d3d582de1bdee526e75b1315dd4c15; hosted merge-test object e814b84470558cdd58c2e6e0037bc671cbf05d70.
landing: GitHub already reported this PR merged at 00:19:50 UTC as 7963cfc73dff12c6c09081acc115aa519fa23b6c before this review began. This pass performed no merge, branch edit, CI request, or external-agent contact.
Inspected surfaces and semantic owners:
- All four changed files, including the final successor's
imported_comparison_macros, its unit rows, the added analyzer integration case, and the changelog. - Followed the imported-name set through
nested_macros_are_known_comparisonsinto theMacroOperandExitarm ofadmits_assertion_family. Return-value admission still requires the other exit-token, attribute, definition-ambiguity, and per-assertion context gates. - The final guard rejects a group containing either brace before comma splitting. Thus
float_cmp::{inner::{x, approx_eq, y}}cannot expose the middleapprox_eqtoken as a direct item. The dedicated negative unit row is present, alongside deeper-path and nested-without-comma negatives and direct/flat-group positives. As a source-level oracle challenge, removing that brace guard would split the example intoinner::{x,approx_eq,y}and contradict the negative assertion. This walkthrough is not a locally executed mutation test. - The added
deeper_path_use_of_the_macro_nameintegration case goes throughcheck_workspace, requires a return-value finding, and asserts it receives neither exposed nor weakly_exposed credit. The comma-nested control itself is helper-level, not a separate analyzer integration case.
Observed exact-head proof:
- Qualification run 40245188753, attempt 1 has API
head_sha=ffa5c98e670b2d8fc3df387024ff5313bf833a0b. The actual Rust job checked out the merge-test object above. - Rust gates job 121325454550: both import tests and the boolean nested-macro integration test passed; nextest reported 21,644 passed, 5 skipped. All-features check, strict workspace Clippy, evidence-promotion honesty, golden/fixture contracts, and all four verdict corpora completed successfully. Doctests: 2 passed, 1 ignored. Corpus success means its configured thresholds passed; it does not mean zero known false verdicts.
- Ripr Rust Small Result job 121335900743 is successful. The successfully read main-branch metadata names that required context (GitHub Actions app 15368).
- The separate Rust-only CI job 121325153514 used the same merge-test identity and shows both import tests and all three admission integration tests passing.
- No pre-rebase precommit/corpus claim was transferred to this head. The landed helper also matches the helper at observed main
699c248cb3f3a6bc7da7905eb2a38032df33d074; compare metadata confirms the landing is its ancestor. This is source-preservation evidence, not post-merge full-suite proof.
Residual assumptions and missing proof:
- Matching remains lexical. Unrelated-module import resolution is excluded. Any nested group is conservatively refused, including one beside a direct macro item.
- The third-party-macro fixture is analyzer input with unresolved macro dependencies; passing the harness does not establish that the generated fixture compiles, expands the real macro, or executes at runtime.
- Cargo/rustc are unavailable locally, so no local Rust or removal experiment was run. A direct GET of
commits/ffa5c98e670b2d8fc3df387024ff5313bf833a0b/check-runsreturnedForbidden; that operation was stopped without retry or alternate-route access. The observed workflow/run/job evidence above remains distinct from a complete check-run inventory or historical protection audit. - No candidate-introduced source blocker was confirmed. Main compilation repair #10506 remains outside this assignment; inherited mock errors are not attributed to this diff.
disposition: REVIEW_READY for the bounded lexical delta on the independently inspected published head and observed hosted qualification, recorded after its existing landing. This is not a retroactive pre-merge clearance or a claim that this pass executed the merge. Existing writer ownership is preserved; no candidate/worktree/build resources were allocated.
Summary
Before: the known-comparison-macro exception for a boolean
assert!(#10445) accepted anyuse float_cmp::...tree that mentioned the macro name, souse float_cmp::other::approx_eq;oruse float_cmp::approx_eq::other;counted as importingapprox_eq.After: the name must be a direct item of its crate:
use float_cmp::approx_eq;or one entry ofuse float_cmp::{.., approx_eq, ..};. Deeper or nested paths no longer count, so those assertions withhold the return-value credit.Source-of-truth Links
Governing issue or accepted claim: #10389 (closed by #10445; this is its tracked residual)
Acceptance delta (one sentence): The nested-comparison-macro exception only applies when the macro is imported as a direct item of its own crate.
Scope
classify/owner_pin.rs:imported_comparison_macrosparses theusetree instead of testing that it contains the name.classify/owner_pin/tests.rs:comparison_macro_imports_must_name_the_macro_as_a_direct_item_of_its_crate.changelog.d/10389-comparison-macro-import-direct-item.md.check-allpassed on the same code before rebasing onto main).Proof
Claim Boundary
May claim:
float_cmp::other::approx_eqand similar deeper paths no longer count as importing the known macro. Must not claim: import scope resolution (auseof the name inside an unrelated module is still not scope-resolved; any otheruseof the name refuses, as in #10445).Rollback
Revert the squash commit.
Spec-Test-Code Traceability
crates/ripr/src/analysis/classify/owner_pin/tests.rscrates/ripr/src/analysis/classify/owner_pin.rsGenerated by Claude Code