Skip to content

test: move ra.rs's main test module out of line (#15193) - #16684

Draft
EffortlessSteven wants to merge 2 commits into
mainfrom
claude/relocate-tail-ra-1
Draft

EffortlessSteven wants to merge 2 commits into
mainfrom
claude/relocate-tail-ra-1

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Summary

Moves only the main mod tests of analysis/syntax/ra.rs (one of its six inline test modules) to ra/tests.rs. ra.rs is a tail owner because the verifier and check-allow-attributes count its fixture allow(dead_code) text differently: one of two fixture literals is spelled #[cfg_attr /* keep */ (test, ...)], which the checker's attribute scanner does not count. This sets the .ripr/allow-attributes.txt rows to what check-allow-attributes finds (1 in ra/tests.rs, 1 still in ra.rs). The five remaining modules then match the verifier's count and can move mechanically later.

Source-of-truth Links

Proposal: #15217
Governing issue or accepted claim: #15193
Acceptance delta (one sentence): Moves ra.rs's main inline test module out of the published source.

Candidate Relationships

Candidate branch (GitHub PR head is authoritative after publication): claude/relocate-tail-ra-1
Stack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): none

Scope

Production delta:

  • None. Only #[cfg(test)] code moves.

Evidence/support delta:

  • ra/tests.rs (new), the owner, .ripr/allow-attributes.txt, policy/inline-test-modules.txt (6 to 5), and the traceability rows that name the moved tests.

Non-goals:

  • Other tail owners.

Proof

  • The moved body is token-identical to the removed module apart from whitespace and one rustfmt trailing comma inside a re-wrapped Err(...) call (checked by script). The handed-off patch needed a three-way apply on current main; the merged .ripr/traceability.toml hunk re-added three stale oracles.rs::tests:: rows and kept the old ra.rs::tests:: row, which this PR's commit removes, so the hunk is now only the rename.
  • Local precommit and focused checks: recorded below once run.
  • Not run locally: the moved tests in the ripr lib binary (it runs out of memory in this container). Hosted CI runs them.

Claim Boundary

May claim: these inline tests leave the published source and still compile and run as unit tests.
Must not claim: a measured .crate size change.

Rollback

Plain revert.

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.

CI Economics

  • n/a (no workflow change).

Generated by Claude Code

ra.rs is a tail owner because the verifier and check-allow-attributes count
its fixture `allow(dead_code)` text differently. The tests module holds two
such fixture literals, and one is spelled `#[cfg_attr /* keep */ (test, ...)]`,
which the checker's attribute scanner does not count. So the verifier's
split row (2) is stale by one. This moves only `mod tests` (the verifier's
transform, with that count check relaxed and the other five test modules
held back), and sets the rows to what check-allow-attributes finds:
1 in ra/tests.rs, 1 still in ra.rs. The five remaining modules are under
3,000 changed lines and, after this, match the verifier's count, so they
can move mechanically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVdGzV3JdcCDM6STapqHBr
@EffortlessSteven EffortlessSteven self-assigned this Nov 30, 2026
@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 Nov 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 14 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 137 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 051b378f-6fde-4093-8f81-5e8dc34816fb
Commits

Reviewing files that changed from the base of the PR and between 1eb3437 and cdbd188.

Files selected for processing: 8

  • .ripr/allow-attributes.txt
  • .ripr/traceability.d/14385-tail-if-branch-return-value.toml
  • .ripr/traceability.d/expect-test-fallback-receiver-7878.toml
  • .ripr/traceability.toml
  • crates/ripr/src/analysis/syntax/ra.rs
  • crates/ripr/src/analysis/syntax/ra/tests.rs
  • docs/specs/RIPR-SPEC-0172-cross-crate-dependency-edge-relation.md
  • policy/inline-test-modules.txt
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

…test, and repoint the spec citation (#15193)

The let_inside_macro row named ra.rs::tests on main, but the test lives in
shadow_fact_equivalence_tests, which stays in ra.rs; the rename sent it to
ra/tests.rs, which lacks it. RIPR-SPEC-0172 cites a test that moved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVdGzSjosVsQMRGZjsjVDi
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.

2 participants