8000 Release OpenGlucose 0.3.0 (sensor lane: Libre 2 capture, GS1 evidence, live GS1 driver) by shroominic · Pull Request #128 · shroominic/OpenGlucose · GitHub
[go: up one dir, main page]

Skip to content

Release OpenGlucose 0.3.0 (sensor lane: Libre 2 capture, GS1 evidence, live GS1 driver) - #128

Open
shroominic wants to merge 11 commits into
mainfrom
release/v0.3.0
Open

shroominic wants to merge 11 commits into
mainfrom
release/v0.3.0

Conversation

@shroominic
Copy link
Copy Markdown
Owner

Release aggregate: OpenGlucose 0.3.0 (sensor lane)

Aggregate only. This PR stays open and separate: it bundles child content for review and
does not merge anything. No child PR is closed, merged, or rebased by this branch.

Bundled child PRs

Child PR Head branch Base State Content
#119 feature/libre-protocol-capture main open Libre 2 protocol capture, multi-sensor base, Libre cleanup deadlock fix
#120 feature/codex-cbio-gs1 feature/libre-protocol-capture open Offline CBio/SIBIONICS GS1 evidence lane and gates
#127 feature/cbio-gs1-live feature/codex-cbio-gs1 open Fail-closed live GS1 driver with device-backed capture harness

Issue mapping: #116 -> #119, #117 -> #127 with #120 as the offline evidence/gates predecessor.

Open gaps (this aggregate is not ship-ready)

Program rules honored

One focused PR per issue; every child PR remains open; nothing merges to main; each release version
is a separate open aggregate PR.

Snapshot the local libre-protocol-capture worktree so contest cloud agents
can branch from a shared remote: cgm_driver_registry, cgm_libre2,
cgm_libre2_glucose, cgm_yuwell_anytime, debug protocol-capture harness,
and Anytime 5P passive-capture runbook. No raw captures or health data.
Do not await the in-flight connect before the promotion gate releases, and
type ControlledSession.disconnectError as Exception? for only_throw_errors.
Add a live Cbio/SIBIONICS GS1 session on top of the existing offline frame
contract: discover the FF30 service, connect, enable FF31 notifications, and
decode every received frame with parseCbioPlaintextFrame.

The session stays fail-closed. The only write it can emit is the bounded
`06 08 01 00 00 00 F1` read the protocol evidence supports, and only after a
passive window with no notification. Activation (0x07), clock (0x03), reset,
threshold, and calibration writes are never issued; calibration submission
reports unsupported instead of attempting a write.

Register the driver in the platform registry behind its own pure
advertisement classifier so an FF30 candidate routes to the FF30 driver, and
declare the package dependency plus the device-test dev dependencies the
capture harness needs.

Verified: packages/cgm_cbio `dart test` 24/24, `dart analyze` clean,
openhealth driver registry/connection-flow tests green.
Add an integration_test entry point that drives the production
FlutterBluePlusTransport through RecordingBleTransport and the unmodified
CbioSensorDriver against the live sensor, without going through the Nearby
sensors UI. Every phase is bounded, so a silent radio cannot hang the harness,
and all evidence lands in the app-private trace sink that already backs the
protocol capture lane.

Discovery runs three ways: the driver's own FF30-filtered scan, an unfiltered
transport scan, then a bounded raw-plugin acquisition loop that waits for an
intermittent advertisement. The raw path also primes the platform's address
type for the peripheral. An address recovered from advertisement evidence can
be supplied at run time via --dart-define=CBIO_TARGET_DEVICE_ID so a capture is
possible while the Dart scan surfacing defect is open.

The harness asserts the safety contract from the trace itself: at most one
write, and that write must be the allowed 0x08 read. It prints only redacted
identifiers and never prints payload bytes.

Pin the debug-only androidx.test espresso artifacts that the integration_test
package's pinned 3.2.0 release makes ambiguous for AGP 8 namespace validation.
The platform registry now registers the Cbio driver alongside AiDEX, so the
OG_DEMO selection test's expected driver set has to include it.

Verified: openhealth `flutter test --exclude-tags integration` 473/473.
Android hands the app short-form UUIDs (FF30/FF31/FF32) while the driver
declared the full 128-bit base form, so _locateCharacteristics never
matched the FF30 service on a live link and every real session failed
closed with missingNotifyCharacteristic.

Canonicalise both sides onto the Bluetooth base UUID before comparing.
Observed on the GS1 sensor: connect ok, service FF30 with FF31 (notify)
and FF32 (write), and the previous code produced notify.enabled=[].
The first live FF31 packet is five bytes whose leading byte is the size a
full frame would need, so disconnecting on the first packet could drop
every later fragment. Linger for six seconds after the first packet.
FlutterBluePlusTransport.scan's stream can stay open when flutter_blue_plus stops the physical scan without emitting isScanning == false, so the discovery loop never returned and the Connect-a-sensor panel kept scanning forever.

The registry now owns the scan deadline (_activeScanTimeout + _completeScanAtDeadline) so an overrun scan still ends for every consumer, bounds transport cancellation so a wedge
8000
d cancel cannot hold the lifecycle open, and keeps an assert-gated, identity-free scan diagnostic for debug builds.

This branch has not been deployed

No deployments
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

0