Skip to content

Add .NET intelligence, verification, MCP hosting, and native binaries - #37

Merged
Telli merged 4 commits into
mainfrom
codex/dotnet-intelligence-verification-mcp-binaries
Oct 16, 2026
Merged

Telli merged 4 commits into
mainfrom
codex/dotnet-intelligence-verification-mcp-binaries

Conversation

@Telli

@Telli Telli commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add compiler-backed .NET intelligence and permission-gated verification to the existing coding-agent runtime:

  • Resolve exact symbols, references, hierarchy, and compiler diagnostics through a bounded Roslyn/MSBuild workspace cache. Semantic rename validates the complete edit plan and records checkpoint-linked undo/redo mutations, including recovery after failure or cancellation.
  • Share build/test verification between verify, /verify, and verify_workspace. Restore is explicit; automatic verification and bounded repair are opt-in. Failed verification produces truthful completion and exit status, while prompt assembly consumes approved cached diagnostics without running builds.
  • Host the existing tool executor through the official MCP SDK over stdio or Streamable HTTP. The server defaults to read-only, enforces its curated tool allowlist on calls, and gives elevated clients independent durable sessions. HTTP uses explicit loopback listeners isolated from workspace/environment configuration, validates Host/Origin, and requires authentication for elevation or an explicitly allowed HTTPS proxy host.
  • Add six self-contained native binary publish/smoke jobs, archive checksums, and release gates alongside the existing NuGet tool and SDK packages. Package smoke uses an isolated cache and local source mapping so reused preview versions cannot resolve stale packages.

Validation

  • dotnet build SharpClawCode.sln --configuration Release --warnaserror — zero warnings/errors, including examples.
  • dotnet test SharpClawCode.sln --configuration Release — 415 passed: 280 unit, 115 integration, 20 parity.
  • Relevant package, CLI, MCP, plugin, and cross-platform checks were run: all 22 production packages and 22 symbol packages created; clean SDK consumer and NuGet CLI installation passed; real stdio/HTTP MCP clients, permission denials, semantic rename/undo, TRX verification, bounded repair, cancellation/recovery, and linked-source boundary tests passed.
  • Configured coverage floor passed at 41.31% (required 38%). Scenario gates, DocFX with warnings as errors, dependency audit of 35 projects, VS Code compilation, and actionlint validation passed.
  • Relocated macOS ARM64 archive passed native startup with isolated runtime discovery, SQLite state, MCP protocol-only stdout/EOF shutdown, semantic loading, durable rename undo, and real build/test checks.

Risk and compatibility

  • Durable JSON/session formats remain compatible or include a migration — new configuration, result fields, and event contracts are additive; automatic verification remains disabled by default.
  • Dangerous file, shell, and network operations still pass through permissions — cold MSBuild evaluation requires execution approval; verification uses the shell scope; MCP calls share the normal executor.
  • No credentials, local state, or generated secrets are included — native archives, local traces, caches, and build output remain ignored.

SDK-dependent semantic/build/test features still require a compatible installed .NET SDK and restored project assets. Query compilations exclude project-supplied analyzers/source generators. Automatic verification initially covers recorded supported file mutations.

Only macOS ARM64 native execution was completed locally. Windows x64/ARM64, Linux x64/ARM64, and macOS x64 acceptance remain gated on their matching release CI runners; cross-publishing is not counted as execution. This PR does not publish a release.

Review follow-up

All 15 review threads were addressed in f597334 with regression coverage: fixture shared-runtime startup, HTTP listener isolation and TLS proxy hosts, evaluated test/restore properties, SDK generator support and rename safety, approval coordination and load cleanup, verification lock/timeouts and TFM deduplication, diagnostic classification/cache retention, and install tests against the exact release package source.

The framework-dependent CLI and aggregate SDK package require the ASP.NET Core 10 shared runtime, included with the .NET 10 SDK. Self-contained binaries include it. Remote HTTP access now uses a local TLS reverse proxy; non-loopback plaintext listeners are rejected. Rename is disabled with an explicit unverified result when custom generators are excluded.

