Follow-up from #485's review.
#485 makes the GitHub webhook outbox idempotent per delivery: a redelivered event can no longer enqueue a second outbox entry. The webhook's GitHub action is not idempotent, though. A redelivered dismissed-review event re-requests the review each time, and the current test expects those repeated calls.
Wanted: make the GitHub side effect idempotent per delivery too. Either record the delivery id as handled and skip the re-request on redelivery, or check the PR's current review requests before re-requesting. Test that a redelivery makes no second GitHub call.
Keep the per-delivery lock's manual stale-lock recovery as it is: an age-based cutoff could remove a lock held by a slow live writer and allow a duplicate.
Follow-up from #485's review.
#485 makes the GitHub webhook outbox idempotent per delivery: a redelivered event can no longer enqueue a second outbox entry. The webhook's GitHub action is not idempotent, though. A redelivered dismissed-review event re-requests the review each time, and the current test expects those repeated calls.
Wanted: make the GitHub side effect idempotent per delivery too. Either record the delivery id as handled and skip the re-request on redelivery, or check the PR's current review requests before re-requesting. Test that a redelivery makes no second GitHub call.
Keep the per-delivery lock's manual stale-lock recovery as it is: an age-based cutoff could remove a lock held by a slow live writer and allow a duplicate.