Context
CI smoke tests in .github/workflows/ci.yml were temporarily changed from
dotnet-inspect ... > smoke.md
to
dotnet-inspect ... | cat > smoke.md
(see commits in PR #317 and PR #312) to work around a .NET 11 preview 3 SDK regression.
Root cause (upstream)
dotnet/runtime#125512 routed ConsolePal.Unix.Write through RandomAccess.Write(fd, buffer, fileOffset: 0). On a seekable fd (regular file opened by shell > redirection), that becomes pwrite(fd, buffer, 0) on every call — so each Console.WriteLine overwrites from byte 0 of the file. On a pipe (e.g. | cat) the runtime falls back to write(2) and the output is correct.
Symptom for dotnet-inspect: cmd > file.md produced ~256 bytes of fragmented mid-line content (the truncated tail of whatever the last buffer flush wrote); cmd | cat > file.md produced the full ~2 KB of valid markdown.
Local repro (50 line program, 3750 bytes total):
| SDK |
> file |
| cat > file |
| 11.0.100-preview.1.26104.118 |
3750 |
3750 |
| 11.0.100-preview.2.26159.112 |
3750 |
3750 |
| 11.0.100-preview.3.26207.106 |
75 |
3750 |
(75 bytes = exactly the last Console.WriteLine.)
Already fixed upstream
dotnet/runtime#126844 (issue #126843, merged 2026-04-20) reverts the RandomAccess.Write switch back to the original Interop.Sys.Write loop.
The fix did not make the preview 3 cut, so GitHub-hosted runners are still on the broken SDK.
Action
When .NET 11 preview 4 ships (expected 2026-05-12, Patch Tuesday) and the GitHub Actions runner image picks it up:
Context
CI smoke tests in
.github/workflows/ci.ymlwere temporarily changed fromdotnet-inspect ... > smoke.mdto
(see commits in PR #317 and PR #312) to work around a .NET 11 preview 3 SDK regression.
Root cause (upstream)
dotnet/runtime#125512 routed
ConsolePal.Unix.WritethroughRandomAccess.Write(fd, buffer, fileOffset: 0). On a seekable fd (regular file opened by shell>redirection), that becomespwrite(fd, buffer, 0)on every call — so eachConsole.WriteLineoverwrites from byte 0 of the file. On a pipe (e.g.| cat) the runtime falls back towrite(2)and the output is correct.Symptom for
dotnet-inspect:cmd > file.mdproduced ~256 bytes of fragmented mid-line content (the truncated tail of whatever the last buffer flush wrote);cmd | cat > file.mdproduced the full ~2 KB of valid markdown.Local repro (50 line program, 3750 bytes total):
> file| cat > file(75 bytes = exactly the last
Console.WriteLine.)Already fixed upstream
dotnet/runtime#126844 (issue #126843, merged 2026-04-20) reverts the
RandomAccess.Writeswitch back to the originalInterop.Sys.Writeloop.The fix did not make the preview 3 cut, so GitHub-hosted runners are still on the broken SDK.
Action
When .NET 11 preview 4 ships (expected 2026-05-12, Patch Tuesday) and the GitHub Actions runner image picks it up:
mainworks withcmd > file(revert workaround locally and try)| catfrom the six smoke tests in.github/workflows/ci.yml(steps "Smoke test - package quiet/normal/...", "type/member command (oneline/markdown)") and the explanatory comment above the first one