Skip to content

test(app): wait for the transport's size in the reconnect history test - #275

Merged
TooonyChen merged 1 commit into
mainfrom
bugfix/reconnect-history-test-resize
Nov 29, 2026
Merged

TooonyChen merged 1 commit into
mainfrom
bugfix/reconnect-history-test-resize

Conversation

@TooonyChen

Copy link
Copy Markdown
Owner

Summary

TestSSHRestoreHistory (from #245) failed now and then with transport did not resize: [0 0]: in CI on #273 and in a local full run on #270, neither of which touches that code.

The test resized the new terminal and read the fake transport's size at once. MyGo's terminal tells its connection the size from a goroutine (resizeConn / tellConn in plugins/terminal/terminal.go), so the read raced with it. The test now waits for the size, up to five seconds. Only the test changes; the app's reconnect code is untouched.

Closes #274

Testing

  • Before, on unmodified main: go test -race -count=60 ./internal/app -run 'TestSSHRestoreHistory$' failed once on an idle machine (about 1 in 4 under load, 11 of 40 in an earlier run).
  • After: the same with -count=300 passes.
  • With paneConn.Resize changed to do nothing, the test still fails with transport did not resize: [0 0] after the deadline, so the check keeps its meaning.
  • go vet ./internal/app. The full suite was not run for this one-test change.

Generated by Claude Code

The terminal tells its connection the size from a goroutine, so the fake
transport may not have it yet when Resize returns. The test read it once
and failed now and then with "transport did not resize: [0 0]". It now
waits for the size, up to five seconds.

Closes #274

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015nMqJEvqPnRmPgi6dnraZM
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-29T08:33:37.401256Z c0e7a58 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@TooonyChen
TooonyChen merged commit 87d13c0 into main Nov 29, 2026
1 check 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.

test(app): TestSSHRestoreHistory reads the transport's size before the terminal has sent it

2 participants