Skip to content

Add .NET feature mapping and validation support#58

Merged
steipete merged 6 commits into
openclaw:mainfrom
SimonGuldager:feat/dotnet-support
May 18, 2026
Merged

Add .NET feature mapping and validation support#58
steipete merged 6 commits into
openclaw:mainfrom
SimonGuldager:feat/dotnet-support

Conversation

@SimonGuldager
Copy link
Copy Markdown
Contributor

@SimonGuldager SimonGuldager commented May 17, 2026

Summary

  • Add deterministic C#/.NET feature mapping for solutions, projects, source groups, ASP.NET controllers, minimal API endpoints, route groups, and test projects.
  • Detect .NET languages/frameworks/package managers and generate conservative dotnet build / dotnet test validation commands with platform-aware shell quoting.
  • Document the new mapper and extend mapper, detection, and shell quoting coverage.

Why

C# and .NET repositories previously had weak or missing deterministic feature ownership, which made review selection and validation less useful than the existing language mappers. This brings .NET support in line with the project's convention-based mapping approach while staying conservative around ambiguous workspaces.

Credits

Thanks to @danielmarbach for PR #49. This PR incorporates/adapts ideas from that work, especially .sln/.slnx discovery and F#/VB project coverage.

Validation

  • npx pnpm@11.1.2 typecheck
  • npx pnpm@11.1.2 lint
  • npx pnpm@11.1.2 format:check
  • npx pnpm@11.1.2 build
  • npx pnpm@11.1.2 vitest run src/mapper.test.ts -t "dotnet|\\.NET|C#|ASP\\.NET|Program.cs|route group"
  • npx pnpm@11.1.2 vitest run src/shell.test.ts
  • npx pnpm@11.1.2 test (458 passed | 1 skipped)
  • Smoke-tested mapping against a real API .NET solution using an external /tmp state directory: 365 .NET seeds became 343 features, console/library projects did not map as ASP.NET routes, and helper-created route-group prefixes mapped correctly.

@danielmarbach
Copy link
Copy Markdown
Contributor

Did you see #49? Maybe we can Collab there?

@SimonGuldager
Copy link
Copy Markdown
Contributor Author

@danielmarbach : Yes, I did see PR #49, and I looked through it closely. There were some good ideas in there, especially around .sln/.slnx discovery and F#/VB project coverage, and i incorporated/adapted those parts.

I ended up going with PR #58 because it takes a broader end-to-end pass at .NET support: detection and conservative validation commands, platform-safe shell quoting, ASP.NET controller and minimal API route mapping, route-group handling, test association, fixture/generated/cache exclusions, nested project handling, XML-comment-safe project classification, source-only C# fallback, and more regression coverage.

I also smoke-tested it against one of my real C# API solution, which exposed and fixed another route-group edge case. So it wasn’t that PR #49 was ignored; I just felt this version was closer to the existing clawpatch mapper style and had more of the edge cases worked through.

Happy to credit/cross-reference your PR since it helped shape part of the final approach.

@danielmarbach
Copy link
Copy Markdown
Contributor

danielmarbach commented May 17, 2026

Happy to close mine. Doesn't matter which one was first. It's just code 😎😂

I've also taken tunit into account since it is growing in the community.

Any reasons you are not adding dotnet format?

FYI I did verify again AWS SDK, rabbitmq and azure dotnet SDK. AWS and Azure SDKs are quite monstrous

@steipete steipete force-pushed the feat/dotnet-support branch from f23c35c to 06e7eaf Compare May 18, 2026 00:57
@steipete steipete merged commit 5ab0460 into openclaw:main May 18, 2026
2 checks passed
@danielmarbach
Copy link
Copy Markdown
Contributor

Nice!

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.

3 participants