feat(evals): C# call-retrieval eval measuring the Roslyn hybrid frontend win - #771
Conversation
… creations are credited
There was a problem hiding this comment.
Code Review
This pull request introduces multi-language retrieval evaluation for C#, adding a new evaluation script, tests, constants, and documentation. The review feedback correctly identifies a critical bug where the constant CSHARP_ORACLE_MISSING is referenced in evals/csharp_retrieval.py but is not defined in evals/logs.py, which would result in an AttributeError if the dotnet toolchain is missing.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Greptile SummaryThis PR adds a C# call-retrieval eval that compares cgr call edges with the Roslyn oracle. The main changes are:
Confidence Score: 5/5Safe to merge with minimal risk. The changes follow the existing multi-language retrieval eval pattern and include tests for the C#-specific edge cases covered by the PR. No files require special attention.
What T-Rex did
Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant CLI as evals.csharp_retrieval
participant Oracle as Roslyn call oracle
participant CGR as cgr graph capture
participant Score as PRF scorer
CLI->>Oracle: oracle_csharp_call_edges(target)
Oracle-->>CLI: first-party call edges + declared names
CLI->>CGR: cgr_csharp_call_edges(target, project, declared)
CGR-->>CLI: CALLS/INSTANTIATES file-name edges
CLI->>Score: score_csharp_retrieval(cgr, oracle)
Score-->>CLI: rows + missing/extra diff
CLI->>CLI: write outputs and render report
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant CLI as evals.csharp_retrieval
participant Oracle as Roslyn call oracle
participant CGR as cgr graph capture
participant Score as PRF scorer
CLI->>Oracle: oracle_csharp_call_edges(target)
Oracle-->>CLI: first-party call edges + declared names
CLI->>CGR: cgr_csharp_call_edges(target, project, declared)
CGR-->>CLI: CALLS/INSTANTIATES file-name edges
CLI->>Score: score_csharp_retrieval(cgr, oracle)
Score-->>CLI: rows + missing/extra diff
CLI->>CLI: write outputs and render report
|
… retrieval universe
…s creations are graded
|
@greptile review |
|
@greptile review |
|
@greptile review |
|



What
Adds
evals/csharp_retrieval.py— the file-level call-localization eval for C#, completing the multi-language retrieval matrix (Go/Rust/Java/TS/JS/PHP/Lua/C/C++/Scala already exist; the C# call oracle half,run_csharp_call_oracle, was already in place but had no consumer).For each first-party C# symbol, the eval grades which files call it: cgr's
CALLSandINSTANTIATESedges reduced to(caller_file, callee_simple_name)against Roslyn invocation and object-creation sites over the same first-party name universe.INSTANTIATEScounts becausenew T()on a type with no explicit constructor has no ctor node toCALL(found the hard way: Polly'sResiliencePipelineBuilderhas 65 creation sites and no explicit ctor — RED test in commit history).Why
This is the eval that finally measures the #738 Roslyn hybrid frontend's win, which the L1 structure eval could not show (structure was already ~0.999 under tree-sitter).
Results on Polly
CSHARP_FRONTEND=hybridThe hybrid frontend's location-keyed call facts recover 472 additional call edges (overloads, extension methods, cross-project dispatch) at zero precision cost. Residual misses are dominated by BCL simple-name collisions inherent to the name-restricted universe (
list.Addgraded against a first-partyAdd— the same documented tradeoff as every other language retrieval) plus call sites in projects outsidePolly.slnx(samples/,bench/), where the frontend deliberately degrades to heuristics.Validation
RED → GREEN in commit history (module-missing RED, then the implicit-ctor RED). Pinned by
codebase_rag/tests/test_csharp_retrieval_eval.py(oracle fixture, cgr-matches-oracle fixture, implicit-ctor creation, PRF scoring). README documents the eval and the measured win. Full suite: 5236 passed, 10 skipped.