Skip to content

fix(watcher): preserve indexed files during Windows disk sync - #1433

Merged
Shashankss1205 merged 1 commit into
CodeGraphContext:mainfrom
lntutor:fix/windows-watcher-paths-1394
Jul 31, 2026
Merged

fix(watcher): preserve indexed files during Windows disk sync#1433
Shashankss1205 merged 1 commit into
CodeGraphContext:mainfrom
lntutor:fix/windows-watcher-paths-1394

Conversation

@lntutor

@lntutor lntutor commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • normalize discovered file paths to POSIX form before comparing them with graph paths
  • prevent Windows path separators from causing every indexed file to be treated as stale
  • add a regression test covering the normalized graph path contract

Fixes #1394

Tests

  • PYTHONPATH=src .venv/bin/pytest tests/unit/core/test_watcher_startup_sync.py tests/unit/core/test_watcher_cgcignore.py tests/unit/core/test_watcher_polling_observer.py -q
  • .venv/bin/ruff check tests/unit/core/test_watcher_startup_sync.py
  • git diff --check

Note: ruff check src/codegraphcontext/core/watcher.py still reports two unrelated pre-existing unused imports.

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the shashankss1205's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Shashankss1205 Shashankss1205 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the diff and verified locally: merged onto current main and ran the relevant test suite — all green.

@Shashankss1205
Shashankss1205 merged commit 7157e4e into CodeGraphContext:main Jul 31, 2026
1 check failed
@Shashankss1205

Copy link
Copy Markdown
Collaborator

Thanks @lntutor for this contribution — merged! 🎉

Really appreciate you taking the time to work on CodeGraphContext. We'd love to have you contribute back again — feel free to pick up another open issue or share ideas in the discussions. Happy hacking!

@github-project-automation github-project-automation Bot moved this from Backlog tasks to Done in CGC Progress Board Jul 31, 2026
@Shashankss1205 Shashankss1205 added gssoc:approved GSSoC validation: counts toward scoring level:advanced GSSoC difficulty: 55 pts contributor / 30 mentor mentor:Shashankss1205 GSSoC mentor attribution: credits reviewing mentor quality:clean GSSoC quality: x1.2 contributor / +5 mentor type:bug GSSoC type bonus: bug labels Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC validation: counts toward scoring level:advanced GSSoC difficulty: 55 pts contributor / 30 mentor mentor:Shashankss1205 GSSoC mentor attribution: credits reviewing mentor quality:clean GSSoC quality: x1.2 contributor / +5 mentor type:bug GSSoC type bonus: bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug(indexer): synchronize_with_disk deletes the entire repository on Windows

2 participants