Repository navigation
fix: precompute overview health sensor inputs - #3247
Conversation
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 23 minutes. View limit details
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. |
Reviewer's GuideSchema and migrationsAdd the persisted daily health-sensor model and its schema-only ClickHouse migration, defining the bounded refresh and typed sample representation that the API will read.
ImplementationSwitch oxygen and WHOOP temperature reads to the prepared samples while retaining the existing query-time grouping and selection behavior.
ConfigurationRegister the new model with production analytics processing and the sleep-dashboard dbt build so it is maintained by the existing pipeline.
DocumentationDocument the model, safe production cutover gates, preparation evidence, and implementation plan for future reviewers and operators.
TestsExercise the model against ClickHouse, including decoding, corrections, deletion, bounded reads, native dbt builds, and API reads after removing access to the raw log.
Update repository integration fixtures to build the prepared samples before asserting the existing oxygen and temperature results.
Add the health-sensor model to shared ClickHouse router fixtures and update correlation-query expectations to look for the serving table.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Storybook previews for This comment updates automatically on each PR push. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3247 +/- ##
=======================================
Coverage 97.40% 97.40%
=======================================
Files 1144 1146 +2
Lines 63146 63163 +17
Branches 19617 19618 +1
=======================================
+ Hits 61505 61522 +17
Misses 1595 1595
Partials 46 46
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
Mergestorm reviews this repository's pull requestsEvery PR gets AI code review that flags real bugs before they merge. This account's 30 free credits for this monthly window are used, so reviews are paused at The Starter plan includes 120 credits a month. |
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
The Overview leaves health metrics and insights loading while request-time oxygen and WHOOP temperature queries scan 139–200 million raw rows;
insights.computetimes out after 120 seconds.Move decoding and raw current-state selection into one bounded incremental dbt model. Shared API reads retain caller timezones, delayed measurement dates, replay deduplication and source priorities for web and mobile. Reuse the existing projection to find complete replacement keys before native
FINAL; add a schema-only target migration and current-schema test fixtures.Validation: 23,966 unit/mobile tests, 26 focused real-engine tests (including native dbt initial/incremental execution), lint, root/server/web typechecks and canonical spellcheck pass. After integrating main's account-erasure changes, all 26 focused database tests and root/server/web typechecks passed again. The raw-read regression changes from 100,063 rows to below 50,000 with 100,000 unrelated sensor rows. All checks on final head
90f19975aaa69324e914befe4f6ba427b73279b8passed, including complete CI run 42718035207.Production preparation completed on November 9 before merge: the channel projection covers all 23 current active parts; the schema-only target exists; 45 missing historical oxygen day markers were bootstrapped and bounded raw-key checks now find zero missing health markers. Candidate image revision
f82d4ce44fcef0a7a593493bb65e6452c5883f22ran 140 successful single-threaded dbt invocations, at most 32 days each. The final target contains 4,474 days and 240,898 typed samples, with 0 missing days and 0 dirty days. Production model queries peaked at 2.115 seconds, 907,671 rows read and 186 MiB query memory. No application rollout, timeout change or optimizer forcing was performed. See the cutover procedure and incident evidence.The production outer
FINALplan pruned through all five replacement-key columns, selecting 48 of 25,130 granules for a representative temperature day. A serving-table smoke query over both typed channels completed in 51 ms. The fresh image scan passed after an earlier GHCR cached-layer 403 interruption, without changing permissions or weakening CI; its underlying registry cause remains unconfirmed. Future imports spanning more than one batch still require source-to-target watermark checks rather than treating one successful dbt invocation as complete freshness.Immediately before merge, eight days had changed during CI. Candidate revision
90f19975aaa69324e914befe4f6ba427b73279b8, digestsha256:182e05e689caa67244c3348eccf250eb24ac2e4803f367bf948ad020f1cfb8cd, refreshed the model through the newly deployed shared analytics owner and stock owned-dbt artifact verification. The invocation succeeded in 0.41 seconds; the protected source-to-target check returned 4,474 days, 0 missing and 0 dirty. The projection check also returned zero missing parts. No application rollout was performed as an operator action; normal main CI/deployment follows the merge.