test: add reusable BitBox testkit#17
Conversation
1463b2d to
caf6496
Compare
Review (Maintainer-Edit Rebase + Code-Review)Branch rebased onto develop, drei Konflikte in ✅ Stark
|
| Check | Status |
|---|---|
flutter analyze --no-fatal-infos |
15 pre-existing infos, keine neuen |
flutter test |
12/12 pass (BIPPath + neuer testkit-Suite) |
dart format --set-exit-if-changed |
pass |
go vet ./... |
pass |
go test -race -timeout 60s ./... |
pass beide Pakete |
CI-Status auf dem rebasten Commit caf6496: 3/3 Checks pass, mergeStateStatus: CLEAN.
Empfehlung: Concern #1 vor dem Merge mit Joshua klären (PR-Body ergänzen oder splitten), Concerns #2–#4 können als Follow-up adressiert werden.
…eout This branch originally removed the iOS BLE per-packet dedup (Bluetooth.swift seenPackets set + contains-before-reset ordering) and replaced the protection with a comment-level contract that "the BLE bridge must keep request boundaries clean". The change reverses PR DFXswiss#15 (merged 2026-05-15, same day) which itself was a targeted fix to the dedup ordering. No rationale was provided in the PR description for why dedup is now unsafe/unnecessary, and the maintainer review pointed out that: * BLE/CoreBluetooth can deliver indications twice under poor RF conditions * U2FHID readFrame() has no SEQ validation * TestReadFrame_DuplicateContFrame_DesyncsFollowingMessage already demonstrates that a duplicated cont frame desyncs the next message * Buffer-clear between requests doesn't protect against duplicates arriving inside a single request-response cycle (which is the realistic failure mode under weak BLE) Pending an explicit rationale, keep the dedup. Maintainer-edit applied because the upstream author is unavailable. Reverted to develop state: - ios/Classes/Bluetooth.swift (dedup logic restored) - go/u2fhid/dedup_logic_test.go (algorithm regression test restored) - go/u2fhid/u2fhid_dedup_test.go (comments restored) Narrowed: - go/api/ios_bluetooth_regression_test.go now only guards the 60s read timeout (the uncontroversial fix), no longer forbids dedup patterns. The rest of the PR (Flutter testkit, Go fake-device harness, interface refactor, TESTING.md) is kept intact — that's all additive testing infrastructure and the actual value of this PR.
Maintainer-Edit: BLE-Dedup behalten (Joshua nicht erreichbar)Da Joshua nicht erreichbar ist und der PR keine Begründung für die Entfernung der BLE-Packet-Dedup-Logik enthält, habe ich konservativ entschieden: Verworfen aus dem PR (Bluetooth.swift Dedup-Entfernung — Reversal von PR #15):
Begründung: BLE/CoreBluetooth kann Indications unter schwacher Verbindung doppelt liefern; U2FHID Joshua kann nach Rückkehr mit dokumentierter Begründung einen eigenen "refactor(ble): drop packet dedup" PR aufmachen. Behalten aus dem PR (alles additive Testing-Infrastruktur):
Commit: Concerns #2–#4 aus dem vorigen Review (API-Duplizierung, TESTING.md ohne |
TESTING.md listed only `flutter analyze` + `flutter test` + `go test ./...` as the fast gate. The PR-checks workflow also runs `dart format --set-exit-if-changed` over lib + test + example and `go vet` + `go test -race -timeout 60s`. Without those, contributors run a green local check and still hit CI failures. Reproduce-CI-locally now reads exactly what `pull-request.yaml` runs.
Summary
Verification