Repository navigation
fix(lint): keep root postinstall as the sole Electron binary install owner - #20788
Conversation
…owner #20726 appended the anti-slop plugin sync to postinstall, which breaks the contract asserted by package-electron-runtime-contract.test.mjs and is failing on main. The sync is not needed there: audit:anti-slop already runs it before linting, so a cached install that skips postinstall still works.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The install path now performs only the intended native dependency rebuild, while anti-slop auditing remains independently available. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description explains the problem, fix, and verification, but it omits most required template sections, including ELI5, Linked Issue, Visual Proof with N/A, Testing checkboxes and platform details, Review, Agent skill upstream boundary, Notes, and Checklist. Resolution Complete the required template sections. Add the actual linked issue in 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 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Restores
postinstallto a single owner —package.json:100drops the appendednode config/scripts/sync-anti-slop-plugin.mjs, returning the hook to exactlynode config/scripts/rebuild-native-deps.mjs, which is what the contract test atconfig/scripts/package-electron-runtime-contract.test.mjs:27asserts.
The removal is safe: audit:anti-slop (package.json:168) already runs the sync before oxlint, and #20726 added that self-heal in the same commit for cached installs that skip postinstall. The generated .anti-slop-plugin/ directory is consumed only by config/oxlint-anti-slop.json:7, which is loaded exclusively through audit:anti-slop (the lint chain and .github/workflows/pr.yml:137) — no editor/LSP config references it, so nothing loses coverage.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…owner (stablyai#20788) stablyai#20726 appended the anti-slop plugin sync to postinstall, which breaks the contract asserted by package-electron-runtime-contract.test.mjs and is failing on main. The sync is not needed there: audit:anti-slop already runs it before linting, so a cached install that skips postinstall still works.

mainis failing. #20726 appended the anti-slop plugin sync topostinstall, which violates a contract test:That test exists to keep exactly one owner of the Electron binary install, and appending to the script broke it. It surfaces as three separate red checks —
test / tests node 24 7/8,package (windows), andverify— but it is a single assertion.Fix
Restores
postinstallto exactlynode config/scripts/rebuild-native-deps.mjs.Nothing is lost:
audit:anti-slopalready runs the sync itself (node config/scripts/sync-anti-slop-plugin.mjs && oxlint …), which was added for precisely the case the postinstall hook was covering — a cached install that skipspostinstallleaving the gitignored.anti-slop-plugin/directory absent.Verification
package-electron-runtime-contract.test.mjs→ 22 passed (was 1 failed)..anti-slop-plugin/and ranpnpm run audit:anti-slop→ exit 0, directory recreated. The self-heal genuinely covers the postinstall path.