Merged
Conversation
On both Linux and Windows.
Different behavior on Windows, and that particular case doesn't matter.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to stabilize CI on both Linux and Windows by adjusting how interruptableReader waits for input readiness (especially for Windows pipe handles), adding targeted tests around that behavior, and bumping the golangci-lint version used in Linux CI.
Changes:
- Update
interruptableReader.waitForReadReady()to accept a timeout and use it on Unix viaselect(). - Add a Windows pipe-specific readiness check using
PeekNamedPipeinstead of relying solely onWaitForSingleObject. - Add unit tests for read-readiness on pipes and files; bump golangci-lint in Linux CI.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
twin/screen_test.go |
Adds tests for waitForReadReady() on pipes and files to catch platform-specific behavior. |
twin/screen-setup.go |
Updates Unix readiness waiting to take an explicit timeout. |
twin/screen-setup-windows.go |
Implements pipe readiness detection using PeekNamedPipe and adds timeout handling. |
twin/interruptablereader.go |
Renames poll interval constant and passes timeout through to waitForReadReady(). |
.github/workflows/linux-ci.yml |
Bumps golangci-lint install version used by CI. |
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.
On both Linux and Windows.