Found during review of #365 (B5 follow-up).
The B5 fix wrapped the four success status transitions defensively, but tracker.comment / uploadAttachment calls right after are still unguarded (src/unified-spawner.ts ~:890, :952, :955, :999, and :580/:589/:592 in the generic path). Both trackers let comment() throw on API errors.
A transient 5xx/rate-limit there propagates to the outer catch, applies the failure outcome over the success status, posts a misleading "failed" comment, and — because the transient regex matches "rate limit"/"500 Internal Server Error" — can trigger auto-retry, re-running a task whose PR was already created or merged.
Fix: wrap the post-transition comment/notify block the same way the transitions are wrapped.
Found during review of #365 (B5 follow-up).
The B5 fix wrapped the four success status transitions defensively, but
tracker.comment/uploadAttachmentcalls right after are still unguarded (src/unified-spawner.ts~:890, :952, :955, :999, and :580/:589/:592 in the generic path). Both trackers letcomment()throw on API errors.A transient 5xx/rate-limit there propagates to the outer catch, applies the failure outcome over the success status, posts a misleading "failed" comment, and — because the transient regex matches "rate limit"/"500 Internal Server Error" — can trigger auto-retry, re-running a task whose PR was already created or merged.
Fix: wrap the post-transition comment/notify block the same way the transitions are wrapped.