Skip to content

round 2 fixes: r10 ts_epoch, dead node files, pow10 dedupe - #39

Closed
abdulsaheel wants to merge 1 commit into
audit/fixes-round1-protocolfrom
audit/fixes-round2-protocol
Closed

round 2 fixes: r10 ts_epoch, dead node files, pow10 dedupe#39
abdulsaheel wants to merge 1 commit into
audit/fixes-round1-protocolfrom
audit/fixes-round2-protocol

Conversation

@abdulsaheel

@abdulsaheel abdulsaheel commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

few more from the audit pass:

  • r10-live decode was still missing ts_epoch even though the comment right above it claimed the fix already covered timestamps. added it, matches what compact-hr and r24 already emit.
  • deleted package.json/package-lock.json/tsconfig.json — leftover node scaffolding from before the ts/ folder got deleted, nothing references them.
  • readme said dart test runs 71 tests, it's actually 432 now. just made it not call out a number so it stops going stale.
  • _pow10 was hand-rolled in two files even though dart:math is already a dep elsewhere in the package. swapped both for math.pow.

Summary by Sourcery

Align r10 realtime decoding with other record formats and clean up obsolete project support files.

Bug Fixes:

  • Include epoch timestamps in decoded r10 realtime heart-rate records.

Enhancements:

  • Replace duplicated power-of-ten helpers with dart:math and remove obsolete TypeScript project scaffolding.

Documentation:

  • Update the README test command to avoid a stale test-count reference.

…10 into math.pow, fix stale test count in readme
@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: faf76a44-7023-4755-8e19-8a02badc80f8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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 Aug 29, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This cleanup pass fixes the missing timestamp in R10 live decoding, standardizes rounding scale calculation on dart:math, removes unused TypeScript/Node scaffolding, and makes the test command documentation count-independent.

Sequence diagram for R10 live timestamp decoding

sequenceDiagram
    participant Decoder
    participant R10Record
    Decoder->>R10Record: parseR10(...)
    R10Record-->>Decoder: tsEpoch
    Decoder-->>Decoder: Decoded realtime_hr with ts_epoch
Loading

File-Level Changes

Change Details Files
Align realtime HR decoding with the timestamp fields emitted by other record formats.
  • Add ts_epoch from the parsed R10 timestamp to realtime_hr decoded output.
lib/src/control.dart
Replace duplicated power-of-ten helpers with the standard math implementation while preserving existing rounding behavior.
  • Import dart:math and compute scaling factors with math.pow in both rounding implementations.
  • Remove the local _pow10 helpers.
lib/src/control.dart
lib/src/records.dart
Remove obsolete TypeScript project scaffolding from the Dart-only package.
  • Delete unused Node package metadata and TypeScript compiler configuration.
package.json
package-lock.json
tsconfig.json
Prevent the README test-count documentation from becoming stale.
  • Describe dart test as running the full suite without hard-coding the current test count.
README.md

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

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@abdulsaheel

Copy link
Copy Markdown
Contributor Author

squashed into #42 for one clean review — closing this round.

@abdulsaheel
abdulsaheel deleted the audit/fixes-round2-protocol branch August 29, 2026 13:16
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