Repository navigation
fix(#16646): a symlink that cannot carry Rust no longer refuses the const reader scan - #16664
Conversation
…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
|
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 52 minutes. View limit details
|
EffortlessSteven
left a comment
There was a problem hiding this comment.
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
.rsextension match is now case-insensitive. Unit rows were added for a.RSlink and a self link. - The Cargo-target-path gap is older than this change and filed as #16659.
Local runs:
check_repair_agreepasses 71 tests. With the oldconst_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
left a comment
There was a problem hiding this comment.
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
.rsextension match is now case-insensitive. Unit rows were added for a.RSlink and a self link. - The Cargo-target-path gap is older than this change and filed as #16659.
Local runs:
check_repair_agreepasses 71 tests. Both symlink integration rows go red when the oldconst_readers.rsis 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
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
🤖 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-
.rsname that points at a file or dangles) no longer turns an unrelated changed constant intostatic_unknownwith 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_rustrefused on any entry that was not a directory or a regular file, so one trackedlink -> a.txtanywhere 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:
*.rsor*.RS;ELOOP);The
rsextension match for regular files is case-insensitive too.Proof
a_tracked_symlink_outside_the_diff_keeps_the_changed_constant_finding.linkkeeps greet'sreturn_valuefinding and itsripr repairstart.static_unknownwith no gap ID.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 thepath_commit_unsaferefusal.const_readers.rs, both integration tests fail.only_a_symlink_that_cannot_carry_rust_is_skippedchecks 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.check_repair_agreepasses 71 tests,cargo clippy -p ripr --lib --tests -- -D warningsis clean, andcargo xtask precommitexits 0.Known limits (from independent review)
The scan reads only
*.rsfiles under the root. A Cargo targetpath =pointing at a non-.rsfile, 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