fix: verify committed lib/ matches source in CI - #756
Conversation
Add a post-build diff check so the shipped action bundle cannot drift from src without failing CI, even when local hooks are bypassed. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Review limit reached
Next review available in: 36 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe workflow now uses Node.js 24 across build, test, and lint jobs. The build job checks committed ChangesCI consistency
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
CONTRIBUTING.md (1)
8-8: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDocument the Node.js version used for the integrity build.
The workflow rebuilds and checks
lib/with Node.js 24, but this instruction does not state that requirement. If another Node.js version changes the build output, contributors can create a bundle that fails only in CI. StateNode.js 24here, or enforce the same version with repository toolchain metadata.📝 Proposed wording
-4. Build the action (`npm ci && npm run build`) and include any `lib/` changes in your commit. +4. Use Node.js 24, build the action (`npm ci && npm run build`), and include any `lib/` changes in your commit.🤖 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 `@CONTRIBUTING.md` at line 8, Update the build instruction in CONTRIBUTING.md to explicitly require Node.js 24 for running npm ci and npm run build, matching the CI integrity-build environment.
🤖 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.
Inline comments:
In @.github/workflows/test.yml:
- Around line 22-26: Update the verify-lib check in the workflow to detect
untracked files under lib/ in addition to tracked diffs, using git ls-files
--others -- lib/ or an equivalent git status parser. Ensure any untracked
generated artifact causes the existing out-of-sync failure and prevents the
upload from being skipped.
- Around line 17-18: Update the workflow permissions to grant only contents:
read at workflow or job scope, and set persist-credentials: false on every
actions/checkout step unless a later step explicitly requires authenticated Git
commands.
---
Nitpick comments:
In `@CONTRIBUTING.md`:
- Line 8: Update the build instruction in CONTRIBUTING.md to explicitly require
Node.js 24 for running npm ci and npm run build, matching the CI integrity-build
environment.
🪄 Autofix
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 Plus
Run ID: dd73e30d-dda5-4231-8491-d9a6dac29079
📒 Files selected for processing (2)
.github/workflows/test.ymlCONTRIBUTING.md
Detect untracked lib/ artifacts, drop checkout credentials, and document Node 24 for local builds. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
lib/differs from the fresh build (closes the build-integrity gap where only a bypassable Husky hook kept the bundle in sync).lib/as an artifact when the check fails.Test plan
lib/.lib/index.jsonly and confirm Build fails and uploads thelibartifact.Made with Cursor
Summary by CodeRabbit
Chores
Documentation