Skip to content

fix(gamepad): 接続完了時の通常入力準備を保証 - #150

Merged
niart120 merged 1 commit into
mainfrom
spec/issue-149-normal-input-readiness
Jul 26, 2026
Merged

fix(gamepad): 接続完了時の通常入力準備を保証#150
niart120 merged 1 commit into
mainfrom
spec/issue-149-normal-input-readiness

Conversation

@niart120

Copy link
Copy Markdown
Owner

Summary

接続APIの正常終了を、選択した送信方式の通常入力経路が接続初期化中のautomatic input holdoffに遮られていない時点へ変更します。
Periodicは最新replyのholdoff終了後にReportLoopを開始してから成功を公開し、Directは明示入力がholdoff対象外であるためprotocol readyで同じ公開契約を満たします。

Related

Changes

  • ReportSenderに、readiness公開前に受理された最新replyのholdoff期限まで待つ処理を追加
  • ControllerRuntimeでprotocol readyとinput readyを分離し、PeriodicはReportLoop開始後、Directはprotocol ready直後に接続成功を公開
  • timeout、cancellation、disconnect、session resetでreadiness waiterを回収し、diagnosticsへinput_readystage=input_readinessを追加
  • Pair / reconnect / connect / create_profile、Periodic / Direct、Pro / Joy-Con、50 ms入力条件をfake transportで回帰検証
  • 公開API、利用手順、release notes、初期設計、実機ログを新しい接続契約へ更新
  • すべての短時間入力や中間状態を必ず配送するqueue型契約には変更しない

Commit Log

  • 8217929 fix(gamepad): 接続完了時の通常入力準備を保証

Testing

  • uv run ruff format --check . — pass(106 files already formatted)
  • uv run ruff check . — pass
  • uv run ty check --no-progress — pass
  • uv run pytest tests/unit — pass(450 passed)
  • uv run pytest tests/integration — pass(165 passed)
  • uv run --group docs mkdocs build --strict — pass
  • uv run pytest --collect-only tests/hardware/test_reply_holdoff.py -q — pass(10 tests collected)

Hardware

  • Windows 11、専用usb:0、CSR8510 A10(VID:PID 0A12:0001)、WinUSB/libwdi、Bumble 0.0.233でfresh Pairを実行
  • protocol_readyからinput_readyへ進み、接続完了直後の50 ms窓でButton A付き周期0x30を7件、後続neutral、L2CAP切断、adapter解放を確認
  • 利用者がSwitch側のButton A反映を目視確認
  • 最初のhardware pytestはdiagnostics reasonをinputとして数えたtest bugにより1 failed in 5.58s。実際の送信理由はperiodicで、harnessを修正済み
  • 修正後harnessはcollect確認のみで、fresh Pairの実機再実行はしていない。実機動作の判定根拠はdebug PDU、diagnostics trace、利用者UI観測
  • 今回のSwitch model / firmwareは再確認していない。active reconnect、Joy-Con、別adapter、別OS、別firmwareは未検証

Review Notes

  • Source audit: HID bytes、report period既定値、300 ms holdoff値、Bumble/transport契約は変更していない。既存unit_082の根拠を使用
  • Docs review: docs-quality-reviewで公開契約、非保証、実機確認範囲を照合。未解決のmust-fixなし
  • Scope drift: なし
  • Deferred: steady-stateでの新規reply、state transition queue、任意の短時間入力配送保証、active reconnect等の追加実機確認

@niart120
niart120 merged commit 5f239cb into main Jul 26, 2026
6 checks passed
@niart120
niart120 deleted the spec/issue-149-normal-input-readiness branch July 26, 2026 12:42
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.

fix(gamepad): Pair/Reconnect直後の短時間入力が周期送信開始前に欠落する

1 participant