Skip to content

fix(server): PR watches notify when retried Actions jobs finish - #36502

Open
eemelipa wants to merge 1 commit into
pingdotgg:mainfrom
eemelipa:fix/pr-watch-retry-completion
Open

eemelipa wants to merge 1 commit into
pingdotgg:mainfrom
eemelipa:fix/pr-watch-retry-completion

Conversation

@eemelipa

Copy link
Copy Markdown

Problem

A watched PR can miss its final CI completion notification when optional GitHub Actions jobs are retried after the required checks have passed. The retry keeps the same head and workflow run, and a deployment comment can wake the agent while downstream smoke tests are still pending, with no later wake when they succeed.

The evaluator only recorded optional checks pending at the required-gate transition. It also discarded completion obligations when their check names disappeared from a later read.

Change

Record pending Actions jobs and workflow-run placeholders even after the required gate has passed. Retain that obligation through downstream-job registration and placeholder removal, then clear it after one completion wake when all checks settle. Reuse the existing persisted owedChecks field; the contract change only updates its comment.

Existing baselines, new-head resets, failure notifications, required-check promotion, and quiet advisory-check churn remain covered by the tests.

Scope

This is a small fix for an obvious missing notification in the existing watch, so it uses CONTRIBUTING.md's small-bug exception allowing submission without an issue.

Related: #34221 handles completed reruns whose pending state was never observed; this patch covers pending optional Actions work after a passing required gate. #32276 discusses repeated same-head notifications; unchanged results and unrelated advisory churn remain quiet here.

Verification

  • Five new regression cases failed before the fix: same-head retries after failure, cancellation, or success, and workflow-placeholder handoffs with and without an observed job.
  • 156 focused evaluator, GitHub normalization/fingerprint, provider, and check-deduplication tests passed.
  • Five existing reactor integration cases passed, covering persistence, restarts, completion state, and host-change wakes.
  • vp run check:changed --concurrency 2 passed for submitted head bdbef5c4dd, based on main 580b526758.

Direct runtime replay through the production evaluator, with synthetic host snapshots:

required passed; seed failed; smoke skipped  -> baseline, no wake
seed retry pending on same head/run         -> no wake, completion owed
seed passed; smoke pending; deploy comment  -> remarks wake only
smoke passed                               -> one checks-passed wake
unchanged results; advisory pending/settled -> no additional wake

Validation uses deterministic fixtures and the existing reactor integration tests, not a new live GitHub retry. Pending work must be observed; retries completed entirely between observations remain outside this fix.

Implemented with GPT-6.1 Sol through the Codex harness in T3 Code.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 14, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at bdbef5c

Macroscope's review found this PR approvable — PR watches now retain completion notifications for late or retried Actions jobs, even when workflow placeholders disappear. The change is confined to existing watch notifications and does not alter product defaults or merge permissions.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request updates owed-check tracking to retain pending, non-required Actions workflow checks while checks remain passed. It adds tests for workflow retries and disappearing checks, and updates the owedChecks documentation.

Changes: Workflow check completion

Layer / File(s) Summary
Retain pending workflow checks until completion
packages/contracts/src/threadPullRequest.ts, apps/server/src/orchestration-v2/pullRequestWatch.ts, apps/server/src/orchestration-v2/pullRequestWatch.test.ts
The owed-check logic retains pending, non-required Actions workflow checks and removes checks that become required. The documentation describes the updated owed-check behavior. Tests cover retries, disappearing workflow checks, and one-time completion reporting.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: shivamhwp, juliusmarminge

Merge Risk: Minimal · up to bdbef

This change makes pull request watches send a final completion notification when retried optional Actions jobs finish after the required checks have passed. No concrete defect was established, and the deterministic regression tests cover the main retry and placeholder-handoff cases. Merge risk is low.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(server): PR watches notify when retried Actions jobs finish" names the main change. The diff makes PR watches keep owed completion checks for pending GitHub Actions jobs and workflow-ru…
Description check Passed The description follows the template. It has Problem, Change, Scope, and Verification sections, and each is filled in with specific content. Scope explains why no issue is linked, using the CONTRIBUTI…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(server): PR watches notify when retried Actions jobs finish" names the main change. The diff makes PR watches keep owed completion checks for pending GitHub Actions jobs and workflow-run placeholders after the required gate passes, so a retried job's completion triggers a wake. The title is specific, follows conventional commit form, and matches the stated objective.

Full details: Description check

Explanation

The description follows the template. It has Problem, Change, Scope, and Verification sections, and each is filled in with specific content. Scope explains why no issue is linked, using the CONTRIBUTING.md small-bug exception, and it references related issues. Verification lists focused tests, the observed results, the commands run, and what was not checked, including live GitHub retries. The template's optional agent-model line is also present.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 580b526 and bdbef5c.

Files selected for processing: 3

  • apps/server/src/orchestration-v2/pullRequestWatch.test.ts
  • apps/server/src/orchestration-v2/pullRequestWatch.ts
  • packages/contracts/src/threadPullRequest.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant