Normalize files_touched paths with filepath.ToSlash for cross-platform consistency.#803
Merged
Normalize files_touched paths with filepath.ToSlash for cross-platform consistency.#803
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR normalizes files_touched path storage to use forward slashes (/) across platforms, reducing Windows-specific mismatches during path comparisons (overlap detection, subtraction/dedup) and in JSON output.
Changes:
- Normalize modified/staged file paths with
filepath.ToSlashwhen extracting from transcripts and git output. - Normalize
FilesTouchedmerging logic to deduplicate consistently across path separator styles. - Normalize
FilterAndNormalizePathsoutputs to forward slashes.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/entire/cli/strategy/manual_commit_hooks.go | Normalizes extracted modified files and staged file lists to forward slashes. |
| cmd/entire/cli/strategy/manual_commit_git.go | Normalizes FilesTouched merge inputs to forward slashes before dedup/sort. |
| cmd/entire/cli/state.go | Normalizes filtered/relative paths to forward slashes at the point they’re produced. |
| cmd/entire/cli/checkpoint/committed.go | Normalizes merged committed FilesTouched paths to forward slashes before dedup/sort. |
…m consistency Ensures all paths stored in FilesTouched use forward slashes regardless of OS, preventing mismatches in path comparisons (overlap detection, subtraction, deduplication) and JSON serialization on Windows. Signed-off-by: Paulo Gomes <paulo@entire.io> Assisted-by: Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: b937a0b3fc4c
Covers the Windows regression where git status returns backslash-separated paths that must be normalized to forward slashes for consistent storage. Signed-off-by: Paulo Gomes <paulo@entire.io> Assisted-by: Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 08c3b9229ccd
83332b2 to
a99fa26
Compare
Soph
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ensures all paths stored in FilesTouched use forward slashes regardless of OS, preventing mismatches in path comparisons (overlap detection, subtraction, deduplication) and JSON serialization on Windows.
Note
Low Risk
Low risk normalization change, but it can affect dedup/overlap behavior and checkpoint metadata comparisons on Windows vs POSIX if any code expected OS-native separators.
Overview
Ensures all file paths recorded in
FilesTouched-style metadata are stored with forward slashes by applyingfilepath.ToSlashduring path filtering, merge/dedup, transcript-extracted file normalization, and staged-file collection.This makes path comparisons (dedupe/overlap/subtraction) and persisted checkpoint/state JSON consistent across platforms, particularly Windows.
Written by Cursor Bugbot for commit 9d41eec. Configure here.