fix(executor): make the close-explanation comment marker-idempotent so a failed close's retry never stacks duplicates - #8810
Conversation
…o a failed close's retry never stacks duplicates (#8803) The executor's close case posted action.closeComment via a plain createIssueComment POST with no marker — when the comment landed but the immediately-following closePullRequest failed transiently, the next replan re-derived the same violation and posted a SECOND identical "why we closed you" comment before retrying the close, repeating every failed cycle. closeComment is populated for essentially every real close reason (blacklist, contributor-cap, review-nag, copycat, screenshot-table, linked-issue hard rule, unlinked-issue match, generic heuristic). - comments.ts: closeExplanationMarker(closeKind) + an exported createOrUpdateCloseExplanationComment wrapper embedding the marker in the posted body (HTML comment — invisible to the contributor) so the existing marker machinery finds it on retry: byte-identical replan → skip, reworded → PATCH the canonical comment. Distinct closeKinds keep distinct markers. - agent-action-executor.ts: the close case routes through the wrapper.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-26 07:19:47 UTC
Review summary Nits — 5 non-blocking
CI checks failing
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.
|
…val-queue suites too (#8803)
Summary
Round-2 audit fix (#8803): the executor's close path posted
closeCommentvia a plain unmarked POST immediately beforeclosePullRequest— a transient failure on the close meant every subsequent replan re-posted the identical "why we closed you" comment before re-attempting, stacking duplicates until the close succeeded.Changes
src/github/comments.ts—closeExplanationMarker(closeKind)(per-kind, so distinct close reasons keep separate canonical comments) + exportedcreateOrUpdateCloseExplanationCommentthat embeds the marker in the posted body (HTML comment, renders invisibly — the search-side helper only finds comments whose body carries the marker, same as the intelligence/visual callers). Byte-identical retry → skip with duplicate cleanup; reworded → PATCH.src/services/agent-action-executor.ts— the close case routes through the wrapper, passingaction.closeKind.Test plan
npm run typecheck— cleanCloses #8803