From 0f66ba7b295fbe66ff5116d459b34c7374725993 Mon Sep 17 00:00:00 2001 From: anandgupta42 Date: Thu, 23 Apr 2026 11:40:06 -0700 Subject: [PATCH] fix: make anti-slop advisory instead of auto-closing legitimate PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `anti-slop` workflow was closing legitimate team-member PRs within two minutes of opening. Root cause is a self-inflicted honeypot: the repo's `pull_request_template.md` embeds an HTML comment instructing any LLM/AI model to prepend the word "PINEAPPLE" to the PR description, and `anti-slop.yml` lists that same word in `blocked-terms`. Any AI-assisted PR from a team member follows the template instruction verbatim and then trips the blocked-terms check — a guaranteed close. PR #739 (an 8-file, 496-line BQ finops fix with a passing consensus code review and all other CI green) was auto-closed this way. There is no `TEAM_MEMBERS` carve-out in `anti-slop.yml` the way `pr-standards.yml` has one, so even listed members are subject to the auto-close. The action's `authorAssociation` check only recognizes GitHub's built-in OWNER/MEMBER/COLLABORATOR, not the repo's local `.github/TEAM_MEMBERS` file. Change: flip `close-pr: true` -> `close-pr: false`. All other anti-slop behavior is preserved — failure labels still land (`needs-review:blocked`), the failure message still comments on the PR, and the action still runs on every open/edit/synchronize. Maintainers can close manually when the signal is real. This keeps the anti-spam signal without the false-positive close. Two follow-ups are noted in the in-file comment and issue #740 but left out of scope here: 1. Whether to keep `PINEAPPLE` in `blocked-terms` at all given that the template actively induces its inclusion. 2. Whether to add a `TEAM_MEMBERS` carve-out to anti-slop mirroring `pr-standards.yml`'s pattern. Closes #740 Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/anti-slop.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/anti-slop.yml b/.github/workflows/anti-slop.yml index fe6ed9bdd..0bf681c6b 100644 --- a/.github/workflows/anti-slop.yml +++ b/.github/workflows/anti-slop.yml @@ -77,7 +77,13 @@ jobs: master # --- Actions on failure --- - close-pr: true + # Advisory, not blocking. Too many legitimate team PRs were auto-closed + # because the PR template instructs LLMs to prepend "PINEAPPLE" + # (honeypot) — any AI-assisted PR from a team member then trips the + # blocked-terms check and gets closed 2 minutes after opening. The + # labels and failure message still fire, so maintainers retain the + # signal and can close manually when warranted. See issue #740. + close-pr: false lock-pr: false failure-add-pr-labels: "needs-review:blocked" failure-pr-message: |