Skip to content

Phase 3a: Peripheral discovery filter + service/characteristic discovery + catalog snapshots #61

Description

@itsniper

Parent: #52

Requirements

  • Sticky discovery filter on Peripheral (services/chars); fail-closed if empty when auto-discovery required (FR-10.1.2).
  • Define what counts as an "auto-discovery path." Peripheral.connect(autoReconnect:) registers a manual-connect hold and links without any discovery today. Decide and document whether a manual connect with an empty filter is a hard error or a link-only operation. Recommended: manual connect links without discovering; auto-discovery is triggered by work (or an explicit on-demand discover()), so declaring a filter is required only where discovery actually runs.
  • Filter must be settable before the peripheral is ever connected — a manual connect() can throw bluetoothPoweredOff while still recording durable demand, so filter declaration cannot depend on a live link.
  • Filtered discover services → characteristics (ordering FR-10.2.1); per-service completion tracking.
  • Sendable service/characteristic snapshots; no live CB in public API.
  • Attach CBPeripheralDelegate inside the Bluetooth actor (incl. restore re-wire).

Acceptance criteria

  • Filter API sticky on handle, settable before first connection
  • Auto-discovery trigger points enumerated; empty filter on those paths = hard error
  • Manual-connect-with-empty-filter behavior documented and tested
  • Catalog snapshots exposed; CB types not public
  • Tests with mocks for discovery happy path

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions