Skip to content

fix(lint): keep root postinstall as the sole Electron binary install owner - #20788

Merged
nwparker merged 1 commit into
mainfrom
nwparker/fix-anti-slop-postinstall-contract
Sep 15, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/fix-anti-slop-postinstall-contract

Conversation

@nwparker

@nwparker nwparker commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 0

main is failing. #20726 appended the anti-slop plugin sync to postinstall, which violates a contract test:

FAIL config/scripts/package-electron-runtime-contract.test.mjs
  > keeps root postinstall as the single Electron binary install owner
Expected: "node config/scripts/rebuild-native-deps.mjs"
Received: "node config/scripts/rebuild-native-deps.mjs && node config/scripts/sync-anti-slop-plugin.mjs"

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), and verify — but it is a single assertion.

Fix

Restores postinstall to exactly node config/scripts/rebuild-native-deps.mjs.

Nothing is lost: audit:anti-slop already 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 skips postinstall leaving the gitignored .anti-slop-plugin/ directory absent.

Verification

  • package-electron-runtime-contract.test.mjs → 22 passed (was 1 failed).
  • Deleted .anti-slop-plugin/ and ran pnpm run audit:anti-slop → exit 0, directory recreated. The self-heal genuinely covers the postinstall path.

…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.
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: e3b07d24-e3ef-440b-8001-a019ede12f17

📥 Commits

Reviewing files that changed from the base of the PR and between 4a5b058 and 2560e98.

📒 Files selected for processing (1)
  • package.json

Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The postinstall script in package.json now runs only config/scripts/rebuild-native-deps.mjs. It no longer runs config/scripts/sync-anti-slop-plugin.mjs during installation.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 2560e

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)

Check name Status Explanation Resolution
Description check ⚠️ Warning 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,… Complete the required template sections. Add the actual linked issue in the Fixes #... format, write N/A with a reason for Visual Proof, document testing platforms and checkbox results, complete AI Disclosure when applicable, address th…
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: restoring the root postinstall script as the sole Electron binary install owner.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

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 Fixes #... format, write N/A with a reason for Visual Proof, document testing platforms and checkbox results, complete AI Disclosure when applicable, address the remaining sections, and mark the relevant checklist items.

  • Fix all pre-merge checks with AI

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Restores postinstall to a single owner — package.json:100 drops the appended node config/scripts/sync-anti-slop-plugin.mjs, returning the hook to exactly node config/scripts/rebuild-native-deps.mjs, which is what the contract test at config/scripts/package-electron-runtime-contract.test.mjs:27 asserts.

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.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@nwparker
nwparker merged commit bbd808a into main Sep 15, 2026
29 checks passed
@nwparker
nwparker deleted the nwparker/fix-anti-slop-postinstall-contract branch September 15, 2026 06:06
ivanvykopal pushed a commit to ivanvykopal/orca that referenced this pull request Sep 20, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant