Repository navigation
feat(biometrics): add versioned calibration profiles, references and shared Python runtime - #828
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Important Review skippedToo many files! This PR contains 234 files, which is 134 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configuration
⛔ Files ignored due to path filters: 2
📒 Files selected for processing: 234
You can disable this status message by setting the
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 |
4256406 to
00adc14
Compare
783cd9e to
67f674b
Compare
…I cannot poison commit mapping
bd39697 to
f170f13
Compare
…ibration, saved curves and presence auto-on (#820) Promotes `dev` to `main` with Apple Watch reference data, configurable sleep-stage classification, biometrics calibration, saved and annotated curves, experimental presence auto-on, and Host/Origin hardening for the pod API. ## Changes - Import Apple Watch sleep stages and heart rate, overlay reference heart rate on the vitals chart, explore vitals, and build datasets for classifier calibration (#802, #803, #814, #821, #826). - Add per-side sleep-stage rules, written as sentences with quick adjust, preview and a change log, and respect piezo calibration quality, including unknown calibration in the week view (#815, #816, #817, #822). - Add biometrics calibration: versioned profiles and references, a shared Python runtime, a retained backtest replay engine, a prospective shadow runtime with a calibration API, and the calibration UI (#828–#831). - MCP tools to inspect, preview and apply sleep-stage rules against the Watch reference, and to build and save a sleep curve from pod data (#823, #825). - Save named curves on the pod and add optional notes to curves (#827, #832). - Experimental per-side presence auto-on with person-vs-pet occupancy classification; auto-off now ignores light loads such as pets (#810). - Reject unknown Host headers so DNS-rebinding pages cannot reach the unauthenticated pod API, and apply the same Host/Origin allowlist to the sensor WebSocket handshake (#833, #834). - Improve session endings, movement scoring during Pod 5 pump operation, and vitals continuity for quiet sleepers (#804, #813). - Add away-mode toggles to the side card and Stage panel, move Settings to per-section side tabs, improve the scheduled label contrast, and prevent premature stalled-pipeline banners (#805–#808). - Update dependencies and pin Babel runtime to fix the Turbopack MQTT build (#811, #812, #818, #819). ## Migrations - Configuration DB: side stage classifier, stage classifier changes, curve templates, schedule notes and presence auto-on columns (0022–0027). - Biometrics DB: Watch reference stages and vitals, and calibration tables (0017–0030). ## Test plan - [x] GitHub checks on the `dev` head: build, lint, typecheck, unit tests, browser tests and all Python test jobs. - [ ] After merge, wait for "Analyze & Release" on the `main` merge commit, then `sudo sp-update main` once on a pod and confirm the service starts and migrations apply.
Part 1 of 4 splitting #824 (reference snapshot
7b9ac5d3) into reviewable stacked PRs. #824 stays open as the umbrella and is not merged; the four parts reproduce its tree exactly (the tree offeat/bio-cal-4-uiis identical to the tree of7b9ac5d3).Stack, merge in order:
feat/bio-cal-1-foundation→dev: versioned calibration profiles, references, DB schema and migrations, shared Python runtimefeat/bio-cal-2-backtest→ part 1: retained backtest replay engine and isolated package experimentsfeat/bio-cal-3-shadow-api→ part 2: prospective shadow runtime, isolated coordinator host, calibration API and MCP, demo handlersfeat/bio-cal-4-ui→ part 3: calibration UI, i18n catalogs, browser tests and docsThis part
src/biometrics/profiles), with activation intent, runtime receipts and legacy stage-settings migration.src/biometrics/references), canonical JSON and the algorithm registry (src/biometrics/algorithms).src/biometrics/backtest: contracts, datasets, jobs, submission, evaluator, worker entry) and the worker-only bundle script with thebuildhook, because the profile activation path and its tests depend on them.modules/common/biometrics: frames, gates, signal, replay, raw records, shadow workers) with the runtime adapter and Python tests.@noble/hashes,esbuild,@playwright/test(lockfile updated here so later parts do not touch it).sleepypod-core-125because it changes TypeScript and Python identity in lockstep and needs a pod migration plan.devat4ea6aa5f(feat(mcp): build and save a sleep curve from pod data #825, feat(curves): save named curves on the pod #827, feat(schedule): optional notes on curves #832 landed after the split). The stack's migration moved from0024to0026_strong_the_orderbecausedevtook 0024 and 0025; the SQL was regenerated with drizzle-kit from the merged schema and is byte-for-byte the original, and the schema snapshot test was refreshed. Codecov uploads now run only fromsleepypod/coreso the review mirror's CI cannot poison the patch status.Test plan
tsc --noEmitclean at this sliceeslinton the changed TS/TSX files cleanvitest rungreen at this slice (389 files, 6,236 tests) (the only failure under full-suite load was the pre-existing, unrelatedscripts/tests/diagnosticCli.test.tstiming test, which passes in isolation)🤖 Generated with Claude Code
🛏️ Beam this PR onto a sleepypod ✨
Pick the snippet that matches your pod. Already-installed pods can't use the curl bootstraps below — sleepypod's egress firewall DROPs github.com, and the script that knows how to unblock WAN is the very file curl is trying to fetch. Use
sp-updateinstead; it's on disk and opens WAN as its first step.🔄 Already on a sleepypod (most common — review a PR on a running pod):
🚀 Fresh pod / first install — bootstraps from GitHub, rebuilds every push:
curl -fsSL https://raw.githubusercontent.com/sleepypod/core/feat/bio-cal-1-foundation/scripts/install \ | sudo bash -s -- --branch feat/bio-cal-1-foundation🎯 Pin to this exact build (run 38518366373 ·
f170f13) — fresh-pod path, locked to one CI artifact for reproducible review:🧊 Artifact:
sleepypod-core· self-destructs in 30 days 💥