Skip to content

fix(ci): release CI ownership on deferred-green to break rework deadlock - #137

Merged
chihsuan merged 1 commit into
mainfrom
fix/ci-green-deferred-rework-deadlock
Jul 1, 2026
Merged

fix(ci): release CI ownership on deferred-green to break rework deadlock#137
chihsuan merged 1 commit into
mainfrom
fix/ci-green-deferred-rework-deadlock

Conversation

@chihsuan

@chihsuan chihsuan commented Jul 1, 2026

Copy link
Copy Markdown
Member

Context

CiPoller and PrReviewPoller can deadlock: after a rework, a green CI check that is deferred keeps its failure-owned status/retry count, so neither poller ever advances the PR's pending reviewer comments.

TL;DR

Green-but-deferred CI now relinquishes failure ownership so the review poller can dispatch the pending rework.

Summary

  • mark_ci_green deferred branch now resets ci_retry_count/failed_checks/ci_failure and drops owned statuses to watching.
  • Add released_deferred_status/1 so a green check no longer satisfies ci_owned_record?/1 while finalize stays deferred.
  • Update CI poller tests to expect ownership release on deferred-green; assert ci_owned_issue?/2 returns false.

Alternatives

  • Guard ci_owned_record?/1 on last_action == "green_deferred": couples the reader to a log string and leaves stale owned state on the record.
  • Exempt green from ci_owned_issue?/2 in the review poller: fixes one caller but keeps the misleading persisted state.

Test Plan

  • make all
  • mix test test/symphony_elixir/ci_poller_test.exs test/symphony_elixir/pr_review_poller_test.exs
  • mix format --check-formatted, mix specs.check, mix credo

@chihsuan
chihsuan merged commit e45113f into main Jul 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant