Skip to content

fix(#16646): a symlink that cannot carry Rust no longer refuses the const reader scan - #16664

Merged
EffortlessSteven merged 1 commit into
mainfrom
claude/project-thread-9g17ji
Nov 30, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
claude/project-thread-9g17ji

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

https://claude.ai/code/session_01YVdGzTog4paRbkjGfRRp4y

Governing issue or accepted claim: #16646

Acceptance delta (one sentence): a tracked symlink that cannot carry Rust source (a non-.rs name that points at a file or dangles) no longer turns an unrelated changed constant into static_unknown with no gap, so check agrees with pilot.

Root cause

The changed-constant follow-through (#11400, analysis/classify/const_readers.rs) scans every Rust file under the root and fails closed. read_workspace_rust refused on any entry that was not a directory or a regular file, so one tracked link -> a.txt anywhere in the tree refused the whole scan.

Fix

symlink_carries_no_rust: the scan now skips a symlink when its own name is not *.rs (checked case-insensitively) and it points at a non-directory or dangles (NotFound).

These links still refuse the scan:

  • a link named *.rs or *.RS;
  • a link to a directory;
  • a self link (ELOOP);
  • a link whose target cannot be read for any other reason.

The rs extension match for regular files is case-insensitive too.

Proof

  • Integration: a_tracked_symlink_outside_the_diff_keeps_the_changed_constant_finding.
    • A committed link keeps greet's return_value finding and its ripr repair start.
    • The fail-closed control is a directory link, which still gives static_unknown with no gap ID.
  • Re-enabled half: the check half of a_dirty_tracked_symlink_gets_no_runnable_start (from Pilot and agent status still offer a repair start that test-surface dirt or a withheld premise refuses #16519) had been dropped as non-discriminating. It now asserts the gap and the path_commit_unsafe refusal.
  • Negative test: with the old const_readers.rs, both integration tests fail.
  • Unit: only_a_symlink_that_cannot_carry_rust_is_skipped checks every row listed above. It and the existing scan tests pass in a standalone harness crate built from the module, because the lib unit-test build runs out of memory here. They are left to hosted CI as well.
  • Local runs: check_repair_agree passes 71 tests, cargo clippy -p ripr --lib --tests -- -D warnings is clean, and cargo xtask precommit exits 0.

Known limits (from independent review)

The scan reads only *.rs files under the root. A Cargo target path = pointing at a non-.rs file, or at a file outside the root, is not scanned. That was already true for regular files and is not new with this change; it is filed as #16659.

Source review: REVIEW_READY ca21316


Generated by Claude Code

…onst reader scan

The changed-constant follow-through (#11400) scans every Rust file under
the root and refused on any entry that is not a directory or regular
file. One tracked `link -> a.txt` anywhere in the tree therefore turned an
unrelated constant change into `static_unknown` with no gap or start,
while pilot still offered one.

Rust reaches a module only as `name.rs` or `name/mod.rs`, or through
`#[path]`/`include!` text, which the scan already refuses. The scan now
skips a symlink whose own name is not `*.rs` and that points at a
non-directory or dangles. A `*.rs` link, a link to a directory, and a link
whose target cannot be read for another reason still refuse.

The #16519 dirty-symlink test now asserts its check half, which had been
dropped because it did not discriminate.

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

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 136 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: 6b838923-ac27-488e-8176-e5d213c612e6
Commits

Reviewing files that changed from the base of the PR and between cea0f1c and ca21316.

Files selected for processing: 4

  • changelog.d/16646-symlink-const-reader-scan.md
  • crates/ripr/src/analysis/classify/const_readers.rs
  • crates/ripr/src/analysis/classify/const_readers/tests.rs
  • crates/ripr/tests/check_repair_agree.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

SOURCE_REVIEW_READY

Exact head reviewed: ca21316.

This is a clean cherry-pick of the locally reviewed commit onto current main. Its diff is byte-identical to that commit's.

An independent subagent reviewed the change. It covered:

  • the safety argument for skipping links: Cargo target paths, case-insensitive file systems, self links (ELOOP), permission errors, Windows junctions and link chains;
  • the scan's only consumer, name_confined;
  • the other scans that handle symlinks;
  • whether the tests discriminate;
  • changelog parity.

It found no blocking defect. Its two notes were addressed:

  • The .rs extension match is now case-insensitive. Unit rows were added for a .RS link and a self link.
  • The Cargo-target-path gap is older than this change and filed as #16659.

Local runs:

  • check_repair_agree passes 71 tests. With the old const_readers.rs, both symlink integration tests fail.
  • clippy for the lib and tests is clean, and precommit exits 0.

The unit rows pass in a standalone harness. The lib unit tests are left to hosted CI.


Generated by Claude Code

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

SOURCE_REVIEW_READY

Exact head reviewed: ca21316.

This is a clean cherry-pick of the locally reviewed commit onto current main. Its diff is byte-identical to that commit's.

An independent subagent reviewed the change. It covered:

  • the safety argument for skipping links: Cargo target paths, case-insensitive file systems, self links (ELOOP), permission errors, Windows junctions and link chains;
  • the scan's only consumer, name_confined;
  • the other scans that handle symlinks;
  • whether the tests discriminate;
  • changelog parity.

It found no blocking defect. Its two notes were addressed:

  • The .rs extension match is now case-insensitive. Unit rows were added for a .RS link and a self link.
  • The Cargo-target-path gap is older than this change and filed as #16659.

Local runs:

  • check_repair_agree passes 71 tests. Both symlink integration rows go red when the old const_readers.rs is swapped back in.
  • clippy for the lib and tests is clean, and precommit exits 0.

The unit rows pass in a standalone harness. The lib unit tests are left to hosted CI.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 30, 2026 03:34
@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 added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 3b7bf9e Nov 30, 2026
20 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/project-thread-9g17ji branch November 30, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants