fix: pin Node version, fix action tags, harden CI (#328)#388
Conversation
… env var - Create .node-version (22) and reference it in all 5 workflows - Fix actions/checkout and actions/setup-node from @v6 to @v4 (v6 doesn't exist) - Fix actions/upload-artifact from @v7 to @v4 - Use xargs -d '\n' in lint task to handle filenames with spaces - Add BIOMETRICS_DATABASE_URL to .env.dev and .env.prod templates Closes #328
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 16 minutes and 38 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded new biometrics database environment variables to dev and prod configurations, introduced a Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.node-version (1)
1-1: Pin a full Node 22 patch version for deterministic CI.Line 1 uses
22, which can silently move across newer 22.x releases. For stricter reproducibility/hardening, pin an exact patch and update intentionally.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.node-version at line 1, The .node-version currently contains the loose major "22"; update that single-line value to a full Node 22 patch version (e.g., 22.20.2 or your chosen exact 22.x.y) so CI uses a deterministic runtime; replace the "22" token with the exact patch version and commit the change..env.prod (1)
1-2: Optional: normalize env formatting to clear dotenv-linter warnings.Lines 1-2 currently trigger quote/order/newline warnings in static analysis. Consider normalizing this template to keep lint output clean.
♻️ Suggested cleanup
-DATABASE_URL="file:./db/sleepypod.core.prod.db" -BIOMETRICS_DATABASE_URL="file:./biometrics.prod.db" +BIOMETRICS_DATABASE_URL=file:./biometrics.prod.db +DATABASE_URL=file:./db/sleepypod.core.prod.dbAlso ensure a trailing newline at EOF.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.env.prod around lines 1 - 2, Normalize the .env.prod template by removing unnecessary surrounding quotes from the values for DATABASE_URL and BIOMETRICS_DATABASE_URL, ensure keys are consistently ordered (e.g., alphabetical: BIOMETRICS_DATABASE_URL then DATABASE_URL) and add a single trailing newline at EOF to satisfy dotenv-linter; update the lines containing the DATABASE_URL and BIOMETRICS_DATABASE_URL entries accordingly..env.dev (1)
1-2: Optional: align this env template with dotenv-linter warnings.Static analysis indicates quote-character/order/newline warnings on Lines 1-2. If dotenv-linter is part of CI quality gates, this will stay noisy until normalized.
♻️ Suggested cleanup
-DATABASE_URL="file:./db/sleepypod.core.dev.db" -BIOMETRICS_DATABASE_URL="file:./biometrics.dev.db" +BIOMETRICS_DATABASE_URL=file:./biometrics.dev.db +DATABASE_URL=file:./db/sleepypod.core.dev.dbAlso ensure a trailing newline at EOF.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.env.dev around lines 1 - 2, The .env.dev template triggers dotenv-linter warnings for quote usage, ordering, and missing EOF newline; update the two entries by removing the unnecessary surrounding double quotes from DATABASE_URL and BIOMETRICS_DATABASE_URL values, reorder the keys alphabetically if you follow the repo convention (place BIOMETRICS_DATABASE_URL before DATABASE_URL), and add a trailing newline at EOF so the file ends with a newline.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/test.yml:
- Line 19: The lint step invokes "pnpm eslint" with filenames piped from CHANGED
via xargs but omits the "--" separator, so any filename starting with "-" is
parsed as an option; update the Lint command (the string assigned to the step
named "Lint" that builds CHANGED and calls xargs) to pass "--" before file
arguments (e.g., use "pnpm eslint --") so ESLint treats all xargs inputs as file
paths rather than CLI flags.
---
Nitpick comments:
In @.env.dev:
- Around line 1-2: The .env.dev template triggers dotenv-linter warnings for
quote usage, ordering, and missing EOF newline; update the two entries by
removing the unnecessary surrounding double quotes from DATABASE_URL and
BIOMETRICS_DATABASE_URL values, reorder the keys alphabetically if you follow
the repo convention (place BIOMETRICS_DATABASE_URL before DATABASE_URL), and add
a trailing newline at EOF so the file ends with a newline.
In @.env.prod:
- Around line 1-2: Normalize the .env.prod template by removing unnecessary
surrounding quotes from the values for DATABASE_URL and BIOMETRICS_DATABASE_URL,
ensure keys are consistently ordered (e.g., alphabetical:
BIOMETRICS_DATABASE_URL then DATABASE_URL) and add a single trailing newline at
EOF to satisfy dotenv-linter; update the lines containing the DATABASE_URL and
BIOMETRICS_DATABASE_URL entries accordingly.
In @.node-version:
- Line 1: The .node-version currently contains the loose major "22"; update that
single-line value to a full Node 22 patch version (e.g., 22.20.2 or your chosen
exact 22.x.y) so CI uses a deterministic runtime; replace the "22" token with
the exact patch version and commit the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f9df3050-7f87-4995-b266-578d958dfd1a
📒 Files selected for processing (8)
.env.dev.env.prod.github/workflows/build.yml.github/workflows/dev-release.yml.github/workflows/openapi.yml.github/workflows/release.yml.github/workflows/test.yml.node-version
## Summary Promotes everything on \`dev\` since the last main release (82 commits, 143 files, +9239/-2699). ### Headlining features - **Schedule redesign (#303)** — read-only schedule view with explicit curve management, full-screen \`CurveEditor\` (day picker + bedtime/wake + temp range + presets), \`Left | Right | Both\` side selector, active-curve highlight, atomic \`batchUpdate\` writes, day-conflict resolution, sparkline cards. - **Mini feature flag (#420)** — \`ENABLE_MINI\` env var; PubNub moved to \`optionalDependencies\`; conditional Mini router import. - **Auto-off on no presence (#301)** — schedule respects bed presence. - **Auto-unblock internet during update check (#308)**. - **Schedule batchUpdate cap raised to 1000 (#424)** — fixes AI-curve apply-to-all-days rejection. ### Operational fixes - Pod 3 install path (#383, #384, #386, #392) - Yocto image Python venv (#336) - DAC socket / Avahi on device startup (#331) - Free-sleep/sleepypod switch persistence (#337) - Cross-machine standalone deploys (#308) - Temperature unit conversion (#333) ### Dependency updates ~20 renovate PRs across React 19.2.5, Next 16.2.3, vitest 4.1.4, tanstack/react-query 5.97.0, tRPC 11.16, lucide-react 1.x, etc. ### Misc - ADR 0017 (uv) compiled into deployment wiki - Snoo pentest methodology + recon plan - Git hooks + ESLint cleanup (#313) - CI hardening (#388) ## Test plan - [x] All unit tests pass on dev (606+ tests) - [x] Typecheck clean - [x] Build succeeds (standalone output) - [x] Deployed to Pod 4 at \`192.168.1.88\` and smoke-tested: - schedule on/off - create curve from preset - edit curve, change days, save - day-conflict reassign dialog - delete curve - side selector left/right/both - active-curve highlighting + next set point
|
🎉 This PR is included in version 1.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
.node-version(22) referenced by all 5 workflows for consistent Node versionactions/checkout@v6→@v4andactions/setup-node@v6→@v4(v6 doesn't exist)actions/upload-artifact@v7→@v4xargs -d '\n'in lint task to handle filenames with spacesBIOMETRICS_DATABASE_URLto.env.devand.env.prodtemplatesTest plan
Closes #328
Summary by CodeRabbit
New Features
Chores