Context (ORB round-2 adversarial audit)
src/services/agent-action-executor.ts:1053-1055: `createIssueComment(closeComment)` (plain POST, no marker — unlike src/github/comments.ts's createOrUpdateIssueCommentWithMarker) immediately followed by `closePullRequest`. When the comment succeeds and the close throws (transient 403/5xx — the pre-mutation rechecks never re-verify the close call itself), the action audits "error" and the next replan re-derives the same violation → posts a second identical comment before re-attempting the close. Repeats every failed cycle. closeComment is populated for essentially every real close reason (agent-actions.ts:687,815,860,885,910,1353,1369,1412).
Fix
Route closeComment through the marker-based create-or-update helper with a per-(repo, pr, closeKind) marker so retries PATCH the canonical comment instead of stacking duplicates. Tests: comment-then-close-fails-then-retry posts exactly one comment.
99%+ patch coverage, branch-counted.
Context (ORB round-2 adversarial audit)
src/services/agent-action-executor.ts:1053-1055: `createIssueComment(closeComment)` (plain POST, no marker — unlike src/github/comments.ts's createOrUpdateIssueCommentWithMarker) immediately followed by `closePullRequest`. When the comment succeeds and the close throws (transient 403/5xx — the pre-mutation rechecks never re-verify the close call itself), the action audits "error" and the next replan re-derives the same violation → posts a second identical comment before re-attempting the close. Repeats every failed cycle. closeComment is populated for essentially every real close reason (agent-actions.ts:687,815,860,885,910,1353,1369,1412).
Fix
Route closeComment through the marker-based create-or-update helper with a per-(repo, pr, closeKind) marker so retries PATCH the canonical comment instead of stacking duplicates. Tests: comment-then-close-fails-then-retry posts exactly one comment.
99%+ patch coverage, branch-counted.