Repository navigation
feat(tooling): adopt CodeGraph for local navigation and PR impact - #35
xinvxueyuan wants to merge 3 commits into
Conversation
CodeGraph keeps its index in .codegraph/ inside the project, and WSL keeps a separate .codegraph-wsl/ next to it on a Windows drive. Both are rebuilt per machine, so they join the other agent tooling the repository already keeps out of version control. ESLint skips the same directories so a local index is never linted as project source. Assisted-by: Codex Signed-off-by: 新v学员 <xinvxueyuan@yeah.net>
Replace the GitNexus impact pipeline with CodeGraph. The analysis job installs CodeGraph beside the runner, indexes the pull request as data, and asks the command line for the changed sources, the tests that import them and the import cycles the change touches. The comment job renders one advisory comment, which does not gate the pull request. Affected tests are grouped by the crate they mirror, so a contributor can run the group named after the module they changed. Tests reached only through dependencies are listed separately and the traversal depth is stated, because that list is deliberately broader than the tests that must run. Delete the GitNexus MCP client, the draw.io and SVG renderers and their tests. CodeGraph ships its own runtime, so it is installed with npm beside the runner rather than added to this project's dependencies. Assisted-by: Codex Signed-off-by: 新v学员 <xinvxueyuan@yeah.net>
Add a Code graph section to the contributing guide: how to install CodeGraph, turn telemetry off, build the index and wire it into one agent locally, plus the queries that answer caller and impact questions. Record the WSL directory split and that the pull request comment is advisory. Point the agent guide at that section so cross-crate navigation can use the optional index instead of a file-by-file search. Assisted-by: Codex Signed-off-by: 新v学员 <xinvxueyuan@yeah.net>
|
Sorry @xinvxueyuan, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 20 hours and 21 minutes by commenting |
PR Summary by QodoAdopt CodeGraph for local navigation and advisory PR impact reports
AI Description
Merge Risk
|
Impact analysisRisk: High 14 files, 202 indexed symbols, 9 affected processes Note The changed-symbol list is capped. The counts and risk were computed over the full set. 10 per-symbol caller lookups could not resolve callers; confirm those symbols with a text search. Changed symbols
Affected processes
Note Upstream callers were traced for 10 symbols; 70 further eligible symbols were not queried. Analyzed The draw.io mind map, Mermaid source and SVG preview are in the |
Code Review by Qodo
1. Odd filenames hide affected tests
|
Summary
Adopt CodeGraph as the repository's code-graph tool: contributors can index the
workspace locally and ask caller and impact questions of their own agent, and
the PR impact workflow now builds its report with CodeGraph instead of GitNexus.
The posted comment stays advisory and does not gate a pull request.
Motivation
The repository already generated an impact report, but it came from GitNexus
through an MCP stdio client that only CI could run, so the same questions were
answered locally by reading files one at a time. CodeGraph covers both halves
with one tool and a plain command line:
codegraph affectedmaps a changedsource file onto the tests that import it, and
codegraph cyclesreports importcycles.
Changes
.github/workflows/pr-impact-analysis.yml: install@colbymchenry/codegraph@1.6.4beside the runner, index the pull request as data with
codegraph init, andquery it from the analysis job. Every guard stays: trusted base checkout, the
availablegate, the live-head check, the artifact, and the comment marker.scripts/impact-analysis.ts: group affected tests by the crate they mirror,so the first group is the one to run for the module that changed; list tests
reached only through dependencies separately and state the traversal depth.
scripts/impact-report.ts,scripts/impact-pr.ts: render the comment from apure model and read the graph through the CLI. A failed query fails the job
instead of publishing an empty report that reads like a clean result.
scripts/post-impact-comment.ts: the artifact still holds the full report;the draw.io and SVG sentence is gone.
scripts/impact-mcp.ts, its test andscripts/impact-mindmap.ts; theMCP client and the diagram renderers had no other caller.
.gitignore,eslint.config.js: ignore the local.codegraph/and.codegraph-wsl/indexes.CONTRIBUTING.md,AGENTS.md: install, index and query the tool locally, keepagent configuration local, and use a separate WSL index.
Testing
Run on Windows 11, Node 26.13.1, pnpm 12.18.0, the pinned Rust 1.100.0:
The analysis was also run end to end against the real CLI, first on a worktree
where only
.gitignoreandeslint.config.jshad changed, then on a base 81files behind
origin/main, which exercised 45 source files, 18 test files and97 affected tests across 4 touched cycles. Those runs are how the grouping and
the
codegraph cyclesexit status were verified, not only by unit tests.Not run here: GitHub Actions has not executed this workflow revision yet. The
introducing PR still runs the base branch's GitNexus job, so the first CodeGraph
run happens on
mainafter merge. The architecture check also reports that 4entries in
.deslop-please.alloware already fixed onmain; that debtpredates this change and is left untouched.
Breaking Changes
None for the launcher. The PR impact comment keeps its marker, so the next run
updates the existing comment. The local CodeGraph index is optional and rebuilt
per machine.
Related
Introduces colbymchenry/codegraph
in place of the GitNexus pipeline added for PR impact reporting.