quantum guard vs averaged rhr, glassbox narrative direction - #83
Conversation
There was a problem hiding this comment.
Sorry @abdulsaheel, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 6 days and 5 hours by commenting @sourcery-ai review. Upgrade to get a review now.
|
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 48 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (4)
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. Comment |
Reviewer's GuideThe PR differentiates continuous averaged physiological baselines from quantized whole-unit data before applying the dispersion refusal guard, preventing valid RHR inputs from being excluded, and corrects glassbox narratives to report raw metric direction with less prescriptive low-readiness language. Sequence diagram for raw-direction glassbox readiness narrativesequenceDiagram
participant Inputs
participant Readiness as glassBoxReadiness
participant Narrative as _buildNarrative
Inputs->>Readiness: collect metric delta
Readiness->>Readiness: create _RawItem with delta
Readiness->>Readiness: rank drivers by contribution
Readiness->>Narrative: _buildNarrative(score, drivers, topDelta)
Narrative->>Narrative: choose direction from topDelta
Narrative-->>Readiness: readiness narrative
Flow diagram for the quantum dispersion guardflowchart TD
A[Baseline values] --> B{All values sit on quantum grid?}
B -->|No| C[Accept continuous baseline dispersion]
B -->|Yes| D[Compute standard deviation]
D --> E{SD below quantum?}
E -->|Yes| F[Refuse baseline for readiness]
E -->|No| G[Accept baseline]
C --> H[Use physiological input in readiness]
G --> H
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…n an imported history doesn't disable it
dispersionBelowQuantum treated nightly rhr as whole bpm, but nocturnalRhr gives a 30-min mean so it's continuous. a tight real baseline (sd under 1 bpm) got rhr refused from readiness on the night it rose, same for illness/anomaly/event/overreaching. guard now only fires when the baseline actually sits on the quantum grid, integer baselines behave as before.
glassbox narrative took up/down from the oriented contribution so a lower rhr read as "up". uses the raw delta now, and the low band says "a low-readiness day" instead of telling people to take it easy.
edge needs an algo bump when it repins this.
Summary by Sourcery
Refine readiness dispersion guards and glassbox narratives to correctly handle continuous averaged metrics and report driver direction accurately.
Bug Fixes:
Enhancements:
Tests: