Skip to content

Normalize files_touched paths with filepath.ToSlash for cross-platform consistency.#803

Merged
Soph merged 2 commits intomainfrom
pjbgf/fix-touched-files
Mar 30, 2026
Merged

Normalize files_touched paths with filepath.ToSlash for cross-platform consistency.#803
Soph merged 2 commits intomainfrom
pjbgf/fix-touched-files

Conversation

@pjbgf
Copy link
Copy Markdown
Member

@pjbgf pjbgf commented Mar 30, 2026

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 applying filepath.ToSlash during 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.

Copilot AI review requested due to automatic review settings March 30, 2026 07:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.ToSlash when extracting from transcripts and git output.
  • Normalize FilesTouched merging logic to deduplicate consistently across path separator styles.
  • Normalize FilterAndNormalizePaths outputs 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.

pjbgf added 2 commits March 30, 2026 08:50
…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
@pjbgf pjbgf force-pushed the pjbgf/fix-touched-files branch from 83332b2 to a99fa26 Compare March 30, 2026 07:50
@pjbgf pjbgf marked this pull request as ready for review March 30, 2026 07:50
@pjbgf pjbgf requested a review from a team as a code owner March 30, 2026 07:50
@Soph Soph merged commit 81fc53c into main Mar 30, 2026
3 checks passed
@Soph Soph deleted the pjbgf/fix-touched-files branch March 30, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants