#628

fix(interpreter): account byte-shaped stdout after redirection

Openasafyishwants to merge intofrom

Fixes #627.

cat /present.txt /missing.txt 2>/dev/null loses non-ASCII stdout and exits 126 with invalid stdout accounting, instead of preserving stdout and the command's exit code 1.

Measure the final stdout credit using the existing byte/text encoding decision. Byte-shaped stdout already contains encoded bytes; measuring it as UTF-8 inflated the credit before accountResult validated it. This changes only redirection accounting.

Adds two regressions for stderr redirected to /dev/null and a regular file, plus a patch changeset.

Validation: both regressions fail on current main and pass with the fix. All 118 tests in the five relevant redirection/execution-scope files pass; package typecheck and repository lint pass.

Activity

2
vercel[bot]14d ago

@asafyish is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.