GitNexus/gitnexus/bench
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
..
callable-value-flow fix(scope-resolution): parse def coordinates after file paths (#2743) 2026-07-30 07:34:32 +01:00
cfg feat(impact): opt-in PDG-backed impact mode - statement + inter-procedural slicing, resolved-callee-id soundness, mutation-oracle validated (#2227) 2026-06-20 12:04:32 +01:00
cpp-qualified-ns perf(cpp): index qualified namespace members once per pipeline run (#2788) (#2794) 2026-08-02 15:52:33 +01:00
cross-repo-trace fix(group)!: stop group sync claiming matching it never did (#3020) 2026-08-27 18:27:32 +01:00
emit-persistence feat(indexing): add Objective-C semantic indexing support (#3179) 2026-09-09 09:40:21 +00:00
finalize-reexport fix(python): resolve calls through __init__.py re-exports (#2864) 2026-08-09 12:21:06 +01:00
impact-pdg fix(impact-pdg): make the Impact PDG Mutation Report workflow pass (3 latent oracle bugs) (#2258) 2026-06-20 20:40:28 +01:00
import-target fix(cobol): prefer copybook dirs so COPY EXTERNAL does not hit vendor decoys (#3240) 2026-09-10 15:42:59 +01:00
java-lombok-synthesis feat(jvm): synthesize Lombok and Kotlin JVM accessor methods (#2885) 2026-08-31 17:55:52 +00:00
java-wildcard-route-constants feat(jvm): fold Java static wildcards and Kotlin star imports for route constants (#3110) 2026-08-31 21:58:40 +00:00
kotlin-import-target fix(kotlin): resolve imports from declared packages (#2990) 2026-08-18 20:47:30 -07:00
kotlin-jvm-accessors feat(jvm): synthesize Lombok and Kotlin JVM accessor methods (#2885) 2026-08-31 17:55:52 +00:00
kotlin-star-route-constants feat(jvm): fold Java static wildcards and Kotlin star imports for route constants (#3110) 2026-08-31 21:58:40 +00:00
lib feat(jvm): fold Java static wildcards and Kotlin star imports for route constants (#3110) 2026-08-31 21:58:40 +00:00
mcp-tools-list perf(mcp): avoid O(n) git spawns on tools/list with many repos (#3259) 2026-09-11 13:18:28 +01:00
objective-c-resolution feat(indexing): add Objective-C semantic indexing support (#3179) 2026-09-09 09:40:21 +00:00
parse-dispatch-rounds perf(parse): tighten the dispatch-round memory bound and unclamp the worker-pool override (#3200) 2026-09-07 13:53:31 +01:00
python-scope feat: add Zig language support (#1432) 2026-09-03 13:29:42 +01:00
python-workspace-import-scan fix(group): detect function-local Python imports (#3254) 2026-09-11 06:23:52 +00:00
receiver-resolution feat: add Zig language support (#1432) 2026-09-03 13:29:42 +01:00
ruby-gem-resolution fix(ruby): guard gem requires with dependency metadata (#3096) 2026-09-10 16:04:11 +01:00
schema-pairs fix(scope-resolution): link Record graph nodes (#2871) 2026-08-07 18:33:27 +01:00
scope-capture fix(resolution): label fallback guesses and preserve export visibility (#3190) 2026-09-10 11:38:19 +01:00
scope-emission fix(scope-resolution): resolve calls through a closure-valued binding across languages (#2693) (#2695) 2026-07-27 07:52:18 +01:00
spring-conditionals feat(spring): model profiles, conditions, and auto-configuration (#2678) 2026-07-28 07:05:41 +01:00
spring-config-bindings feat(kotlin): bind Spring config consumers on Kotlin sources (#3126) 2026-09-01 10:32:09 +00:00
v8-sidecar perf(store): V8 sidecars plus hardlinked ParsedFile restore (#3099) 2026-08-30 20:50:20 +00:00
value-ref-resolution fix(zig): model callable-value references, and stop reporting their absence as exact (#3219) 2026-09-09 20:12:17 +00:00
zig-cross-file-resolution fix(zig): resolve cross-file static gates (#3185) 2026-09-07 07:19:30 +01:00
analyze-phase-breakdown.md perf(scope-resolution): stop re-scanning the ParsedFile store once per language (#3211) 2026-09-08 13:48:30 +01:00
parse-throughput.md fix(parse): correct worker-pool docs drift + surface worker-side stack on crash (#2068) (#2070) 2026-06-08 07:20:12 +01:00