GitNexus/.github
Aakash Sharma d1a3edd333
perf(mcp): avoid O(n) git spawns on tools/list with many repos (#3259)
* perf(mcp): avoid O(n) git spawns on tools/list with many repos

toolSchemaRepoRequirements called listAllowedRepos -> listRepos -> checkStalenessAsync for every registered repo. With ~200 repos, this spawned 200 parallel git rev-list processes on every tools/list discovery call, causing a ~30s delay.

Replaced with a lightweight countRepos() method that reads the registry file once without spawning git processes, preserving full staleness checks for list_repos.

* Address PR review feedback (#3259)

Count the validated registry in countRepos so tools/list cannot advertise a multi-repo schema for ENOENT ghosts, and update the unrestricted listTools mocks to that contract.

Note: pre-existing failure in update-notice.test.ts (missing dist/cli/mcp.js) not addressed by this PR.
Co-authored-by: Cursor <cursoragent@cursor.com>

* Add a 200-repo tools/list bench for the countRepos path (#3259)

Pin the #1363 comparison (listRepos git fan-out vs validated countRepos / listTools) in-tree so the latency claim can be re-run. Also drop the change-history comments on the unrestricted schema arm.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Gate the tools/list bench with baselines and CI --check (#3259)

Exact registry/schema floors plus ratio timing, no millisecond ceiling, so restoring listRepos() on tools/list fails CI.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Address PR review feedback (#3259)

Align unrestricted tools/list schema flags with the refreshed registry snapshot, and make the bench reject a non-positive BENCH_REPS and isolate fixtures by N.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(autofix): apply prettier + eslint fixes via /autofix command

* Address PR review feedback (#3259)

Isolate the tools/list bench from GITNEXUS_MCP_READ_ONLY and create the default fixture under mkdtempSync so CodeQL is not looking at a predictable /tmp path.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-11 13:18:28 +01:00
..
actions fix(build): build the web UI from prepack, not from every npm ci (#3166) 2026-09-04 13:28:11 +01:00
claude-canary-runtime ci: move Node pins to the 22.18 floor 2026-07-21 10:09:34 +00:00
gitnexus-review-runtime ci: move Node pins to the 22.18 floor 2026-07-21 10:09:34 +00:00
ISSUE_TEMPLATE docs: agent development framework, GitHub templates, eval refactor (#479) 2026-03-25 06:48:41 +00:00
prompts feat(review): add PR reviewer swarm agents (#1851) 2026-05-29 18:24:16 +01:00
scripts feat(indexing): add Objective-C semantic indexing support (#3179) 2026-09-09 09:40:21 +00:00
workflows perf(mcp): avoid O(n) git spawns on tools/list with many repos (#3259) 2026-09-11 13:18:28 +01:00
actionlint.yaml fix(eval): self-hosted skill-evolution runner + sandbox Python 3 trust fix (#2600) 2026-07-21 14:40:20 +01:00
CODEOWNERS Update code owners in CODEOWNERS file 2026-07-02 08:05:15 +01:00
dependabot.yml chore(deps): bump github/codeql-action/analyze from 4.36.2 to 4.37.0 (#2506) 2026-07-17 11:40:51 +01:00
FUNDING.yml Fix duplicate GitHub funding entries 2026-07-02 08:03:31 +01:00
PULL_REQUEST_TEMPLATE.md docs: agent development framework, GitHub templates, eval refactor (#479) 2026-03-25 06:48:41 +00:00
release-drafter.yml ci: standardize workflow concurrency and automate release-note labeling (#837) 2026-04-15 13:24:53 +01:00
release.yml feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
vendored-grammars.json feat(indexing): add Objective-C semantic indexing support (#3179) 2026-09-09 09:40:21 +00:00
zizmor.yml fix(ci): look up fork prebuild PRs by head owner and branch (#3236) 2026-09-09 09:46:24 +01:00