Skip to content

fix: synchronize watcher graph on startup - #1071

Merged
Shashankss1205 merged 7 commits into
CodeGraphContext:mainfrom
eshaanag:fix/832-watch-start-sync
Jun 10, 2026
Merged

Shashankss1205 merged 7 commits into
CodeGraphContext:mainfrom
eshaanag:fix/832-watch-start-sync

Conversation

@eshaanag

@eshaanag eshaanag commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an explicit watcher startup synchronization mode for already-indexed repositories
  • reconcile current files with indexed File nodes, removing files deleted while watch was stopped
  • refresh changed and newly added files, then rebuild repository call and inheritance relationships once
  • enable synchronization for both CLI and MCP watch entry points
  • add focused regression coverage for changed, added, deleted, persistence-query, and wiring behavior

Why a full startup reconciliation

The current graph schema does not store per-file modification metadata, so a selective changed-file comparison would miss offline edits. This runs once when watch starts for an already-indexed repository; normal live updates remain incremental.

Verification

  • HOME=/tmp/cgc-test-home PYTHONPATH=src /tmp/cgc-test-venv/bin/python -m pytest tests/unit/core -q
    • 105 passed, 15 skipped
  • git diff --check
  • python3 -m compileall on changed Python files

Fixes #832

@vercel

vercel Bot commented Jun 4, 2026

Copy link
Copy Markdown

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

A member of the Team first needs to authorize it.

@eshaanag

eshaanag commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

CI baseline note:

Focused local verification remains 105 passed, 15 skipped for tests/unit/core.

@eshaanag
eshaanag force-pushed the fix/832-watch-start-sync branch from e26a29e to 4dd242e Compare June 7, 2026 11:17
@Shashankss1205
Shashankss1205 merged commit a9650b6 into CodeGraphContext:main Jun 10, 2026
10 of 11 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog tasks to Done in CGC Progress Board Jun 10, 2026
macunha1 pushed a commit to macunha1/CodeGraphContext that referenced this pull request Jun 21, 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:feature GSSoC type bonus: feature 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:feature GSSoC type bonus: feature

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

CGC watch feature on start does not synchronize changes between curent files and database

2 participants