fix(orb): align derivePublicCommentMergeFacts' neverClosed with the planner's close-eligibility formula - #8786
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…lanner's close-eligibility formula
derivePublicCommentMergeFacts computed neverClosed from only `authorLogin === repoOwner ||
isProtectedAutomationAuthor`, diverging from the real close-eligibility formula the planner uses
(closeWithheldReason, agent-actions.ts): `(authorIsOwner || authorIsAdmin) && closeOwnerAuthors !== true`.
Two consequences fixed:
- A per-repo admin (non-owner) author was wrongly shown as closable (planner protects them like the owner).
- An owner-authored PR on a `closeOwnerAuthors: true` repo was wrongly shown as un-closable ("held")
even though the planner can actually close it.
The caller resolves the author's live per-repo admin status via isPerTenantAdmin (the same source the
freeze-exemption check already uses) and threads it plus closeOwnerAuthors into the pure function.
Closes JSONbored#8683
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8786 +/- ##
==========================================
+ Coverage 90.56% 91.19% +0.63%
==========================================
Files 96 97 +1
Lines 22490 25690 +3200
Branches 3884 5022 +1138
==========================================
+ Hits 20367 23429 +3062
- Misses 1945 1994 +49
- Partials 178 267 +89
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-26 05:53:05 UTC
Review summary Nits — 3 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
derivePublicCommentMergeFactscomputedneverClosedfrom onlyauthorLogin === repoOwner || isProtectedAutomationAuthor, diverging from the real close-eligibility formula the planner uses(
closeWithheldReasonin this file, andagent-actions.ts'scloseEligible):(authorIsOwner || authorIsAdmin) && closeOwnerAuthors !== true.Two consequences fixed:
protects them the same as the owner.
closeOwnerAuthors: truerepo was wrongly shown as un-closable("held"), even though the planner can actually close it.
The caller resolves the author's live per-repo admin status via
isPerTenantAdmin(the same sourcethe freeze-exemption check already uses) and threads it plus
closeOwnerAuthors(through theexisting
settings) into the pure function.Test plan
neverClosedis false for an owner-authored PR oncecloseOwnerAuthors: true(was true)neverClosedis true for a per-repo admin (non-owner) author withoutcloseOwnerAuthorstsc --noEmitclean; all touched unit tests greenCloses #8683