Repository navigation
Fix Linux recordings: script(1) invocation rejected by util-linux 2.41 (Bsn.Host 0.2.4) - #23
Open
soroshsabz wants to merge 2 commits into
Open
soroshsabz wants to merge 2 commits into
soroshsabz wants to merge 2 commits into
Conversation
- Drop the redundant positional typescript file from the util-linux
script(1) invocation: util-linux 2.41 rejects combining --log-out with
a positional file ("unexpected number of arguments"), so every
recording on Ubuntu 26.04 exited immediately with 0 events.
- Add a CI-runnable Linux/macOS system test that records a -Command
session through the script(1) engine and asserts markers/zero U+FFFD -
the script(1) engine previously had no end-to-end CI coverage because
every Unix system test skipped under CI redirected stdio.
- Bsn.Host 0.2.4; AGENTS.md documents the util-linux 2.41 constraint.
Verified on WSL2 Ubuntu 26.04.1 (util-linux 2.41.3, pwsh 7.6.5): the
failure is reproduced before the fix and recordings capture markers,
kernel release and clean playback after it. Windows gate: analyzer
clean, 96 tests green.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…04 CI image The first fix hardcoded the options-only invocation, which is unverified on older distros and would silently change behavior there. Docker verification of the real script(1) binaries refined the matrix: - util-linux 2.34 (Ubuntu 20.04): no --log-timing at all - the engine uses the approximated-timing (BSD-style) branch, never the buggy form. - util-linux 2.37.2 (Ubuntu 22.04): BOTH shapes work. - util-linux 2.39.3 (Ubuntu 24.04): positional form REJECTED - 24.04 was broken by the same bug as 26.04 (2.41.3), not just 26.04. - util-linux 2.41.3 (Ubuntu 26.04): positional form REJECTED. Instead of parsing version strings, the engine now probes the installed script(1) binary once with a no-op child: where the classic positional form is accepted (22.04 and older) it is kept unchanged; where it is rejected (24.04/26.04) the options-only form is used. New private Resolve-BsnScriptInvocationArguments-free helper Resolve-BsnScriptInvocation implements the probe, deterministic on any future util-linux release. Tests: - Unit: Resolve-BsnScriptInvocation with fake script(1) shims - a shim that exits 0 must keep the positional form, one that exits 1 must get the options-only form, and both shapes must carry the recorded command and both log paths (runs on Linux/macOS CI; Windows skips - no Unix exec-bit shims). - System: the Unix -Command recording test (from the previous commit) runs on ubuntu CI images and pins the end-to-end behavior. - CI matrix: add a pinned ubuntu-24.04 image alongside ubuntu-latest so two util-linux generations (2.39 and 2.41) exercise the script(1) engine on every pull request.
|
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.



ITNOA
What you hit
On Ubuntu 26.04 (WSL2 or bare metal, util-linux 2.41), every
Start-InteractiveTranscript recording came back empty:
Root cause + why CI never caught it
The script(1) engine combined
--log-out <file>with a trailingpositional typescript file (
/dev/null) in one invocation. Dockerverification of the real binaries refined the version matrix:
--log-timing, engine uses the approximated-timing branchSo Ubuntu 24.04 was broken too, not just 26.04. And the script(1)
engine had zero end-to-end CI coverage: every Unix system test
skips under CI redirected stdio - only unit tests ran on Linux CI, and
they never invoke script(1).
What ships (Bsn.Host 0.2.4)
Resolve-BsnScriptInvocation(new private helper): probes theinstalled script(1) binary once with a no-op child and picks the
invocation shape it accepts - the historically tested positional form
where supported (22.04 and older, zero behavior change), the
options-only form where rejected (24.04/26.04). No util-linux version
string parsing; future releases are handled by the same probe.
-Commandsession(randomized marker +
uname -s) through the script(1) engine andasserts markers, kernel name and zero U+FFFD land in the cast. It
intentionally runs under CI redirected stdio (script(1) allocates its
own PTY and
echochildren need no stdin), pinning the regression onCI from now on.
(accepting -> positional form kept; rejecting -> options-only form),
covering both branches on Linux/macOS CI.
ubuntu-24.04image alongsideubuntu-latest(26.04) so two util-linux generations exercise thescript(1) engine on every pull request - this class of bug cannot
silently return.
Verified
reproduced before the fix (
script: unexpected number of arguments,0 events); after the fix: exit 0, randomized marker + kernel release
captured, zero U+FFFD, playback renders the session.
(2.39.3) - all four invocation-form checks above executed against the
real binaries.
probe); Windows gate: analyzer clean, 96 tests green.