Skip to content

Add universal C# and ASP.NET graph support - #243

Merged
forhappy merged 1 commit into
mainfrom
agent/csharp-aspnet-universal-graph
Aug 14, 2026
Merged

Add universal C# and ASP.NET graph support#243
forhappy merged 1 commit into
mainfrom
agent/csharp-aspnet-universal-graph

Conversation

@forhappy

Copy link
Copy Markdown
Contributor

Summary

  • replace the legacy C# raw graph extractor with the versioned universal evidence adapter
  • add deterministic cross-file C# calls, construction, ownership, base-type, override, and typed member resolution
  • move ASP.NET MVC routing to an evidence-backed universal framework pack, including aliases, AcceptVerbs, [NonAction], token composition, absolute templates, and overload-safe handlers
  • preserve ASP.NET Minimal API and nested MapGroup extraction from current main
  • update graph normalization, qualification coverage, framework contracts, documentation, and changelog

Why

C# was still outside Compass's shared evidence/validation/resolution boundary. That made language behavior harder to qualify consistently and left ASP.NET controller routes dependent on the replaced raw extraction path. This cutover brings C# into the same typed, bounded, deterministic pipeline used by the other optimized languages without adding a Graphify runtime dependency.

Compatibility and impact

This is an intentional hard cutover of the internal C# production extractor. Public Code Graph v1 remains versioned and validated. C# identities and provenance now come from compass.languages.csharp.universal and compass.resolve.csharp.universal; ASP.NET MVC routes come from compass.frameworks.aspnet. Existing ASP.NET Minimal API coverage is retained.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --workspace --lib --bins --locked -- -D warnings
  • cargo test --workspace --lib --bins --locked
  • cargo test -p compass-languages --test csharp_universal_conformance --locked
  • cargo test -p compass-resolve --test universal_resolution --locked (184 passed)
  • cargo test -p compass-resolve --test native_routes --locked (11 passed)
  • ./scripts/qualify_code_graph_v1.sh --fixtures-only
  • sh scripts/check_product_boundary.sh

Fixture qualification passed all semantic, deterministic-byte, scale, and framework assertions. Its accepted partial-publication diagnostics reported 6 omitted nodes and 7 omitted edges with zero quarantined identity collisions.

Real-repository comparison

The implementation was also evaluated on dotnet/aspnetcore at a5ee747919141424f649e308cb91ec40a0649fb9 against Graphify 0.9.37:

  • Compass: 303,816 nodes, 395,164 edges, 506 route nodes, 575 routes_to edges, and zero dangling endpoints
  • Graphify: 143,463 nodes, 360,715 edges, no route nodes, and 10,533 dangling endpoints
  • Compass completed in 80.34s versus Graphify's 152.50s in that run; peak RSS was higher at 4.93 GB versus 1.25 GB

The full-corpus run also identified follow-up hardening areas outside this PR's initial cutover: 116 zero-width InvalidRange C# file failures, low hierarchy recall, receiver-typed cross-file call gaps, limited Minimal API recall, and peak-memory reduction.

@forhappy
forhappy marked this pull request as ready for review August 14, 2026 05:32
@forhappy
forhappy merged commit c6e4223 into main Aug 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant