Skip to content

fix(explain): a location miss that differs only in letter case says so (#14416) - #14436

Merged
EffortlessSteven merged 20 commits into
mainfrom
claude/project-thread-zgrnoe
Nov 15, 2026
Merged

EffortlessSteven merged 20 commits into
mainfrom
claude/project-thread-zgrnoe

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Governing issue or accepted claim: #14416
Acceptance delta (one sentence): When an explain/context file: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 and changelog.d/explain-location-miss-case.md. The stack below this PR (#14400, #14435) has merged.

  • Resolution (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.
  • In location_miss_hint, a path that matches no finding exactly but matches one ignoring ASCII case gets a hint. The case match uses the shared locator_paths_match on lowercased inputs, and lowercasing commutes with normalize_locator_path. The hint starts with Paths match case-sensitively., lists the correctly cased file's lines, and suggests a selector only if select_finding returns Unique for it. Any other files counted say "matching that path ignoring case".
  • Exact-case output is byte-identical to main. ScopeCompleteness handling is unchanged.
  • RIPR-SPEC-0003 gains one sentence for the case hint.

Checks on 94c6416

  • cargo test -p ripr --lib app:: passed: 1062 tests.
  • cargo test -p ripr --test cli_smoke location_miss passed: 2 tests.
  • cargo xtask check-spec-format and rustfmt --check on selector.rs pass.
  • Earlier on this stack: check-static-language and check-traceability passed, and cargo xtask precommit exited 0 on the original patch head.
  • Unit cases:
    • a case-only selector gets the hint;
    • SRC/Lib.rs:9 gives NoMatch while src/lib.rs:9 resolves;
    • an exact-case file wins over a case-folded one, with no note;
    • for several case-folded files, the count wording and the column note both appear.

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:

  • the "ignoring case" count wording;
  • a corrected test comment;
  • the spec sentence.

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

…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
@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 12, 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 40 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 145 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: 44dfdf0e-dbdf-4e8b-96bb-a99d17dd3169
Commits

Reviewing files that changed from the base of the PR and between db01ef5 and 94c6416.

Files selected for processing: 3

  • changelog.d/explain-location-miss-case.md
  • crates/ripr/src/app/selector.rs
  • docs/specs/RIPR-SPEC-0003-agent-context.md
Pre-merge checks: Inconclusive 2

Failed Failed checks: 2 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Description check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Copy link
Copy Markdown
Member Author

Local proof on this stack: cargo test -p ripr --lib app::selector passed, 16 tests, with exit 0. The build started on the pre-rebase tree, which differs from head d7236ac only by one test comment. rustfmt --check on selector.rs is clean at d7236ac. merge-ready is held until #14400 and #14435 merge and runner pressure drops.


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

Copy link
Copy Markdown
Member Author

Merged head dffe95f includes #14435's 860d185. On that head, cargo test -p ripr --lib app:: passed: 1056 tests, exit 0.


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.

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_hint incl. new case_folded map :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.rs is 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 (includes location_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_routes proves 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 counts same_file.len() - 1 after 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:9999 falls 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_finding for FindingSelection::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 / fixtures not 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-targets clippy 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

Copy link
Copy Markdown
Member Author

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, app::selector passed (16 tests), and rustfmt is clean.


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

Copy link
Copy Markdown
Member Author

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 location_miss_hint in crates/ripr/src/app/selector.rs. #14435 now uses #14077's shared locator_paths_match helper for the same-file test, while this PR adds an ASCII-case-folded match next to it.

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
…to claude/project-thread-zgrnoe

# Conflicts:
#	crates/ripr/src/app/selector.rs
Base automatically changed from claude/project-thread-3o2r0e to main November 14, 2026 07:47
…-zgrnoe

# Conflicts:
#	changelog.d/explain-location-miss-incomplete-run.md
#	crates/ripr/src/app/selector.rs
#	docs/specs/RIPR-SPEC-0003-agent-context.md

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@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
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 when same_file is 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 the wanted key 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_finding stays case-sensitive, and the new test asserts SRC/Lib.rs:9 is NoMatch while src/lib.rs:9 is 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 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.

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_finding is not in the diff and stays case-sensitive. The change is confined to location_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_finding is still consulted before suggesting a selector.
  • The added unit cases cover the case-only hint, NoMatch vs Unique for 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.

Merged via the queue into main with commit 02c0996 Nov 15, 2026
21 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/project-thread-zgrnoe branch November 15, 2026 00:10
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