GitNexus/gitnexus/bench
Abhigyan Patwari 565e50276d
fix(routes): resolve Express registrations made through helper parameters (#3629)
* fix(routes): resolve Express registrations made through helper parameters (#3487)

#3603 made Express receivers provenance-proven, which removed the receiver-
name false positives but also every registration on a function parameter:
a parameter has no binding value, so `app.get(...)` inside a helper never
resolved. On GitNexus's own server that dropped `* /api/mcp`
(`mountMCPEndpoints(app, ...)`) and `GET /` (`registerWebUI(app, ...)`),
and the two SSE progress routes registered by
`mountSSEProgress(app, '/api/.../progress', jobs)` were never found at all
(#3487, item a).

Named function values in the route facts now carry an identity and the
binding id of each parameter (a TypeScript `this` parameter takes no
position, and a parameter written anywhere in the body, nested closures
included, takes none either). Calls to plain functions and to namespace or
default import members are recorded as invocations, keeping only the
arguments that can carry an allocation or a literal path; arguments after a
spread have no position. The resolver resolves a registration whose
receiver, literal path or mounted child is a parameter through each call
site of its function, once per site and in the helper's file. This is one
hop only: a site argument that is itself a parameter does not resolve. When
no call site is recorded, the call is evaluated as written, so an unknown
mount path still suppresses its child router instead of exposing its paths
at the root.

Only calls whose callee is named like a function that registers on its
parameters are evaluated, which keeps resolution at its previous cost on
repositories with many helper calls. A function value's invalidation key now
includes its identity, so a property write on one function
(`Button.displayName = ...`) no longer disables every other. The group
layer shares the resolver, so it gets the same routes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(routes): forward mounted-child parameters and aliased helper imports

Review follow-ups for the helper-parameter forwarding:

- A helper that forwards only its mounted router (`function mountChild(child)
  { app.use('/api', child) }`) was never resolved, because the forwarded
  function was chosen from the receiver and path alone. Any parameter among
  the receiver and arguments now selects it, as long as all come from one
  function.
- A helper called through an aliased import (`{ mountSSEProgress as
  mountProgress }`) was filtered out before its call sites were recorded,
  since the filter compared only the local name. It now also accepts the
  imported name.
- A write to a same-named local declared in a nested block (`{ let app;
  app = other; }`) discarded the outer parameter. A write to a binding that
  a nested block, function or catch clause declares no longer counts.
- The fixture's `registerWebUI` uses its static directory.

The release tool-accuracy gate now passes `routes.helper-registration`, so
its known-gap allowance is removed. Its expected file moves from the caller
(`api.ts`) to the helper (`progress.ts`): an Express route belongs to the
file of its `app.get` call, which is also where its handler and response
keys are, as for every directly registered route.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(routes): treat destructuring reassignment as a parameter write

`[app] = [other]` reassigns `app`, but the write check compared the whole
target text (`[app]`) with the parameter name, so the parameter stayed
forwardable and later registrations used the call-site argument. A
destructuring target now writes each name it binds; a member target still
writes only a property. Also drops an unused local flagged by CodeQL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(routes): follow helpers exported under another name

`export { mountRoutes as setup }` records the export as a binding, so the
call-site filter knew the helper only as `mountRoutes` and skipped callers
importing `setup`. An export of a binding to a named function now adds its
exported name too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
2026-10-18 22:13:10 +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
embedding-identities fix(embeddings): reject corrupt identities before mutation (#3614) 2026-10-17 18:45:28 +01:00
embedding-inputs fix(embeddings): budget generated inputs and isolate rejections (#3615) 2026-10-17 19:37:30 +01:00
emit-persistence fix(rename): extend safe refactoring and flow coverage across languages (#3557) 2026-10-13 08:38:17 +03:00
finalize-reexport fix(python): resolve calls through __init__.py re-exports (#2864) 2026-08-09 12:21:06 +01:00
go-route-resolution feat(go): index gin/echo routes and report them in impact (#3402) (#3417) 2026-10-01 10:22:45 +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(rename): extend safe refactoring and flow coverage across languages (#3557) 2026-10-13 08:38:17 +03:00
incremental-write-integrity test(embeddings): cover CodeEmbedding scans after delete and re-create (#3569, #3474) (#3623) 2026-10-18 11:01:04 +01:00
inline-taint fix(taint): report inline and factory handler flows (#3612) 2026-10-17 20:22:58 +00: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(ingestion): add tRPC procedure detection and MCP chain/route surfacing (#3339) 2026-09-21 09:44:42 +01:00
mcp-tools-list fix(rename): extend safe refactoring and flow coverage across languages (#3557) 2026-10-13 08:38:17 +03:00
objective-c-resolution feat(indexing): add Objective-C semantic indexing support (#3179) 2026-09-09 09:40:21 +00:00
parse-cache-identity feat(cache): derive parser and PDG cache identities automatically (#3606) 2026-10-17 07:38:45 +03:00
parse-dispatch-rounds feat(cache): derive parser and PDG cache identities automatically (#3606) 2026-10-17 07:38:45 +03:00
python-scope fix(python): retain nullable factory receiver types (#3595) 2026-10-18 15:39:40 +01:00
python-workspace-import-scan fix(group): detect function-local Python imports (#3254) 2026-09-11 06:23:52 +00:00
receiver-resolution fix(routes): link base-URL fetch calls made through wrapper chains (#3628) 2026-10-18 22:11:37 +01:00
rename fix(rename): apply the exact reviewed edit plan (#3617) 2026-10-17 19:38:01 +01:00
ruby-gem-resolution fix(ruby): guard gem requires with dependency metadata (#3096) 2026-09-10 16:04:11 +01:00
rust-cargo-targets fix(rust): respect Cargo target boundaries in name fallback (#3294) 2026-09-16 11:36:07 +01:00
schema-pairs fix(scope-resolution): link Record graph nodes (#2871) 2026-08-07 18:33:27 +01:00
scope-capture fix(taint): report inline and factory handler flows (#3612) 2026-10-17 20:22:58 +00:00
scope-emission fix(scope): resolve local imports by lexical ownership (#3532) 2026-10-10 08:13:55 +03: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
staged-publication fix(storage): preserve published graph on rebuild failure (#3613) 2026-10-17 18:45:11 +01:00
swift-package-imports fix(swift): model Swift modules like the compiler (nested packages, Xcode targets, linear visibility) (#3387) 2026-09-27 06:24:35 +01:00
symlink-coverage fix(indexing): converge coverage around directory symlinks (#3616) 2026-10-17 19:37:45 +01:00
tool-accuracy fix(routes): resolve Express registrations made through helper parameters (#3629) 2026-10-18 22:13:10 +01:00
trpc-route-extractor feat(ingestion): add tRPC procedure detection and MCP chain/route surfacing (#3339) 2026-09-21 09:44:42 +01:00
v8-sidecar perf(store): V8 sidecars plus hardlinked ParsedFile restore (#3099) 2026-08-30 20:50:20 +00:00
value-ref-resolution fix(python): resolve calls through aliased package re-exports (#3504) 2026-10-08 13:51:20 +03: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