Repository navigation
fix(analysis): recognize test conjunct order in cfg(all) - #3537
Conversation
|
Substantive exact-head review — REVIEW_INCOMPLETE\n\nReviewed current head �478091d4 against current main �db6aabd3. The claim is bounded to order-insensitive direct est conjunct recognition in cfg(all(...)), parser-owned test-role reuse for same-file shadow exclusion, and the corresponding cache schema bumps. Static review found no actionable defect in the changed seam; the token-depth and negative controls cover nested/negated/literal cases. cargo fmt --all -- --check and git diff --check pass. Fresh hosted checks are pending, local compile was not run while shared Cargo/rustc builders were active, and independent approval is absent. This PR is not merge-ready yet. |
|
Warning Review limit reachedNext included review available in 58 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. Summary by CodeRabbit
WalkthroughRust source-role analysis now recognizes direct top-level ChangesRust test-role classification
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This PR updates localized Rust analysis classification and safely separates affected local cache entries; no actionable merge-blocking risk remains after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 5 files. (1 skipped: 1 unsupported.) Full details: Description checkExplanation The description covers the change, scope, acceptance criterion, non-goals, proof status, claim boundary, rollback, traceability, and engineering impact. It clearly identifies pending hosted checks and skipped local Cargo tests. Some template checklist items are not fully populated, but the description is mostly complete. ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the Rust source-role analysis to recognize a direct top-level test conjunct in #[cfg(all(...))] regardless of the order of conjuncts, ensuring helpers under attributes like #[cfg(all(feature = "slow", test))] are correctly classified with an evidence role. It also increments the cache schema versions to prevent warm analysis from reusing outdated classifications and simplifies the retrieval of test-scoped function names by leveraging FunctionFact::is_test. The review feedback recommends optimizing test_scoped_function_names_by_file to avoid redundant PathBuf cloning and simplifying the slice comparison in cfg_term_is_test to be more idiomatic.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 490534045b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Exact-head quality repair — REVIEW_INCOMPLETE\n\nCurrent head: �076fbd5b against main �db6aabd3. Addressed the automated review’s actionable quality findings: completed the repository PR-template sections in the description and documented the touched cfg test-role helpers. cargo fmt --all -- --check PASS; git diff --check PASS. Fresh hosted checks restarted for this exact head; no code-defect findings were reported. Merge remains deferred until current required proof completes. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Codex exact-head review — 2026-08-28Reviewed replacement PR #3537 at current head
Merge remains blocked until the fresh exact-head required result is green. |
Codex exact-head review — 2026-08-28Re-reviewed current head The replacement remains bounded to cfg(all) test-conjunct recognition, focused characterization/proof, and documentation. The reconciliation was conflict-free; local |
Codex exact-head review update\n\nAddressed the two current review suggestions in commit 2bd6fd5: same-file shadow lookup now avoids repeated PathBuf cloning, and cfg_term_is_test uses the direct token-slice comparison. The existing unction.is_test || is_test_file filter preserves lexical-fallback shadow detection for parser-error facts.\n\ncargo fmt --all and git diff --check pass locally. Fresh hosted proof is required for the new head before merge. |
Codex exact-head review update\n\nReconciled the reviewed candidate to main 14f2522 and retargeted the PR to main. Current head is �0e383b2a; prior review threads remain resolved and the candidate remains bounded to cfg(all) test-conjunct recognition plus focused proof. Fresh hosted proof is required for this exact head. |
Exact-head review (2026-08-28)\nReviewed current head d346616 against current main after the #3540 merge. The candidate remains a narrow Rust source-role classification/cache-schema change. The earlier actionable findings (same-file lookup clone, direct cfg slice comparison, and lexical fallback preservation) are implemented; the current merge-base refresh adds only already-landed CI documentation/workflow changes. No new correctness, scope, or proof gap found. Existing current-head checks are still pending on source-of-truth/UB/routed aggregation; merge remains gated on those results. |
Summary
main.testconjunct incfg(all(...))regardless of conjunct order.FunctionFact::is_testfor same-file shadow exclusion and bump affected cache schemas.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Scope
One Rust syntax/evidence-role seam with focused regression coverage.
Scope Classification
Production delta:
cfg(all(..., test))role detection is order-insensitive and remains fail-closed for nested, negated, literal, or comment-only tokens.Evidence/support delta:
Single acceptance criterion:
testconjuncts are test-scoped in any order, while non-direct forms remain production-scoped.Non-goals:
Support-tier Impact
Claim/proof notes:
Policy Impact
Proof
cargo fmt --all -- --check: PASSgit diff --check: PASSClaim Boundary
This establishes order-insensitive direct
cfg(all(..., test))role detection and aligned same-file shadow handling. It does not establish runtime, mutation, release, or publication readiness.Rollback
Revert this PR; prior conjunct-order behavior and cache schema values return.
Spec-Test-Code Traceability
crates/ripr/src/analysis/syntax/ra.rs,crates/ripr/src/analysis/test_grip_evidence/related_tests/context.rsStatic Language Check
CI Economics
Engineering Check
Gates
cargo fmt --checkgit diff --check