Repository navigation
fix(cbio): grant the device harness its BLE permissions in the evidence run - #202
shroominic wants to merge 1 commit into
Conversation
…ce run `flutter test -d <device>` installs the debug app for each run and uninstalls it again afterwards, so every harness run starts from an app that has never been granted its runtime permissions. On that app a scan filter reports no results at all and a connect never completes, and the app's own permission dialog parks the test until the 8-minute `testWidgets` timeout: the run ends with no verdict and no artifact. Observed on the Pixel 6 on 2026-09-18: after the run-1 install at 12:20 the `GrantPermissionsViewModel` dialog for LOCATION and NEARBY_DEVICES was not answered until 12:41, and both of that morning's runs died on the test timeout without printing a single harness line. With the permissions granted the same harness completes a full authenticated session, so this was the difference between a silent timeout and a device session. The run script now grants the harness app its four BLE permissions for the length of the run. It touches nothing else on the device: no frame is written, no sensor field is read, and the grants are re-applied because each run reinstalls the app. Refs #199
|
Not absorbed by the GS1 consolidation (#209, feature/cbio-gs1). Left open on purpose: |
|
Carried into #209 (head This is not cosmetic: Closing as carried. Carrying PR: #209. |
Closes #199.
flutter test -d <device>installscom.openglucose.app.debugfor each run and uninstalls it again afterwards, so every GS1 evidence run starts from an app that has never been granted its runtime permissions. On an app withoutBLUETOOTH_SCANa filtered scan returns nothing at all, and the app's own permission dialog parks the test until thetestWidgetstimeout — so the run ends with no verdict and no artifact.Measured on the Pixel 6 on 2026-09-18: the run-1 install at 12:20 raised the LOCATION / NEARBY_DEVICES dialog, which was not answered until 12:41. Both morning runs died on
TimeoutException after 0:08:00without printing a single harness line, and the recorder reportedno CBIO-EVIDENCE line ... the harness did not reach a verdict. With those four permissions granted the same harness completes a full authenticated session from a clean install in ~65 s.scripts/cbio-gs1-evidence.shnow grants the harness appBLUETOOTH_SCAN,BLUETOOTH_CONNECT,ACCESS_FINE_LOCATION, andACCESS_COARSE_LOCATIONfor the length of the run, re-applying them because each run reinstalls the app.adbis resolved fromANDROID_HOMEwhen it is not onPATH, and a re-recorded log still needs no device. Nothing else on the device is read or changed.Verified end to end from a state where the package was not installed at all:
Stack position: this is the first of three; #200 and #201 stack on it.