You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(server): PR watches notify when retried Actions jobs finish - #36502
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.
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.
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.
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: 4
Check name
Status
Explanation
Title check
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
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
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:S10-29 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
owedChecksfield; 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
vp run check:changed --concurrency 2passed for submitted headbdbef5c4dd, based on main580b526758.Direct runtime replay through the production evaluator, with synthetic host snapshots:
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.