Skip to content

watch9: pairs and banks raw data, decodes nothing yet - #350

Open
abdulsaheel wants to merge 5 commits into
mainfrom
feat/watch9-adapter
Open

watch9: pairs and banks raw data, decodes nothing yet#350
abdulsaheel wants to merge 5 commits into
mainfrom
feat/watch9-adapter

Conversation

@abdulsaheel

@abdulsaheel abdulsaheel commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

pairs-only adapter for the unbranded Watch9 board. no signals declared, no commands sent.

Summary by Sourcery

Add experimental Watch9 pairing and raw-data collection without decoding device frames or deriving health metrics.

New Features:

  • Add experimental Watch9 support for pairing, bounded listening, and raw frame archiving without decoding or derived health signals.
  • Expose Watch9 pairing and manual/background synchronization in the device UI and sync flows.

Bug Fixes:

  • Ensure Watch9 connections are cleaned up reliably after synchronization failures or teardown errors.

Enhancements:

  • Register the Watch9 service and characteristic while documenting its notify-only, no-write behavior.
  • Preserve non-empty Watch9 notifications as source-tagged archive records with arrival timestamps.

Tests:

  • Add coverage confirming Watch9 declares no signals, archives frames verbatim, ignores empty notifications, performs no writes, and emits no offload checkpoints.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 18 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: ee06336c-34e0-412a-b742-85685c8600c4

📥 Commits

Reviewing files that changed from the base of the PR and between b98cae6 and b9f8015.

⛔ Files ignored due to path filters (3)
  • test/adapter_signals_registry_test.dart is excluded by !test/**
  • test/adapters/watch9_test.dart is excluded by !test/**
  • test/band_registry_test.dart is excluded by !test/**
📒 Files selected for processing (6)
  • lib/ble/adapters/_registry.dart
  • lib/ble/adapters/watch9.dart
  • lib/ble/watch9_link.dart
  • lib/sync/background_sync.dart
  • lib/ui2/pairing/device_picker.dart
  • lib/ui2/profile/devices.dart

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds experimental Watch9 support end to end: the board can be paired, connected during background or manual sync, listened to on its single known characteristic for 20 seconds, and have every non-empty notification archived verbatim, while intentionally declaring no signals, decoding no payloads, and sending no commands.

File-Level Changes

Change Details Files
Registers the experimental Watch9 board as a notify-only adapter with no decoded signals or command support.
  • Adds the Watch9 service and shared command/notification characteristic constants.
  • Adds a registry entry using arrival timestamps, an empty signal map, and no derivation sources.
  • Implements a listener that ignores empty notifications and emits each non-empty frame verbatim as raw data.
  • Adds tests covering registry shape, raw-frame preservation, empty notifications, no writes, and no offload checkpoints.
lib/ble/adapters/_registry.dart
lib/ble/adapters/watch9.dart
test/adapter_signals_registry_test.dart
test/adapters/watch9_test.dart
test/band_registry_test.dart
Adds a paired Watch9 link that connects, listens for a bounded window, archives raw frames, and safely tears down.
  • Looks up the paired secondary device and serializes sync operations.
  • Discovers services, validates the required characteristic, and runs the adapter for 20 seconds without issuing commands.
  • Persists non-empty frames as source-tagged archive records with null counter and timestamp fields.
  • Integrates secondary-link limits, failure handling, stop/flush behavior, and background synchronization.
lib/ble/watch9_link.dart
lib/sync/background_sync.dart
Exposes Watch9 pairing and manual synchronization in the device UI.
  • Adds pairing metadata and an English-only device-picker description.
  • Adds a watch-specific icon and device detail sync action.
  • Reports sync success or nearby/unavailable-device failure without affecting existing band sync.
lib/ui2/pairing/device_picker.dart
lib/ui2/profile/devices.dart

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. A successful Watch9 session persists every received frame as an ArchiveRecord, including frames that may be malformed or from an incorrectly identified device. Reverting the code stops future collection but does not remove already stored rows; the bounded records can be deleted or repaired separately.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Failed to generate code suggestions for PR

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Failed to generate code suggestions for PR

@abdulsaheel

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@abdulsaheel

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@abdulsaheel

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@abdulsaheel

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Failed to generate code suggestions for PR

@abdulsaheel

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@abdulsaheel

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Rate Limit Exceeded

@abdulsaheel have exceeded the limit for the number of chat messages per hour. Please wait 15 minutes and 35 seconds before sending another message.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Failed to generate code suggestions for PR

@abdulsaheel

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Rate Limit Exceeded

@abdulsaheel have exceeded the limit for the number of chat messages per hour. Please wait 0 minutes and 40 seconds before sending another message.

@abdulsaheel

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Rate Limit Exceeded

@abdulsaheel have exceeded the limit for the number of chat messages per hour. Please wait 0 minutes and 13 seconds before sending another message.

@abdulsaheel

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Failed to generate code suggestions for PR

@abdulsaheel

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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