Skip to content

fix(test): repair watch disconnect test broken on main - #21731

Merged
Git-on-my-level merged 1 commit into
mainfrom
lane/watch-test-fix
Oct 15, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
lane/watch-test-fix

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

Main's Dart CI has been red since #21521 landed. That PR's watch_transport_disconnect_test.dart was written against an older BtDevice and WatchTransport, so it broke in two ways:

  • Compile error. BtDevice needs rssi (since e52224a), and the test didn't pass it. The analyzer ratchet fails on this before any tests run, which blocks every mobile PR.
  • Behavioral failures once it compiles. WatchTransport.disconnect() returns early on a transport that never connected. The tests disconnected a fresh transport and expected stopRecording to be called, so 3 of the 4 failed.

This is a test-only fix:

  • pass rssi: 0
  • have the fake report a paired, reachable watch, and connect the transport before disconnecting
  • initialize the test binding, which the Pigeon setUp needs

There are no product changes. The behavior #21521 meant to test, stopping the watch mic on disconnect or dispose, is unchanged and now actually covered.

The file was also CRLF, so the diff is whole-file. It's LF now.

Verification

  • flutter test test/unit/watch_transport_disconnect_test.dart: 4/4 pass
  • flutter analyze on the file: no issues

Failure-Class: none

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

#21521's test missed BtDevice's required rssi and disconnected a transport
that never connected, which WatchTransport.disconnect treats as a no-op.
Connect against a paired, reachable fake first and init the test binding.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T16:02:56.251374Z 1c877c9 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.

@Git-on-my-level
Git-on-my-level merged commit 106d4b0 into main Oct 15, 2026
50 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/watch-test-fix branch October 15, 2026 16:21
apoorvdarshan added a commit to apoorvdarshan/omi that referenced this pull request Oct 15, 2026
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