GitNexus/gitnexus/test/unit/scope-resolution/csharp
Gergő Magyar 43a842724d
fix: bind Razor ViewComponent names to in-repo classes (#3104)
* fix: bind Razor ViewComponent names to in-repo classes

Index Component.InvokeAsync("Name") and in-repo ViewComponent("Name")
as CALLS to workspace ViewComponent classes so impact sees real callers
instead of an empty graph. SDK types stay unresolved.

Fixes #2991

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

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

* fix: scan Razor and C# ViewComponent names without regex holes

Use string-aware lexers so combined Name= aliases, code-block calls,
this/base helpers, and escaped @@ markup match ASP.NET instead of
emitting false or missing CALLS.

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

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

* perf: skip Razor scans without ViewComponent tokens

Preserve the lexer correctness fixes while avoiding per-character work for
the common view that cannot contain a supported invocation.

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

* test: gate Razor ViewComponent extractor scaling in CI

Wire mixed-corpus tripwire + GITNEXUS_BENCH loader/scaling checks into the dedicated ci-tests benchmarks job so the #2991 lexer cannot regress without a wall-clock gate.

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

* fix: read Razor views through one file handle

CodeQL js/file-system-race: the size gate stat'd the path and the read
re-resolved it, so a template swapped in between could be read past the
size ceiling. Both now go through the same handle.

Co-authored-by: Cursor <cursoragent@cursor.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-08-30 22:41:13 +00:00
..
csharp-captures-golden.test.ts perf(ingestion): linearize scope-capture across all languages + Python import resolution (O(n²)→O(n)) (#1918) 2026-05-30 19:44:22 +01:00
csharp-captures.test.ts fix(csharp): qualified/alias constructor names, : base/: this initializers, generic type-arg strip (#2046) 2026-06-05 07:04:57 +01:00
csharp-hooks.test.ts fix(csharp): eliminate global-namespace typeBindings O(files²) OOM (#1871) (#1954) 2026-05-31 18:21:07 +01:00
csharp-imports.test.ts fix(csharp): stop spurious IMPORTS edges from ungated using-resolution (#1881) (#1908) 2026-05-30 09:56:26 +01:00
csharp-interpret.test.ts fix(csharp): qualified/alias constructor names, : base/: this initializers, generic type-arg strip (#2046) 2026-06-05 07:04:57 +01:00
csharp-qualified-type-names.test.ts fix(csharp): qualified/alias constructor names, : base/: this initializers, generic type-arg strip (#2046) 2026-06-05 07:04:57 +01:00
razor-view-components.test.ts fix: bind Razor ViewComponent names to in-repo classes (#3104) 2026-08-30 22:41:13 +00:00