Skip to content

flake: TestRename (windows) - PTY read/write handle invalid #1277

@flake-investigator

Description

@flake-investigator

CI run: https://github.com/coder/coder/actions/runs/21133032582
Commit: d176714f90f2c4dffa4c182722f6b16deface38a (Cian Johnston)
Job: test-go-pg (windows-2022)

What failed

Go test failures in the cli package:

  • TestRename

Key log excerpts:

clitest.go:283: command "coder rename" exited with error: running command "coder rename": read |0: The handle is invalid.
...
ptytest.go:430 ... Error: write |1: The parameter is incorrect.
Test: TestRename
Messages: write line failed

Why this looks flaky

This is Windows-only and the failure is in PTY I/O (read |0: The handle is invalid, write |1: The parameter is incorrect), consistent with intermittent PTY/handle lifecycle issues.

Suspected root cause

PTY test harness appears to lose/close the underlying handle unexpectedly while the test is still interacting with the CLI prompt.

Files involved from stack trace:

  • cli/rename_test.go
  • cli/clitest/clitest.go
  • pty/ptytest/ptytest.go (failure at/near ptytest.go:430)

Ownership / assignment rationale

Most recent substantive change to pty/ptytest/ptytest.go is:

  • 259dee2ea899 ("fix: move contexts to appropriate locations") by Danny Kopping

cli/rename_test.go hasn’t had a Windows-specific PTY change recently; this failure signature points to the PTY test harness.

Assigning to: @dannykopping

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions