Repository navigation
fix(context): register repos before the already-indexed skip guard (#1317) - #1691
Merged
Merged
Conversation
…dy-indexed skip guard (#1317) The early 'already indexed. Skipping.' return sat above register_repo_in_context, so a graph populated by any path that skipped registration (the MCP add_code_to_graph tool, an interrupted run) could never reconcile config.yaml through the normal command — 'cgc context list' showed 'Repos Linked: 0' forever, self-perpetuating exactly as #1317 diagnosed. Registration (idempotent by design) now runs first, and it uses the RESOLVED context name so indexing under a default named context registers too, not only an explicit --context flag. Hermetic CLI tests cover the desync-reconciliation path and the default-context path.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ |
Contributor
🔍 PR Code Graph Analysisfix(context): register repos before the already-indexed skip guard (#1317) (#1691) 📊 Interactive VisualizationView the blast radius graph: PR Reviewer Dashboard 📦 ArtifactsThe graph JSON has been uploaded as a build artifact: Generated by CodeGraphContext using FalkorDB Lite |
This branch was successfully deployed
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.
Exactly the ordering bug @apklein diagnosed: the
already indexed. Skipping.early return sat aboveregister_repo_in_context, so once a named context's graph was populated by any path that skipped registration (MCPadd_code_to_graph, an interrupted run), every subsequentcgc index --contextshort-circuited before the registration line — permanently self-perpetuatingRepos Linked: 0.Registration (idempotent by design — verified) now runs before the guard, and it uses the resolved context name, fixing the sibling gap where indexing under a default named context (no explicit
--contextflag) never registered at all.Two hermetic CLI tests: (1) simulate the desync (populated graph, emptied
repos:list) and prove the skip path reconciles it; (2) prove the default-named-context path registers. Unit suite 1457 green; CLI integration slice green.Fixes #1317