Skip to content

Add Go support, an MCP server, pull request comments, and private repos in the web app - #9

Merged
harsharajkumar-273 merged 6 commits into
mainfrom
claude/practical-thompson-7w19xy
Oct 22, 2026
Merged

harsharajkumar-273 merged 6 commits into
mainfrom
claude/practical-thompson-7w19xy

Conversation

@harsharajkumar-273

@harsharajkumar-273 harsharajkumar-273 commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

What this adds

  • Go support. Go files are indexed with their own extractor and a package-aware resolver (packages are directories resolved through go.mod, methods attach to their types, struct embedding promotes methods, interfaces, variables typed through constructors, results, ranges, fields and typed constants, //go:build for linux/amd64). Checked with an oracle built on go/types: on Cobra, Gin, Logrus and gorilla/mux the first run, before any fix, found 96.8% of resolvable calls with 7,336 of 7,339 resolved edges correct; after the fixes it found 98.5% with all 7,550 correct. First-run output is kept beside the final numbers in docs/eval/oracle/. The post-fix numbers are not a blind test. Limits (interface implementations, one platform, untracked cases) are in docs/ORACLE-EVAL.md.
  • codegraph mcp: a Model Context Protocol server (stdio, no SDK dependency) so agents like Claude Code can ask what a change touches.
  • GitHub Action (action.yml): comments on each pull request with the symbols, files and tests it can reach. It ran for real on this PR and posted its comment.
  • Private repositories in the web app: paste a GitHub token (kept in the tab, sent only to api.github.com); it also raises the rate limit from 60 to 5,000 an hour.
  • Python function-local imports are now scoped to their function (one wrong resolved edge removed in each of Flask and Rich; no change in Requests or HTTPX).
  • The homepage lists Go and shows its accuracy beside TypeScript and Python.

Checked

  • Typecheck, 134 tests (including a browser-versus-disk parity check on a new Go fixture), the 17 browser flow checks, the file/folder/zip pickers, real drag-and-drop.
  • Token flow in a real browser against a mocked private repository.
  • Oracle runs for Go on five repositories (four evaluated, one used for development).

Not verified

  • The MCP server was exercised with hand-written JSON-RPC, not through a real client.
  • Loading from the live api.github.com (mocked in tests).

🤖 Generated with Claude Code

https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM

codegraph mcp lets AI agents ask what a change touches (impact of a
symbol or the current diff, callers and callees, search, overview).
The repository root is now a GitHub Action that comments on pull
requests with the symbols, files and tests a change can reach, and
this repository runs it on its own pull requests.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
codegraph Ready Ready Preview Oct 22, 2026 5:07pm UTC

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 858ecf98-a675-4c00-82fc-73ed10d2eb8c
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

An import inside a function body used to replace the file's import of the
same name, so two functions importing different classes as 'cls' got the
wrong target, and a local import named like its own enclosing function
was linked to that function. Local imports now apply only inside their
function and shadow same-named outer functions. Re-measured against
Jedi: one resolved error removed in each of Flask and Rich, no change in
Requests or HTTPX.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
… action manifest

The home page takes an optional personal access token (kept in the tab,
sent only to api.github.com) and then reads files through the contents
API, which also lifts the 60-requests-an-hour limit. Errors now say
whether the token was rejected or lacks access.

Also fixes action.yml: an unquoted description containing 'pull-requests:
write' was invalid YAML, so GitHub could not load the action.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

CodeGraph: what this change can reach

16 symbols in 12 files you did not edit could be affected by the 32 existing symbols this change edits (🟢 16 proven · 🟡 0 probable · 🔴 0 guessed by name).

Callers outside this change
Hops Symbol
🟢 1 packages/web/src/main.tsx
🟢 1 packages/extractors/src/index-files.ts#indexFiles
🟢 1 packages/web/src/model.ts#computeImpact
🟢 1 packages/web/src/model.ts#symbolsView
🟢 1 packages/web/src/views/Inspector.tsx#Inspector
🟢 2 packages/extractors/test/variables.test.ts
🟢 2 packages/extractors/src/indexer.ts#indexRepo
🟢 2 packages/web/src/engine/index-worker.ts#self.onmessage
🟢 2 packages/web/src/model.ts#buildView
🟢 2 packages/web/src/views/Workspace.tsx#Workspace
…and 6 more

Also: edits top-level code in 16 files; adds 69 new symbols.

10 test files to run
npx vitest run packages/analysis/test/analysis.test.ts packages/cli/test/cli.test.ts packages/extractors/test/browser-parity.test.ts packages/extractors/test/collisions.test.ts packages/extractors/test/go.test.ts packages/extractors/test/python.test.ts packages/extractors/test/typescript.test.ts packages/extractors/test/variables.test.ts packages/web/test/model.test.ts packages/web/test/sources.test.ts
  • packages/analysis/test/analysis.test.ts
  • packages/cli/test/cli.test.ts
  • packages/extractors/test/browser-parity.test.ts
  • packages/extractors/test/collisions.test.ts
  • packages/extractors/test/go.test.ts
  • packages/extractors/test/python.test.ts
  • packages/extractors/test/typescript.test.ts
  • packages/extractors/test/variables.test.ts
  • packages/web/test/model.test.ts
  • packages/web/test/sources.test.ts

Static analysis of calls and imports (TypeScript, JavaScript, Python, Go). 🟡 and 🔴 links are name matches, so check them before relying on them. Dynamic calls are invisible to it. CodeGraph

Go files are indexed with their own extractor and a package-aware
resolver: packages are directories resolved through go.mod, methods
attach to their receiver types wherever they are declared, embedding
promotes methods, and variables are typed through constructors,
results, ranges, fields and typed constants. Files are chosen for
linux/amd64 by name suffix and go:build line.

An oracle built on go/types scores every call site. On Cobra, Gin,
Logrus and mux the first run found 96.8 percent of resolvable calls with
7,336 of 7,339 resolved edges correct; after the fixes it found 98.5
percent with all 7,550 correct. The first-run output is kept next to the
final numbers. The name-guess fallback was removed because it was right
about one time in eight.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
@harsharajkumar-273 harsharajkumar-273 changed the title Add an MCP server for AI agents and a pull request impact comment Add Go support, an MCP server, pull request comments, and private repos in the web app Oct 22, 2026
An edit on a line that declares a local variable was attributed to the
variable, which has no callers, so the function's blast radius came
out empty. A module-level edit such as an import line expanded to
every symbol in the file, and brand-new files counted as thousands of
changed symbols. Diffs now map to the enclosing function, report new
symbols and deleted files separately, and leave file-level edits as
one change.

The comment counts only callers outside the files the change edits,
says plainly when a change only adds code, and gives a test command
per ecosystem. On this repository's own pull request it went from
1,046 changed symbols to 26 existing ones.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
@harsharajkumar-273
harsharajkumar-273 merged commit 239da5d into main Oct 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants