Skip to content

fix: stabilize TestRenderDoctorInteractive to unblock releases#14

Draft
Robert27 wants to merge 1 commit into
mainfrom
cursor/fix-release-test-flake-4b3c
Draft

fix: stabilize TestRenderDoctorInteractive to unblock releases#14
Robert27 wants to merge 1 commit into
mainfrom
cursor/fix-release-test-flake-4b3c

Conversation

@Robert27

Copy link
Copy Markdown
Owner

Problem

The v0.10.0 release workflow failed in the GoReleaser step after ~4s:

⨯ release failed: hook failed: go test ./...
--- FAIL: TestRenderDoctorInteractive (0.00s)
    ui_interactive_test.go:119: expected "go" in styled doctor output, got "eggl doctor\r\n..."

GoReleaser runs go test ./... as a before hook (see .goreleaser.yaml). The release never reached build/publish — no GitHub Release was created for v0.10.0.

Root cause

TestRenderDoctorInteractive used readPTY with a 200ms read deadline immediately after rendering. The doctor UI writes multiple chunks (header, box, summary), so the read often returned before "go" / "All checks passed" were written.

Other interactive tests (RenderHelp, RenderDedash, etc.) already use renderPTY, which closes the slave PTY and reads until EOF — avoiding the race.

Fix

Switch TestRenderDoctorInteractive to renderPTY, matching the other interactive tests.

Releasing v0.10.0

After merging, re-trigger the release by deleting and re-pushing the tag:

git tag -d v0.10.0
git push origin :refs/tags/v0.10.0
git tag v0.10.0
git push origin v0.10.0

Or cut v0.10.1 from main if you prefer not to move the tag.

Open in Web Open in Cursor 

Use renderPTY (close slave, read until EOF) instead of readPTY with a
fixed 200ms deadline. The flaky test caused GoReleaser's go test hook to
fail the v0.10.0 release.

Co-authored-by: Robert Eggl <robert@eggl.dev>
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants