Skip to content

Fix readiness_absent Crashlytics noise and map-tile FATAL misclassification - #116

Merged
abdulsaheel merged 2 commits into
mainfrom
fix/crashlytics-readiness-noise-and-tile-fatal
Jul 21, 2026
Merged

Fix readiness_absent Crashlytics noise and map-tile FATAL misclassification#116
abdulsaheel merged 2 commits into
mainfrom
fix/crashlytics-readiness-noise-and-tile-fatal

Conversation

@abdulsaheel

@abdulsaheel abdulsaheel commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator
  • Gate the readiness_absent Crashlytics non-fatal to only fire when at least one input genuinely had a value with an adequate baseline (the true "should have computed" case), not on an honest no-sleep/no-HR day where every input is legitimately absent. Also record each input's baseline stddev in the diagnostic so a future hit is immediately distinguishable from readinessComposite's intentional zero-dispersion abstain (see wellness_test.dart) instead of another round of guessing.
  • Respect Flutter's FlutterErrorDetails.silent flag in the global FlutterError.onError hook: errors the framework itself marks silent (e.g. an image/tile network fetch failing after its widget was disposed — seen live as a FATAL crash while viewing a workout route map with no connectivity) are now recorded as non-fatal instead of unconditionally fatal, so they stop inflating the crash-free-users metric.

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced readiness diagnostics by adding baseline_sd to readiness “absent” details for each input, improving interpretation of missing readiness results.
    • Reduced non-fatal crash alert noise by only emitting “readiness absent” reports when readiness is not the expected baseline-needed case and at least one input indicates a true value.
    • Improved error classification by recording silent framework issues as non-fatal and marking silence in the stored error context for more accurate troubleshooting.

…cation

- Gate the readiness_absent Crashlytics non-fatal to only fire when at
  least one input genuinely had a value with an adequate baseline (the
  true "should have computed" case), not on an honest no-sleep/no-HR
  day where every input is legitimately absent. Also record each
  input's baseline stddev in the diagnostic so a future hit is
  immediately distinguishable from readinessComposite's intentional
  zero-dispersion abstain (see wellness_test.dart) instead of another
  round of guessing.
- Respect Flutter's FlutterErrorDetails.silent flag in the global
  FlutterError.onError hook: errors the framework itself marks silent
  (e.g. an image/tile network fetch failing after its widget was
  disposed — seen live as a FATAL crash while viewing a workout route
  map with no connectivity) are now recorded as non-fatal instead of
  unconditionally fatal, so they stop inflating the crash-free-users
  metric.

No kAlgoVersion bump — telemetry/diagnostics only, no scoring change.
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6a1c94a2-3c47-4ce2-9546-d91fad3c663b

📥 Commits

Reviewing files that changed from the base of the PR and between 1904c11 and 123ed24.

📒 Files selected for processing (1)
  • lib/telemetry/telemetry_service.dart

📝 Walkthrough

Walkthrough

Readiness-absent diagnostics now report baseline standard deviation and condition non-fatal alerts on available inputs. Flutter error handling classifies silent errors as non-fatal and stores the silent flag in queued crash context.

Changes

Diagnostics and telemetry updates

Layer / File(s) Summary
Readiness absence diagnostic enrichment
lib/compute/onehz_pipeline.dart, lib/compute/derivation_engine.dart
Readiness diagnostics and non-fatal summaries now include per-input baseline_sd; non-fatal emission requires at least one readiness value to be present.
Flutter error severity classification
lib/telemetry/telemetry_service.dart
Crashlytics fatality is based on details.silent, and queued crash context preserves the silent flag and library value.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

  • OpenStrap/edge#85: Updates the same readiness-absent diagnostic payload and telemetry flow.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes both main changes: reducing readiness_absent Crashlytics noise and fixing silent map-tile errors being marked fatal.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/crashlytics-readiness-noise-and-tile-fatal

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
lib/telemetry/telemetry_service.dart (1)

92-95: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Update the nearby Crashlytics visibility comment.

The new handler now records silent Flutter errors as non-fatal, but the comment at Line 119 still says Crashlytics “only ever sees FATAL errors” from installErrorHandlers. Revise it to distinguish fatal and non-fatal framework reports.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/telemetry/telemetry_service.dart` around lines 92 - 95, Update the
comment near installErrorHandlers to accurately state that Crashlytics receives
fatal reports for non-silent Flutter errors and non-fatal reports for silent
errors. Leave the recordFlutterError behavior unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@lib/telemetry/telemetry_service.dart`:
- Around line 92-95: Update the comment near installErrorHandlers to accurately
state that Crashlytics receives fatal reports for non-silent Flutter errors and
non-fatal reports for silent errors. Leave the recordFlutterError behavior
unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 66fb17cd-62f6-4678-820a-408e0bcd84fb

📥 Commits

Reviewing files that changed from the base of the PR and between 87aa728 and 1904c11.

📒 Files selected for processing (3)
  • lib/compute/derivation_engine.dart
  • lib/compute/onehz_pipeline.dart
  • lib/telemetry/telemetry_service.dart

Comment said Crashlytics only ever sees FATAL errors from
installErrorHandlers — no longer true since FlutterError.onError now
files silent framework errors as non-fatal. PlatformDispatcher.onError
is still always fatal; clarify both.
@abdulsaheel
abdulsaheel merged commit c82834c into main Jul 21, 2026
1 check was pending
@abdulsaheel
abdulsaheel deleted the fix/crashlytics-readiness-noise-and-tile-fatal branch July 21, 2026 03:11
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