Skip to content

fix(cli): preserve case-distinct paths-file entries - #1431

Merged
mstykow merged 1 commit into
mainfrom
fix/paths-file-case-distinct
Sep 9, 2026
Merged

fix(cli): preserve case-distinct paths-file entries#1431
mstykow merged 1 commit into
mainfrom
fix/paths-file-case-distinct

Conversation

@mstykow

@mstykow mstykow commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve the original case of each normalized --paths-file entry when deduplicating the direct collection frontier.
  • Keep case-insensitive selection matching independently deduplicated, avoiding redundant filters without dropping case-distinct files.
  • Cover case-distinct collection and exact normalized repeat deduplication in a focused regression test.

Issues

Scope and exclusions

  • Included: --paths-file resolution, frontier construction, and regression coverage through collection and selection filtering.
  • Explicit exclusions: --include/--exclude glob semantics and ordinary directory discovery are unchanged.

How to verify

  • On a case-sensitive filesystem, run the issue reproduction with Example.js and example.js; confirm both file entries appear with their respective license detections. Add ./Example.js to the paths file and confirm the normalized repeat does not add a third entry.

Expected-output fixture changes

  • Files changed: None.
  • Why the new expected output is correct: The behavior is covered by focused Rust assertions rather than serialized golden output.

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown

Greptile Summary

The PR corrects --paths-file deduplication by separating collection-frontier identity from case-insensitive selection identity.

  • Canonical filesystem paths deduplicate aliases that resolve to the same file.
  • Case-distinct files remain separate collection-frontier entries on case-sensitive filesystems.
  • Selection and missing-entry deduplication remain independently scoped.
  • A focused regression test covers case-sensitive and case-insensitive filesystem behavior.

Confidence Score: 5/5

The PR appears safe to merge; the updated deduplication preserves case-distinct files while avoiding duplicate collection of filesystem aliases.

No actionable new issue remains. The previous duplicate-file finding was manually resolved without explanation, and the current canonical-path deduplication also addresses its underlying case-alias behavior.

Important Files Changed

Filename Overview
src/scan_result_shaping/selection.rs Uses canonical filesystem identity for frontier deduplication while preserving independent selection and missing-entry sets.
src/scan_result_shaping/selection_test.rs Verifies case-distinct collection, normalized-repeat deduplication, alias handling, and downstream selection filtering across filesystem semantics.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Normalized paths-file entry] --> B{Entry exists?}
    B -->|Yes| C[Canonicalize filesystem path]
    C --> D[Deduplicate collection frontier by file identity]
    B -->|Yes| E[Build case-insensitive selection key]
    E --> F[Deduplicate selection filters]
    B -->|No| G[Deduplicate missing normalized entries]
Loading

Reviews (2): Last reviewed commit: "fix(cli): preserve case-distinct paths-f..." | Re-trigger Greptile

Comment thread src/scan_result_shaping/selection.rs Outdated
Signed-off-by: Maxim Stykow <maxim.stykow@gmail.com>
@mstykow
mstykow force-pushed the fix/paths-file-case-distinct branch from f41476d to f9d6a44 Compare September 9, 2026 08:12
@mstykow
mstykow merged commit 5dab4af into main Sep 9, 2026
13 checks passed
@mstykow
mstykow deleted the fix/paths-file-case-distinct branch September 9, 2026 08:29
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.

--paths-file silently drops files whose paths differ only in capitalization

1 participant