Fix rewrite-csharp integTest: stop dotnet run build output corrupting the RPC stream#8006
Draft
knutwannheden wants to merge 1 commit into
Draft
Fix rewrite-csharp integTest: stop dotnet run build output corrupting the RPC stream#8006knutwannheden wants to merge 1 commit into
dotnet run build output corrupting the RPC stream#8006knutwannheden wants to merge 1 commit into
Conversation
… the RPC stream
The integTest launches the C# server via `dotnet run`, which performs an
implicit restore + build and writes MSBuild/NuGet output to stdout — the
same stream used for JSON-RPC. A newly published NuGet security advisory
(NU1903 for the transitively-pulled MessagePack 2.5.187) made the restore
audit emit a warning on stdout, corrupting the RPC framing and killing the
peer ("JSON-RPC peer closed the stream"). This turned main CI red on commits
unrelated to C#.
Pass --no-build (which implies --no-restore) so dotnet run emits no build
output. The project is always pre-built by the csharpBuild Gradle task that
this command's only caller (integTest) depends on, matching the --no-build
already used by the csharpTest task.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
mainCI has been red since 2026-06-12, with every run failing identically at:rewrite-csharp:integTest:The failures appeared on commits entirely unrelated to C# (e.g. a
ChangeMethodInvocationReturnTypefix, a Python type-attribution change),which is the tell that the trigger was external rather than a code regression.
The integTest launches the C# server with
dotnet run --project ... --framework net10.0.dotnet runperforms an implicit restore + build and writes MSBuild/NuGetoutput to stdout — the same stream used for the JSON-RPC bridge. A NuGet
security advisory (NU1903 / GHSA-hv8m-jj95-wg3x) was published around
2026-06-12 for MessagePack 2.5.187 (pulled transitively). NuGet's restore
audit then started printing a warning to stdout, corrupting the RPC framing and
killing the peer. Reproduced locally, the warning is visible inline in the stream:
Production launches a pre-built apphost (
buildToolPathCommand), so only thetest launcher (
buildCsprojCommand) was affected.Summary
--no-buildto thedotnet runcommand inCSharpRewriteRpc.buildCsprojCommand.--no-buildimplies--no-restore,so no restore audit runs and no MSBuild/NuGet output can reach stdout.
csharpBuildGradle task that this command's only caller (
integTest) depends on. It alsomatches the
--no-buildalready used by thecsharpTesttask in the samebuild file.
--verbosity quietwas rejected: it does not suppress the NU1903 warningon stdout; only skipping restore/build does.
Test plan
./gradlew :rewrite-csharp:integTest— 17 tests, 0 failures (was 16/17failing before the fix).
dotnet runinvocation that--no-buildyields aclean stdout (no NU1903), while
--verbosity quietstill leaks it.