Repository navigation
fix(explain): a location miss that differs only in letter case says so (#14416) - #14436
Conversation
…14384) ripr explain and ripr context answered a location selector that matched nothing with only a listing command, so the next try needed a second run. The refusal now adds one bounded sentence: the lines that hold findings in the named file (root-relative, with a selector that resolves), or the files that do, or that the scope has none; a file:line:column selector is told to drop the column. A suffix that matches several files lists one file's lines and counts the rest. The fresh route and both --from artifact routes share it; exit stays 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzTy2PRterqDJuSXY8V
…#14384) A line shared by several findings would refuse as ambiguous on retry, so the miss hint now suggests the first listed line whose selector resolves to exactly one finding, or points at probe ids when every line is shared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzUyYRhWEmeAR1YkniC
…all-clear (#14406) On a fresh run whose language run did not complete or left preview files unanalyzed, the #14384 hint no longer says the scope or the named file has no findings; it says none were reported and that analysis was incomplete, so a finding there may be missing. Complete-run and --from artifact wording is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzUyYRhWEmeAR1YkniC
#14416) Resolution stays case-sensitive, since folding case could turn a selector that is ambiguous on a case-sensitive filesystem into a unique match. When no path matches exactly but one matches ignoring ASCII case, the miss hint says paths match case-sensitively and lists the correctly cased file's lines with a selector that resolves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzUyYRhWEmeAR1YkniC
|
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 40 minutes. View limit details
Pre-merge checks:
|
|
Local proof on this stack: Generated by Claude Code |
#14406) An oversized or malformed diff (or any partial_with_limitations, unsupported_input or analysis_failed outcome) can leave no language-run or preview record, so the location-miss hint still read as an all-clear. fresh_run_incomplete now also checks the producer outcome. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzVHcMqknZrbijS2Uis
…to claude/project-thread-zgrnoe
|
Merged head dffe95f includes #14435's 860d185. On that head, Generated by Claude Code |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Exact-head review (head dffe95f)
Substantive exact-head review of this PR's own delta (commit d7236ac) plus the full composed diff vs merge-base 46b6297 with origin/main (stack #14400 -> #14435 -> this PR; PR base claude/project-thread-3o2r0e). Governing issue #14416 and the PR body read.
Surfaces read
- Full diff vs merge-base: 8 files, +564/-10. Own commit d7236ac isolated and read in full: changelog.d/explain-location-miss-case.md and crates/ripr/src/app/selector.rs.
- crates/ripr/src/app/selector.rs:237-260 (
selector_matches_file_line, the resolution matcher — case-sensitive, untouched by this commit); :266-410 (location_miss_hintincl. newcase_foldedmap :318-322, folded matching :331-334, case-note gate :358-364, suggestion gate :369-381, others count :402); :803-860 (new test pins); call sites in crates/ripr/src/app/explain.rs and crates/ripr/src/app/context.rs (unchanged by this commit; exercised via smoke tests). - Stack-owned surfaces at head: crates/ripr/tests/cli_smoke.rs:25121+ and crates/ripr/tests/cli_smoke/selector_language_recovery.rs.
- Verified merge dffe95f touches only crates/ripr/src/app/explain.rs (+58/-6), matching the PR body's claim;
git diff d7236ac2 HEAD -- crates/ripr/src/app/selector.rsis empty, so the reviewed selector.rs is exactly the PR's own commit.
Commands run (fresh worktree at dffe95f, CARGO_TARGET_DIR pointed inside it)
cargo test -p ripr --lib app::selector— 16 passed, 0 failed, 0 ignored (includeslocation_miss_hint_names_lines_files_and_the_column_form).cargo test -p ripr --test cli_smoke location_miss— 2 passed, 0 failed (location_miss_names_where_findings_are_on_fresh_and_artifact_routesproves the suggested selector resolves end-to-end on the fresh and both artifact routes via a retry loop).cargo test -p ripr --test cli_smoke preview_misses— 2 passed;cargo test -p ripr --test cli_smoke enabled_preview_hits— 1 passed (all three touched assertion sites in selector_language_recovery.rs exercised).cargo fmt --check— exit 0.cargo clippy -p ripr --lib -- -D warnings— 5 errors, all in crates/ripr/src/edit_cage/mod.rs:2133 and crates/ripr/src/lsp/backend.rs:14646/14667/14693/14720: untouched cfg-gated files, inherited Windows-host noise per the validation guidance; none in files this stack touches.gh api .../commits/dffe95f098b.../check-runs— no failing runs; conclusions are success or skipped only (draft-lane skips). Notable success: "Ripr Windows Gate Result".- Golden exposure: "Paths match case-sensitively" occurs only in crates/ripr/src/app/selector.rs; no golden or fixture files are touched by the delta and no JSON output contract changes.
Findings
- [low] crates/ripr/src/app/selector.rs:402 — in the case-folded branch the trailing sentence still reads "1 other file matching that path also has findings", but the counted files matched only ignoring ASCII case (:349-352 put them in
case_folded; :402 countssame_file.len() - 1after the :359 move). The leading "Paths match case-sensitively." sentence and the verified-unique suggestion bound this to a wording nit, not a wrong-repair signal; non-blocking. - No medium or high findings.
Discriminator challenge (if this behavior were wrong, what notices?)
- Fold branch removed ->
SRC/Lib.rs:9999falls to the other-files wording -> pinned at selector.rs:804-815 fails. same_file.is_empty()guard removed -> the exact-case mixed case would gain the case note -> pinned at selector.rs:825-833 fails.- Resolution folded case ->
select_finding("SRC/Lib.rs:9")would return Unique, not NoMatch -> pinned at selector.rs:816-820 fails. - Offered suggestions are checked through
select_findingforFindingSelection::Unique(:371-381) with an honest shared-lines fallback (:853-860); no path found where the hint suggests a selector that would refuse on retry.
Acceptance vs issue #14416: all three bullets are pinned — folded hint text (:804-815), exact-case output unchanged (:825-833), resolution stays case-sensitive with the no-resolve pin (:816-820, stronger than the issue's example since :9 would become Unique under folding). ASCII-only folding with non-ASCII falling through to the existing wording is as the PR body states.
Not established
- Hosted full CI matrix: draft PR, most lanes skipped at this head; hosted merge-gate proof remains CI's obligation.
cargo xtask goldens check/fixturesnot run: no golden/fixture paths are touched by the delta, so the narrow check has no subject here; reported as not run rather than passed.- Full
--all-targetsclippy locally: not run; the lib-only run above is the scoped local pass, full-matrix lint is the required CI lane.
Observed as a draft PR; no merge-convergence claim is made by this review.
…ing case (#14416) Review follow-up: in the case-folded branch the trailing count named files matching that path, but they match only ignoring ASCII case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzRfNh5quSGNrck11PP
|
This addresses the low finding from the exact-head review on dffe95f. Commit 38588a0 changes the case-folded branch's trailing count, which now reads "N other file(s) matching that path ignoring case also has/have findings". Exact-case wording is unchanged. The test pin is updated, Generated by Claude Code |
…tor; spec the hint (#14384) The hint now renders each file root-relative through finding_location_text, so a Windows verbatim finding path under a plain-drive root is shown as src/lib.rs rather than //?/C:/repo/src/lib.rs. RIPR-SPEC-0003 states the location-miss hint contract and the traceability entry maps its unit and CLI tests. Adds path-guard boundary cases (rust:12, :12, ./:12). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzUyYRhWEmeAR1YkniC
…to claude/project-thread-3o2r0e # Conflicts: # crates/ripr/src/app/selector.rs
…to claude/project-thread-zgrnoe # Conflicts: # crates/ripr/src/app/selector.rs
…n all-clear (#14440) A --from artifact records its findings but not whether its run was complete, so its completeness is unrecorded rather than assumed. The location-miss hint now takes a ScopeCompleteness (Complete, Incomplete, Unrecorded): replayed misses say none were reported and that the artifact does not record whether its run was complete. Fresh complete runs keep the plain wording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzUyYRhWEmeAR1YkniC
…to claude/project-thread-zgrnoe
Review follow-up: the agent-context spec now describes the case-folded location miss sentence, and the changelog names the correctly cased selector it suggests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzRfNh5quSGNrck11PP
…-3o2r0e # Conflicts: # crates/ripr/src/app/context.rs # crates/ripr/src/app/explain.rs # crates/ripr/src/app/selector.rs # crates/ripr/tests/cli_smoke.rs # docs/specs/RIPR-SPEC-0003-agent-context.md
|
Heads-up for whoever owns this stack: #14435's branch was updated at 01:44Z (b3188fb, main merged in after #14400 landed). Merging that into this branch conflicts in one hunk of One resolution I checked locally keeps both, and the case-folded match goes through the same helper: let matches = locator_paths_match(file.as_ref(), &wanted);
let matches_folded =
locator_paths_match(&file.to_ascii_lowercase(), &wanted_folded);The rest of the branch merges cleanly. I'm not pushing it here, because #14435's owner is active and this stack is theirs. I just wanted the conflict on record. Generated by Claude Code |
When the #14077 miss cause already says the analysis was incomplete, the #14384 hint keeps its "reported" wording without repeating the sentence (ScopeCompleteness::IncompleteDisclosed). RIPR-SPEC-0003 lists the partial diff scope among the incomplete signals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzVHcMqknZrbijS2Uis
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzVHcMqknZrbijS2Uis
…to claude/project-thread-zgrnoe # Conflicts: # crates/ripr/src/app/selector.rs
…14416) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVdGzRfNh5quSGNrck11PP
…-zgrnoe # Conflicts: # changelog.d/explain-location-miss-incomplete-run.md # crates/ripr/src/app/selector.rs # docs/specs/RIPR-SPEC-0003-agent-context.md
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
VERDICT: APPROVE 94c6416
Exact-head review of 94c6416, the main-based head: the stack below (#14400, #14435) has merged, so the diff against main is three files (+85/-4) - crates/ripr/src/app/selector.rs, docs/specs/RIPR-SPEC-0003-agent-context.md and changelog.d/explain-location-miss-case.md.
What I read at this head:
selector.rs:347-388: the case-folded map is filled only in the else branch of the exact match, so a file that matches exactly is never also counted as case-folded.selector.rs:383-388: the note and the promotion fire only whensame_fileis empty, which is exactly the spec sentence "when no finding path matches exactly but one matches ignoring ASCII case".selector.rs:390-392: after promotion thewantedkey is absent, so the first key in BTreeMap order is listed; that is deterministic and the test pins it.selector.rs:424-433: the "ignoring case" wording is keyed off the note, so exact-case output is byte-identical to main.- Resolution is untouched:
select_findingstays case-sensitive, and the new test assertsSRC/Lib.rs:9is NoMatch whilesrc/lib.rs:9is Unique.
Test expectations recomputed against the fixture (probe:a and probe:b on line 3, probe:c on line 9): line 3 is ambiguous, so the suggestion is src/lib.rs:9, which matches the assertion. The three new cases cover the single folded file, exact-case precedence, and the multi-file count with the column note.
Spec and changelog match the implementation, including the ASCII-only scope.
Not established here: no build or test run on this host. Hosted checks at this head are 14 success, 5 skipped, 1 neutral, and no failure. The head is one commit behind main (merge base db01ef5); that is base movement only.
EffortlessSteven
left a comment
There was a problem hiding this comment.
VERDICT: APPROVE 94c6416 — no blocking findings on this head.
Reviewed the whole 3-file diff (crates/ripr/src/app/selector.rs, RIPR-SPEC-0003, changelog) against main.
What holds
- Resolution is untouched:
select_findingis not in the diff and stays case-sensitive. The change is confined tolocation_miss_hint. - The folded comparison lowercases both the finding path and the wanted path before the shared
locator_paths_match, so the root-relative/absolute suffix rule is preserved under folding; the map key remains the stored (correctly cased) path, so the suggested selector is spelled from the finding, not from the user's input. - The case note is emitted only when no exact path match exists (
same_file.is_empty()), so exact-case output keeps its existing bytes; when a file matches exactly, the note and the "ignoring case" wording are never added. - The multi-file count uses the folded map only after the replacement, so "1 other file matching that path ignoring case also has findings" counts the right set, and
select_findingis still consulted before suggesting a selector. - The added unit cases cover the case-only hint,
NoMatchvsUniquefor case-only selectors, exact-case precedence, and the multi-file count plus column note; SPEC-0003 and the changelog sentence describe the same behavior.
Limits
Static only — I ran no tests; the body's cargo test -p ripr --lib app:: and --test cli_smoke results are the author's, not re-run here. This head already carries Source review: REVIEW_READY 94c6416a... in the description. The PR shows mergeable: UNKNOWN against a moving main; base-currentness is not part of this verdict. No hosted qualification was inspected.
Requested by Steven · project thread
Governing issue or accepted claim: #14416
Acceptance delta (one sentence): When an
explain/contextfile:line selector matches no finding path exactly but one ignoring ASCII case, the miss hint says paths match case-sensitively and suggests a correctly cased selector that resolves uniquely, while resolution itself stays case-sensitive.What changes
The diff against main has three files:
crates/ripr/src/app/selector.rs, the RIPR-SPEC-0003 paragraph andchangelog.d/explain-location-miss-case.md. The stack below this PR (#14400, #14435) has merged.select_finding) is untouched and stays case-sensitive. Folding case could turn a selector that is ambiguous on a case-sensitive filesystem into a single finding, which would be a wrong actionable signal.location_miss_hint, a path that matches no finding exactly but matches one ignoring ASCII case gets a hint. The case match uses the sharedlocator_paths_matchon lowercased inputs, and lowercasing commutes withnormalize_locator_path. The hint starts withPaths match case-sensitively., lists the correctly cased file's lines, and suggests a selector only ifselect_findingreturnsUniquefor it. Any other files counted say "matching that path ignoring case".ScopeCompletenesshandling is unchanged.Checks on 94c6416
cargo test -p ripr --lib app::passed: 1062 tests.cargo test -p ripr --test cli_smoke location_misspassed: 2 tests.cargo xtask check-spec-formatandrustfmt --checkonselector.rspass.check-static-languageandcheck-traceabilitypassed, andcargo xtask precommitexited 0 on the original patch head.SRC/Lib.rs:9gives NoMatch whilesrc/lib.rs:9resolves;Review
Fresh independent subagent reviews covered the original commit, each merge of the moving base, and this main-based head. None found anything blocking. Fixes from earlier reviews are already in:
One adjacent issue lies outside this claim. On case-insensitive filesystems, the #14077 miss cause can say the file has no findings, ahead of this hint. It is filed as #14676.
Source review: REVIEW_READY 94c6416
https://claude.ai/code/session_01YVdGzRfNh5quSGNrck11PP
Generated by Claude Code