You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI: --tail-bytes 0 keeps the entire command output #195
With bytes 0, value.slice(-0) is value.slice(0), the whole string. measureCommand uses it for stdoutTail and stderrTail, and a selection that runs as a single command goes straight through measureCommand, so the receipt (and the outcome log) gets the complete output of the test run, up to the 256 MiB maxBuffer, where --tail-bytes 0 asks for none. A selection split into several parts already handles 0 correctly in measureCommands (options.tailBytes > 0 ? ... : ""), so the result depends on how the selection was batched.
A second, smaller problem in the same function: the length check counts bytes but the cut counts UTF-16 characters, so output with multi-byte characters keeps more than tailBytes bytes. "abcééé" with tailBytes: 3 keeps "ééé" (6 bytes).
What you expected
--tail-bytes 0 keeps no output, and a tail is at most tailBytes bytes, cut at a character boundary.
Regression test
packages/diffci-cli/tests/client/command-tail.test.ts in the linked pull request fails on main and passes with the fix.
Activity
fix(cli): cut a multi-command selection's tail by bytes too
fix(cli): --tail-bytes 0 keeps no output, and tails are cut by bytes (D…