Windows CI follow-up: 08b0cda releases host-owned SQLite pools during disposal and adds a database lifecycle regression; 3e4d107 synchronizes cancellation parity through typed turn-start events without racing session file writes. All 415 local tests pass, and the final observer regression passes separately.

Copilot AI balanced review requested due to automatic review settings October 8, 2026 22:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 131 files, which is 31 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: efd52566-d27f-4a36-bc55-74296cf87225
📥 Commits

Reviewing files that changed from the base of the PR and between 72c2967 and 3e4d107.

📒 Files selected for processing: 131
  • .github/scripts/Publish-Binaries.ps1
  • .github/scripts/Test-Binary.ps1
  • .github/scripts/Test-Packages.ps1
  • .github/workflows/release.yml
  • Directory.Packages.props
  • README.md
  • SharpClawCode.Packages.slnf
  • SharpClawCode.sln
  • docs/architecture.md
  • docs/binary-distribution.md
  • docs/dotnet-intelligence.md
  • docs/mcp-server.md
  • docs/runtime.md
  • docs/superpowers/plans/2026-10-06-dotnet-intelligence-verification-mcp-distribution.md
  • docs/testing.md
  • docs/toc.yml
  • docs/tools.md
  • docs/verification.md
  • src/SharpClaw.Code.Cli/Composition/CliServiceCollectionExtensions.cs
  • src/SharpClaw.Code.Cli/Program.cs
  • src/SharpClaw.Code.Cli/Rendering/TextOutputRenderer.cs
  • src/SharpClaw.Code.Cli/SharpClaw.Code.Cli.csproj
  • src/SharpClaw.Code.Commands/Handlers/McpCommandHandler.cs
  • src/SharpClaw.Code.Commands/Handlers/VerifyCommandHandler.cs
  • src/SharpClaw.Code.Commands/Handlers/VersionCommandHandler.cs
  • src/SharpClaw.Code.Commands/PromptInvocationService.cs
  • src/SharpClaw.Code.Commands/Repl/ReplHost.cs
  • src/SharpClaw.Code.Mcp.Server/SharpClaw.Code.Mcp.Server.csproj
  • src/SharpClaw.Code.Mcp.Server/SharpClawMcpHttpServer.cs
  • src/SharpClaw.Code.Mcp.Server/SharpClawMcpServer.cs
  • src/SharpClaw.Code.Mcp.Server/SharpClawMcpToolBridge.cs
  • src/SharpClaw.Code.Mcp/Abstractions/ISharpClawMcpServer.cs
  • src/SharpClaw.Code.Mcp/Models/SharpClawMcpServerOptions.cs
  • src/SharpClaw.Code.Memory/Abstractions/IDotNetWorkspaceEvaluationAuthorization.cs
  • src/SharpClaw.Code.Memory/Abstractions/IDotNetWorkspaceSemanticService.cs
  • src/SharpClaw.Code.Memory/Abstractions/IDotNetWorkspaceTargetResolver.cs
  • src/SharpClaw.Code.Memory/MemoryServiceCollectionExtensions.cs
  • src/SharpClaw.Code.Memory/Services/DotNetProjectEvaluation.cs
  • src/SharpClaw.Code.Memory/Services/DotNetSemanticWorkspaceCache.cs
  • src/SharpClaw.Code.Memory/Services/DotNetWorkspaceSemanticQueries.cs
  • src/SharpClaw.Code.Memory/Services/DotNetWorkspaceSemanticRename.cs
  • src/SharpClaw.Code.Memory/Services/DotNetWorkspaceSemanticService.cs
  • src/SharpClaw.Code.Memory/Services/DotNetWorkspaceTargetResolver.cs
  • src/SharpClaw.Code.Memory/Services/SqliteWorkspaceKnowledgeStore.cs
  • src/SharpClaw.Code.Memory/SharpClaw.Code.Memory.csproj
  • src/SharpClaw.Code.Permissions/Models/PermissionRequestSourceKind.cs
  • src/SharpClaw.Code.Protocol/Commands/TurnExecutionResult.cs
  • src/SharpClaw.Code.Protocol/Events/RuntimeEvent.cs
  • src/SharpClaw.Code.Protocol/Events/VerificationEvents.cs
  • src/SharpClaw.Code.Protocol/Models/CSharpRenameModels.cs
  • src/SharpClaw.Code.Protocol/Models/CSharpToolModels.cs
  • src/SharpClaw.Code.Protocol/Models/ConversationTurn.cs
  • src/SharpClaw.Code.Protocol/Models/DotNetSemanticModels.cs
  • src/SharpClaw.Code.Protocol/Models/OpenCodeParityModels.cs
  • src/SharpClaw.Code.Protocol/Models/SharpClawWorkflowMetadataKeys.cs
  • src/SharpClaw.Code.Protocol/Models/VerificationModels.cs
  • src/SharpClaw.Code.Protocol/Models/VerificationPolicyModels.cs
  • src/SharpClaw.Code.Protocol/Serialization/ProtocolJsonContext.cs
  • src/SharpClaw.Code.Runtime/Composition/RuntimeServiceCollectionExtensions.cs
  • src/SharpClaw.Code.Runtime/Configuration/SharpClawConfigService.cs
  • src/SharpClaw.Code.Runtime/Diagnostics/WorkspaceDiagnosticsService.cs
  • src/SharpClaw.Code.Runtime/Mutations/CheckpointMutationCoordinator.cs
  • src/SharpClaw.Code.Runtime/Mutations/MutationWorkspaceApplier.cs
  • src/SharpClaw.Code.Runtime/Orchestration/ConversationRuntime.cs
  • src/SharpClaw.Code.Runtime/Server/SqliteUsageMeteringStore.cs
  • src/SharpClaw.Code.Runtime/Turns/DefaultTurnRunner.cs
  • src/SharpClaw.Code.Runtime/Turns/TurnMutationAccumulator.cs
  • src/SharpClaw.Code.Runtime/Turns/TurnMutationJournal.cs
  • src/SharpClaw.Code.Runtime/Turns/TurnRunResult.cs
  • src/SharpClaw.Code.Runtime/Verification/AffectedProjectResolver.cs
  • src/SharpClaw.Code.Runtime/Verification/DotNetDiagnosticParser.cs
  • src/SharpClaw.Code.Runtime/Verification/IAffectedProjectResolver.cs
  • src/SharpClaw.Code.Runtime/Verification/IDotNetDiagnosticParser.cs
  • src/SharpClaw.Code.Runtime/Verification/ITestResultParser.cs
  • src/SharpClaw.Code.Runtime/Verification/IVerificationDiagnosticsCache.cs
  • src/SharpClaw.Code.Runtime/Verification/IVerificationLoopCoordinator.cs
  • src/SharpClaw.Code.Runtime/Verification/IVerificationPolicyResolver.cs
  • src/SharpClaw.Code.Runtime/Verification/IVerificationService.cs
  • src/SharpClaw.Code.Runtime/Verification/Tools/VerifyWorkspaceTool.cs
  • src/SharpClaw.Code.Runtime/Verification/TrxTestResultParser.cs
  • src/SharpClaw.Code.Runtime/Verification/VerificationDiagnosticsCache.cs
  • src/SharpClaw.Code.Runtime/Verification/VerificationFailureContextFormatter.cs
  • src/SharpClaw.Code.Runtime/Verification/VerificationLoopCoordinator.cs
  • src/SharpClaw.Code.Runtime/Verification/VerificationPolicyResolver.cs
  • src/SharpClaw.Code.Runtime/Verification/VerificationService.cs
  • src/SharpClaw.Code.Tools/Abstractions/IToolPermissionDeniedResultFactory.cs
  • src/SharpClaw.Code.Tools/BuiltIn/CSharpDiagnosticsTool.cs
  • src/SharpClaw.Code.Tools/BuiltIn/CSharpFindReferencesTool.cs
  • src/SharpClaw.Code.Tools/BuiltIn/CSharpRenameSymbolTool.cs
  • src/SharpClaw.Code.Tools/BuiltIn/CSharpSymbolResolveTool.cs
  • src/SharpClaw.Code.Tools/BuiltIn/CSharpTypeHierarchyTool.cs
  • src/SharpClaw.Code.Tools/BuiltIn/DotNetSolutionInspectTool.cs
  • src/SharpClaw.Code.Tools/BuiltIn/SharpClawToolBase.cs
  • src/SharpClaw.Code.Tools/Execution/DotNetEvaluationAuthorization.cs
  • src/SharpClaw.Code.Tools/Execution/ToolExecutor.cs
  • src/SharpClaw.Code.Tools/ToolsServiceCollectionExtensions.cs
  • src/SharpClaw.Code/SharpClaw.Code.csproj
  • tests/Fixtures/DotNetSemantic/Consumer/Consumer.csproj
  • tests/Fixtures/DotNetSemantic/Consumer/InvoiceConsumer.cs
  • tests/Fixtures/DotNetSemantic/Fixture.Tests/Fixture.Tests.csproj
  • tests/Fixtures/DotNetSemantic/Fixture.Tests/InvoiceTests.cs
  • tests/Fixtures/DotNetSemantic/Fixture.slnx
  • tests/Fixtures/DotNetSemantic/Library/Invoice.cs
  • tests/Fixtures/DotNetSemantic/Library/Library.csproj
  • tests/SharpClaw.Code.IntegrationTests/Fixtures/DotNetFixtureWorkspace.cs
  • tests/SharpClaw.Code.IntegrationTests/Fixtures/FaultingFileSystem.cs
  • tests/SharpClaw.Code.IntegrationTests/Mcp/InboundMcpHttpTests.cs
  • tests/SharpClaw.Code.IntegrationTests/Mcp/InboundMcpStdioTests.cs
  • tests/SharpClaw.Code.IntegrationTests/Mcp/SdkMcpProcessSupervisorIntegrationTests.cs
  • tests/SharpClaw.Code.IntegrationTests/Memory/CSharpRenameTests.cs
  • tests/SharpClaw.Code.IntegrationTests/Memory/CSharpSemanticToolTests.cs
  • tests/SharpClaw.Code.IntegrationTests/Memory/DotNetWorkspaceSemanticTests.cs
  • tests/SharpClaw.Code.IntegrationTests/Memory/SemanticImportCacheTests.cs
  • tests/SharpClaw.Code.IntegrationTests/Memory/SemanticReviewRegressionTests.cs
  • tests/SharpClaw.Code.IntegrationTests/Runtime/WorkspaceDatabaseLifecycleTests.cs
  • tests/SharpClaw.Code.IntegrationTests/SharpClaw.Code.IntegrationTests.csproj
  • tests/SharpClaw.Code.IntegrationTests/Verification/AutomaticVerificationTests.cs
  • tests/SharpClaw.Code.IntegrationTests/Verification/RealAutomaticVerificationTests.cs
  • tests/SharpClaw.Code.IntegrationTests/Verification/VerificationServiceTests.cs
  • tests/SharpClaw.Code.IntegrationTests/Verification/VerificationSurfaceTests.cs
  • tests/SharpClaw.Code.Mcp.FixtureServer/SharpClaw.Code.Mcp.FixtureServer.csproj
  • tests/SharpClaw.Code.ParityHarness/ParityScenarioIds.cs
  • tests/SharpClaw.Code.ParityHarness/ParityScenarioTests.cs
  • tests/SharpClaw.Code.ParityHarness/SemanticParityTests.cs
  • tests/SharpClaw.Code.ParityHarness/SharpClaw.Code.ParityHarness.csproj
  • tests/SharpClaw.Code.ParityHarness/VerificationParityTests.cs
  • tests/SharpClaw.Code.UnitTests/MemorySkillsGit/DotNetWorkspaceTargetResolverTests.cs
  • tests/SharpClaw.Code.UnitTests/Runtime/SharpClawConfigServiceTests.cs
  • tests/SharpClaw.Code.UnitTests/Verification/VerificationDiagnosticsCacheTests.cs
  • tests/SharpClaw.Code.UnitTests/Verification/VerificationParserTests.cs
  • tests/SharpClaw.Code.UnitTests/Verification/VerificationPolicyTests.cs

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Telli Telli left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed by reading the code; nothing was built or run. CI is red on build-and-test (ubuntu-latest): one existing MCP stdio fixture test fails, and the other OS jobs were cancelled. There's a likely cause inline on SharpClaw.Code.Mcp.Server.csproj.

Highest priority:

  1. HTTP MCP bind address can be overridden by a workspace appsettings.json / Kestrel__* env vars, bypassing ValidateHttpOptions.
  2. IsTestProject=false is ignored. Verification of this repo's own solution would fail on SharpClaw.Testing.Xunit.
  3. All analyzer references are stripped, including SDK-shipped source generators. This gives spurious csharp_diagnostics errors on STJ contexts and [GeneratedRegex], and the rename safety gate can pass renames that break the real build.
  4. The semantic cache holds a global gate across an interactive approval prompt.

Everything else inline is medium/low: lock timeout, the 120 s automatic-verification timeout, TFM duplicates, log classification, diagnostics cache overwrite, restore detection, the release package gate, and HTTP host/TLS handling.

Things that looked solid: the MCP tool allowlist is enforced on tools/call, calls route through the permission engine non-interactively, token comparison is constant-time, stdio stdout stays clean, process execution uses ArgumentList and kills the process tree, rename boundary checks and rollback hold up, and all new contracts are registered in ProtocolJsonContext.


Generated by Claude Code

Comment thread src/SharpClaw.Code.Mcp.Server/SharpClawMcpHttpServer.cs Outdated
Comment thread src/SharpClaw.Code.Mcp.Server/SharpClaw.Code.Mcp.Server.csproj
Comment thread src/SharpClaw.Code.Mcp.Server/SharpClawMcpHttpServer.cs
Comment thread src/SharpClaw.Code.Memory/Services/DotNetWorkspaceSemanticService.cs Outdated
Comment thread src/SharpClaw.Code.Memory/Services/DotNetSemanticWorkspaceCache.cs Outdated
Comment thread src/SharpClaw.Code.Runtime/Verification/VerificationService.cs Outdated
Comment thread src/SharpClaw.Code.Runtime/Verification/VerificationService.cs Outdated
Comment thread src/SharpClaw.Code.Runtime/Verification/VerificationLoopCoordinator.cs Outdated
Comment thread src/SharpClaw.Code.Runtime/Verification/VerificationDiagnosticsCache.cs Outdated
Comment thread .github/workflows/release.yml

Telli commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

Addressed and resolved all 15 review threads in f597334. Local validation: warning-free Release solution/example build; 414 passing tests (280 unit, 114 integration, 20 parity); 41.28% coverage against the 38% floor; all agent scenarios/gates; DocFX with warnings as errors; exact prepacked package installability through an isolated clean SDK consumer and CLI tool. The original failing stdio fixture test now passes. Required GitHub checks on this exact head are being watched before merge; no policy bypass is being used.

Telli commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

The first review-fix CI run passed Linux/macOS and all package/docs/extension jobs, but Windows exposed pooled SQLite handles retained after host disposal. Fixed in 08b0cda: knowledge and usage stores clear only their owned pools when the host shuts down; failed initialization disposes its connection; a new regression checks exclusive database access and workspace deletion after disposal. The cancellation parity test now surfaces startup failures, cancels/drains its task, and uses the existing longer Windows startup allowance. Local focused lifecycle/HTTP/verification tests (23) and the full parity harness (20) pass. Fresh required checks are running on 08b0cda.

@Telli
Telli merged commit fd04d57 into main Oct 16, 2026
9 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.

2 participants