Skip to content

test(pty): say which bootstrap step failed and what the shell printed (refs #58) - #60

Merged
ShortArrow merged 2 commits into
mainfrom
test/pty-bootstrap-error
Oct 11, 2026
Merged

ShortArrow merged 2 commits into
mainfrom
test/pty-bootstrap-error

Conversation

@ShortArrow

@ShortArrow ShortArrow commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Refs #58. This is the first step there: the next bootstrap failure on CI will show its cause. The issue stays open until that output decides the fix.

What a failed PTY test prints now

PtySession::spawn returns a BootstrapError instead of None. The .expect(..) in every PTY test prints it, so a failure names the bootstrap line that was sent, the cause (Timeout(5s), a read or write error, or a failed runex export nu), the time since the shell was launched, and the last 4 KiB the shell printed since launch. The output is kept raw with its escape sequences, because an unanswered cursor-position query (ESC[6n) is one of the things it has to show.

When it shows

Only when a bootstrap step fails. The keystroke checks after bootstrap still use Option, so a failed expect_regex reads as before.

… (refs #58)

PtySession::spawn returned None, so a bootstrap failure on CI could not tell a slow shell from a broken one.
At 5 s it kept a PTY busy while the shell tests in the same binary were starting their shells.
@ShortArrow
ShortArrow marked this pull request as ready for review October 11, 2026 13:00
@ShortArrow
ShortArrow merged commit dcd11d7 into main Oct 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant