Skip to content

Take ktsu.RunCommand 1.9.5 so git output is read to EOF [patch] - #198

Merged
matt-edmondson merged 1 commit into
mainfrom
fix/127-runcommand-read-to-eof
Oct 9, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
fix/127-runcommand-read-to-eof

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #127

Before

ktsu.RunCommand 1.5.0 stopped reading when the process exited, then did one final read. Anything still in the pipe after that read was dropped. A few percent of git outputs over ~8 KiB came back cut at 8,192 characters, so Patch(), Log(), Status() and Diff() sometimes returned partial results with no error.

After

KTSU0006 / VersionOverride check (per CLAUDE.md)

I compared project.assets.json before and after the bump:

  • The package set is unchanged apart from the three bumped packages. RunCommand 1.5.0 also pulled in Microsoft.Bcl.AsyncInterfaces, which is no longer resolved.
  • Testably.Abstractions.FileSystem.Interface still resolves 10.0.0, so the existing VersionOverride still matches what ktsu.Essentials 2.0.0 pins.
  • System.Text.Json still resolves 9.0.13 with the lib/net9.0/_._ placeholder as its compile asset on both net9.0 and net10.0. The framework still wins.

Test

CapturesAllOutputWrittenJustBeforeTheProcessExitsAsync writes 60,000 characters in one burst and exits immediately. It does this 100 times and asserts that every run returns all of the output, byte for byte. With RunCommand 1.5.0 it fails on run 0. With 1.9.5 it passes. On Windows it uses powershell, following the platform switch the neighbouring environment test uses.

Full suite: 765/765 pass.

Not included

The issue's optional hardening, a hunk-count check in GitPatchParser, is left for a separate change so this PR stays a dependency fix.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TJeQu4i8WTCDpvC4TN4Rjw


Generated by Claude Code

RunCommand 1.5.0 stopped reading when the process exited and made one final
read, so output still in the pipe after it was dropped. Git output over
~8 KiB came back cut at 8,192 characters a few percent of the time, and
Patch(), Log(), Status() and Diff() returned partial results without an
error. RunCommand 1.8.0 reads to EOF (ktsu-dev/RunCommand#87).

RunCommand 1.9.x needs ktsu.Semantics 5.x, so Semantics.Paths and
Semantics.Strings move from 3.0.1 to 5.11.2 with it. The resolved graph is
otherwise unchanged: Testably.Abstractions.FileSystem.Interface still
resolves 10.0.0 and System.Text.Json's compile asset is still the framework
placeholder on net9.0 and net10.0, so the KTSU0006 pins hold.

The new test writes 60,000 characters in one burst and exits, 100 times,
and asserts each run returns all of it. It fails on the first run with
1.5.0.

Fixes #127

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TJeQu4i8WTCDpvC4TN4Rjw
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit 92b05e8 into main Oct 9, 2026
16 checks passed
@matt-edmondson
matt-edmondson deleted the fix/127-runcommand-read-to-eof branch October 9, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant