fix(agent): close bad contributor PRs even on guarded paths - #1106
Merged
Conversation
…(guard blocks merge, not rejection) #1090 gated willClose on !guardrailHit, so a rejected CONTRIBUTOR PR touching a guarded path was HELD instead of closed (e.g. gittensory #1098: rejected, touches src/review|services|signals → stayed open with a 'closing' message). That contradicts the spec: 'guarded + would-merge → hold; otherwise → closure.' The hard-guardrail exists to stop auto-MERGING/APPROVING crucial-path changes without owner review (canMerge + approve still gate on !guardrailHit). It must NOT keep a rejected PR open — closing rejects bad changes and merges nothing, so it is always safe. willClose no longer checks guardrailHit; owner/automation PRs are still never closed (isContributor gates it); GOOD-but-guarded PRs still fall through to the owner (held). Test flipped: a failing contributor PR on a guarded path now CLOSES.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1106 +/- ##
=======================================
Coverage 94.79% 94.79%
=======================================
Files 153 153
Lines 18553 18553
Branches 6708 6708
=======================================
Hits 17587 17587
Misses 408 408
Partials 558 558 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
JSONbored
added a commit
that referenced
this pull request
Jun 23, 2026
…g (#hold-crucial-on-reject) (#1109) Operator decision: a guarded/crucial PR (CI, the review engine, visual) must NEVER be auto-closed, even on a reject verdict — a hallucinated reject (the #1528 near-miss: diff-only false-positives) must not auto-close a good crucial PR. The owner verifies + closes/merges. The BULK (non-guarded) contributor PRs still auto-close one-shot on a bad verdict / conflict; only the small crucial set is held. Restores the guardrail check on willClose (reverts #1106's removal). Owner/automation PRs never close regardless.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per spec — guarded + would-merge → hold; otherwise → closure. #1090 made guarded paths block auto-close too, so rejected contributor PRs touching crucial paths (e.g. #1098, touching src/review|services|signals) were held with a 'closing' comment but never closed. The guardrail must only block auto-MERGE/APPROVE of crucial paths, never the rejection of a bad PR (closing merges nothing → always safe).
willCloseno longer checksguardrailHit; owner PRs still never close; good-but-guarded still held. Full suite green (3492).