Repository navigation
[3725 by Claude Opus 5.5] Follow-up CI suspension: say so on the PR, and skip the code follow-up for runner-only failures - #3729
Conversation
…bout 650 tests) and core and root typecheck and lint are clean. One limit: GitHub only re-runs jobs once the whole workflow run has finished, so the "re-run once" path depends on a deferral explained below. I didn't make a visual preview because the change is a line of text in the PR body. 1. The status block says when CI is suspended - While a follow-up holds an active suspension on the current head, the status block in the PR body shows: `CI suspended until the follow-up finishes, re-running checks before then has no effect`. - Once the suspension has cancelled runs, it also shows `runs cancelled by ProPR: N`. A change to that count alone is paced like other check-count changes, so a burst of cancellations doesn't edit the body once per run. The suspension starting or ending is written straight away. - The text goes away when the suspension ends. It is only shown while the suspension is `active`; once ProPR starts restoring runs, a re-run is no longer cancelled. - It uses the existing status computation and rendering, so it follows the same update rules. The suspension text is placed ahead of the check counts, so it survives when the line is cut to fit the 512-character limit. - The facts come from the `pr_ci_suspensions` table (`pullRequestStatusCiNotes.ts`). If that record can't be read, the note is left out rather than failing the whole status read. - The worker's suspension store now asks for a status update when a suspension is reserved, changes state, or is deleted. How long a suspension lasts and which runs it cancels are unchanged. 2. Runner-only failures don't start a code follow-up - Classifier: `classifyCiInfrastructureFailure` is a pure function in `ciFailureInfrastructure.ts`, next to the CI-failure evidence code. Any sign of a test, type or lint failure, or an annotation pointing at a source file, makes it a code failure. Otherwise it counts as infrastructure only if: - the runner received a shutdown signal or lost communication, or - every failed step is a setup/install step and the evidence shows a network, mirror or registry error. - Doubt: if the steps can't be read or anything is unclear, it stays a code failure and gets its comment as today. - Handling (`ciFailureInfrastructureRerun.ts`): it runs after the existing cancellation check, before anything is claimed. It posts no comment, so no follow-up and no suspension start. It re-runs the failed jobs once per workflow run and records what it did so the status block can name the job: - `runner problem in <job>, re-run requested` - `…, re-run when its workflow finishes` - `<job> failed on what looks like a runner problem, re-run it` (when GitHub refuses the re-run, or the one re-run was already used) Because nothing is claimed, a real code failure on the re-run still gets its follow-up. - Deferral: if the workflow run is still going, the re-run waits and is sent when the next check of that commit completes (a new hook in `checkRunHandler.ts`). If that last check finishes before GitHub marks the run complete, the re-run is never sent and the PR stays on "re-run when its workflow finishes", so a person would have to re-run it. A periodic retry would close this gap; I didn't add one. - Evidence read: besides the evidence the comment already uses, this reads one extra thing: the failed job's step names, and only when the text already looks like an infrastructure error. Tests - `test/ciFailureInfrastructure.test.ts`: the classifier cases from the issue (the #3703 apt mirror stall, runner shutdown and lost communication, registry 5xx during install as infrastructure; a failing test, a type error and a lint error as not), plus the doubt cases. It also checks that an infrastructure failure posts no comment and claims nothing, re-runs once, doesn't re-run twice, handles a refused re-run, and handles the deferred re-run. When I disabled the hook, 4 of these tests failed as they should. - `packages/core/test/pullRequestStatusCiNotes.test.ts`: the status-line text during and after a suspension, the length limit, the pacing, the runner-problem text, and reading the facts from SQLite and Redis. Limit on one acceptance test: the "no suspension" check is indirect. In this codebase a follow-up, and the suspension its implementation records, only starts from that posted comment, so the test shows that no comment is posted and nothing is claimed. It doesn't run the worker path itself. I also documented the behaviour in `docs/docs/features/pr-followup.md` and added a CHANGELOG entry under Fixed.
|
/ultrafix goal=8 max=3 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 3) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR adds useful suspension visibility and separates infrastructure failures from code follow-ups, but needs significant corrections before merge. Deferred reruns can be stranded or overwritten, and classification can suppress genuine code failures. ✅ Suspension lifecycle filtering — Status facts require an active suspension matching the current head, so restoring and obsolete suspensions do not display the warning. ✅ Preserves subsequent code reporting — Infrastructure handling returns before claiming the normal follow-up deduplication key, allowing a genuine code failure on a later attempt to be reported. ✅ Focused rendering coverage — Added tests cover suspension text, the block length limit, and cancellation-count edit pacing. The supplied current-head status has no failures, with five checks pending. This review uses static analysis of the supplied code; no commands or tests were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Deferred reruns can remain stranded
F2: 🔴 One workflow overwrites another’s pending rerun
F3: 🔴 Test steps are classified as setup steps
F4: 🔴 Unreadable annotations can suppress code failures
SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe status integration and focused tests are useful, but the new rerun lifecycle can lose work and the classifier can suppress legitimate code failures. These blockers remain regardless of the pending CI results. Score: 5/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit dff9d42
Summary of ChangesI fixed all four findings (F1–F4), and each one has regression tests. The new suite passes (23 of 23), and the neighbouring suites pass too: check-run handler 146, CI failure follow-up 31, recovery 3, epic merge progress 61, task-intent withdrawal 169, plus two smaller ones. Core and root typecheck and lint are clean. F1 – a deferred re-run is no longer left waiting forever
F2 – two workflows no longer overwrite each other F3 – test steps are no longer treated as setup steps
F4 – unreadable annotations no longer hide a code failure Tests and docs
One behaviour change: a check-run failure with no check-run ID can no longer be classified as a runner problem, because there are no annotations to rule out a code failure. It gets the normal follow-up. There's no visual preview because nothing here changes what a user sees. Review digestRisk-tiered paths
Diff size: 9 files changed, +491/−44 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…ion tests. The new suite passes (23 of 23), and the neighbouring suites pass too: check-run handler 146, CI failure follow-up 31, recovery 3, epic merge progress 61, task-intent withdrawal 169, plus two smaller ones. Core and root typecheck and lint are clean. I fixed all four findings (F1–F4), and each one has regression tests. The new suite passes (23 of 23), and the neighbouring suites pass too: check-run handler 146, CI failure follow-up 31, recovery 3, epic merge progress 61, task-intent withdrawal 169, plus two smaller ones. Core and root typecheck and lint are clean. **F1 – a deferred re-run is no longer left waiting forever** - **A sweep every minute.** The daemon now checks waiting re-runs once a minute (`src/daemon/ciInfrastructureRerunSweep.ts`, which calls `retryPendingCiInfrastructureReruns`). When a run has finished, it sends the re-run. This covers a workflow whose last check completed before GitHub marked the run finished. - **A 24-hour limit.** If a run still hasn't finished after 24 hours, ProPR stops waiting. The status block then says the job failed on what looks like a runner problem and needs a manual re-run. - **Closed PR or new head.** If the PR is closed or has a new head, the waiting re-run is dropped without being sent. - **Ordinary recovery now sends it.** When the same run attempt fails again, recovery used to return `already_requested`. It now sends the waiting re-run if the run has finished. - **No double re-runs.** Three paths can send a re-run: the check-completion hook, recovery, and the sweep. A per-run lock stops them from sending the same one twice. - **Order of steps.** Each path checks the waiting entry is still unchanged, sends the re-run, removes the entry, and only then updates the notice. So if the notice write fails, the re-run is not sent again. **F2 – two workflows no longer overwrite each other** Waiting re-runs are now stored separately for each workflow run, in the new `ciInfrastructureRerunPending.ts`. The hook re-runs every waiting run for the PR head. The PR notice is still a single "latest event" summary, as the finding allows. **F3 – test steps are no longer treated as setup steps** - Before checking for setup, `isSetupStep` now rejects any step that runs tests, builds, lint or type checks. So `Run Playwright tests`, `Run browser tests` and `Install dependencies and run tests` stay code failures. - Setup recognition is narrower: a step counts only if it names a preparation action (install, set up, checkout, cache, `npm ci`, image pull, and similar). A bare `playwright`, `chromium`, `browser`, `apt` or `pip` no longer counts. - Real install steps still count, including `Install Playwright browsers` and the #3703 install script. **F4 – unreadable annotations no longer hide a code failure** If the annotations can't be read, the runner-problem path backs off and the ordinary follow-up is posted. That's enforced in `handleInfrastructureFailure`, and the classifier also refuses when annotations are missing. Reading zero annotations successfully is still accepted. **Tests and docs** - The regression tests are in `test/ciFailureInfrastructure.test.ts`. They cover: - a single workflow finishing with no further check event, sent by the sweep. - a recovery-path resume. - the 24-hour give-up. - a dropped re-run after a new head. - two deferred runs, each re-run exactly once. - a run whose lock is already held. - network errors in Playwright, browser and mixed install-and-test steps. - an annotation read that fails. - With the old classifier and annotation handling put back, the F3 and F4 tests failed as expected. I didn't run the same revert check for F1 and F2. - I updated `docs/docs/features/pr-followup.md` to describe the new deferral behaviour and the narrower setup-step rule. **One behaviour change:** a check-run failure with no check-run ID can no longer be classified as a runner problem, because there are no annotations to rule out a code failure. It gets the normal follow-up. There's no visual preview because nothing here changes what a user sees. PR: #3729 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR adds suspension visibility and routes infrastructure failures into a bounded rerun path. It needs changes before merge: persistence failures can strand reruns, send them twice, or start the code follow-up this feature intends to avoid. ✅ Conservative classification — Source-file annotations, recognizable code failures, and mixed install/test steps prevent network failures from being classified as infrastructure-only. ✅ Independent deferred runs — Pending reruns are recorded per workflow run, with coverage for multiple workflows and recovery after the final check event. ✅ Status integration — Suspension notes use existing status computation and edit pacing, with tests covering head matching and the rendering budget. This review is a static trace of the supplied code; no commands were run. Current checks report 23 passed, none failed, and one pending. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F5: 🔴 Reconcile attempts before retrying pending reruns
F6: 🔴 Persist recoverable intent before claiming completion
F7: 🔴 Preserve infrastructure classification on bookkeeping failure
SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe classification and status work are well covered, but the new rerun lifecycle has three merge-blocking recovery and failure-propagation defects. Passing checks do not exercise these interrupted-operation paths. Score: 5/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 6503abe
Summary of ChangesI fixed F5, F6 and F7 in F5 – a re-run GitHub already accepted is never sent again. Before sending a pending re-run, ProPR now compares the run's current attempt number on GitHub with the one it recorded. If the run has already moved past it, the earlier re-run was accepted: ProPR clears the pending entry and does not send it again. This check sits in F6 – an interrupted claim stays recoverable. The seven-day claim and the pending entry are now written together in one atomic step. So every claim comes with a recorded "re-run owed" entry from the start, before GitHub is asked anything. On a repeat of the same attempt, an existing entry means the work isn't finished and it gets resumed. No entry means the re-run was already sent, refused or given up on. F7 – the runner-problem verdict survives bookkeeping failures. Once a failure is classified as a runner problem, any failure to record the re-run or write the status notice is logged and the result is still treated as a runner problem. No code follow-up comment is posted. Unreadable or inconclusive evidence still falls back to the normal follow-up, as before. New tests (
I also added a few sentences to Limits and other findings (not changed):
No visual preview, because nothing a user sees has changed. Review digestRisk-tiered paths
Diff size: 4 files changed, +258/−59 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
Scope change for this PR, from the author of issue #3725. It replaces the pending fixes for review findings F1, F2, F5, F6 and F7. All five findings are about the automatic re-run of failed jobs after an infrastructure-only failure: deferred reruns, pending-rerun records per workflow run, attempt reconciliation and recovery after a restart. That machinery is more than this issue needs, and each review finds another recovery case in it. The issue allowed the simpler alternative ("if re-running is not possible, the PR says the failure looks like a runner problem and names the job"). Use that alternative always. Please change the PR as follows:
Tests: remove the rerun tests; keep the classifier tests; add or keep tests that an infrastructure-only failure enqueues no follow-up, records no suspension, makes no re-run request, and renders the status text with the job name. Update the issue's acceptance wording in the PR description to say the re-run is manual. |
…and `ciInfrastructureRerunPending.ts`, with regression tests. The suite is 28 of 28 passing. With the old source restored, all five new tests fail. Core and root typecheck and core lint are clean, and the neighbouring suites pass: check-run handler 146, CI failure follow-up 31, CI failure recovery 3, comment grouping 8, ultrafix CI failure recovery 61, status CI notes 8. I fixed F5, F6 and F7 in `ciFailureInfrastructureRerun.ts` and `ciInfrastructureRerunPending.ts`, with regression tests. The suite is 28 of 28 passing. With the old source restored, all five new tests fail. Core and root typecheck and core lint are clean, and the neighbouring suites pass: check-run handler 146, CI failure follow-up 31, CI failure recovery 3, comment grouping 8, ultrafix CI failure recovery 61, status CI notes 8. **F5 – a re-run GitHub already accepted is never sent again.** Before sending a pending re-run, ProPR now compares the run's current attempt number on GitHub with the one it recorded. If the run has already moved past it, the earlier re-run was accepted: ProPR clears the pending entry and does not send it again. This check sits in `resumePendingRerun`, which every path uses: the check-run hook, ordinary recovery, the daemon sweep and the 24-hour give-up. Clearing a stale entry this way doesn't overwrite a newer status notice from a later attempt of the same run. **F6 – an interrupted claim stays recoverable.** The seven-day claim and the pending entry are now written together in one atomic step. So every claim comes with a recorded "re-run owed" entry from the start, before GitHub is asked anything. On a repeat of the same attempt, an existing entry means the work isn't finished and it gets resumed. No entry means the re-run was already sent, refused or given up on. **F7 – the runner-problem verdict survives bookkeeping failures.** Once a failure is classified as a runner problem, any failure to record the re-run or write the status notice is logged and the result is still treated as a runner problem. No code follow-up comment is posted. Unreadable or inconclusive evidence still falls back to the normal follow-up, as before. **New tests** (`test/ciFailureInfrastructure.test.ts`): - GitHub accepts the re-run but clearing the pending entry fails. Later sweeps, the hook and recovery don't send it again, with GitHub reporting attempt 2. - The same accepted-then-failed-clear case, recovered through ordinary failure recovery. - A stale entry cleared after attempt 2 failed keeps attempt 2's "re-run it" notice. - A process stopping right after the claim is picked up by both recovery and the sweep. - A failed notice write, or a failed claim write, after the verdict posts no follow-up comment. I also added a few sentences to `docs/docs/features/pr-followup.md` describing this. **Limits and other findings (not changed):** - The F5 check relies on GitHub showing the new attempt number on the run once it has accepted a re-run. If GitHub accepts the request but hasn't updated the run yet, a retry in that gap can't be told apart. That race is between GitHub's own calls and can't be closed from ProPR's side. - Separate, older issue: if the workflow-run read fails, the pending entry is released with a "re-run it" notice instead of being kept for the next sweep. I left it alone because it's outside these findings. - `recordPendingRerun` is no longer called anywhere but is still exported. No visual preview, because nothing a user sees has changed. PR: #3729 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
|
✅ Applied the requested follow-up changes in commit 72049cb Summary of ChangesI removed the automatic re-run from the PR. An infrastructure-only CI failure now starts no code follow-up and records no CI suspension, and the PR status block tells a person to re-run the failed jobs. All affected suites pass, and core and root typecheck and lint are clean. I couldn't update the PR description myself, so the replacement wording is at the end for you to paste in. What was removed (item 1)
What stayed (items 2 and 5)
How the failure is shown on the PR (items 3 and 4)
Tests
I also updated Replacement wording for the PR description, section "2. Runner-only failures don't start a code follow-up":
The "Deferral" paragraph and the re-run lines of the Tests section should be deleted. Review digestRisk-tiered paths
Diff size: 18 files changed, +425/−1,006 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…re-only CI failure now starts no code follow-up and records no CI suspension, and the PR status block tells a person to re-run the failed jobs. All affected suites pass, and core and root typecheck and lint are clean. I couldn't update the PR description myself, so the replacement wording is at the end for you to paste in. I removed the automatic re-run from the PR. An infrastructure-only CI failure now starts no code follow-up and records no CI suspension, and the PR status block tells a person to re-run the failed jobs. All affected suites pass, and core and root typecheck and lint are clean. I couldn't update the PR description myself, so the replacement wording is at the end for you to paste in. **What was removed (item 1)** - I deleted `ciFailureInfrastructureRerun.ts`, `ciInfrastructureRerunPending.ts`, `ciInfrastructureNotice.ts` and the daemon sweep (`src/daemon/ciInfrastructureRerunSweep.ts`). - I took out the resume hook in `checkRunHandler.ts`, the sweep wiring in `src/daemon.ts` and the export in `index.ts`. Those three files are back to exactly what they are on `main`. - Nothing in the code calls GitHub's re-run endpoints any more, and the follow-up path no longer needs any Redis operations beyond what it used before. **What stayed (items 2 and 5)** - The classifier in `ciFailureInfrastructure.ts` is unchanged, including the F3 fix (test, build and lint steps are never setup steps) and the F4 fix (unreadable annotations fall back to the normal follow-up). - The suspension text in the status block and the cancelled-run count are unchanged. **How the failure is shown on the PR (items 3 and 4)** - A new module, `ciFailureInfrastructureCheck.ts`, classifies one failed check. Both the follow-up path and the status block use it. - For an infrastructure-only failure, `postCiFailureFollowup` posts no comment, claims nothing and asks for a status update. If that update fails, it is only logged and the verdict stays infrastructure-only. - The status text is worked out each time the status block is updated, from the failed checks on the current head. Nothing is stored. It reads: `Validate Changes failed on what looks like a runner or network problem, re-run the failed jobs` (two names at most, then `+N`). It disappears once those checks stop failing on the head. - **Cost of rendering:** each status update now makes a few extra GitHub reads: - the annotations of each failed check. - the job's steps, but only when the text already looks like an infrastructure error. - **Limits on rendering:** it only looks at failed GitHub Actions checks. If more than 5 checks fail, it skips the check and shows no runner-problem text. Any read failure also means no text. **Tests** - `test/ciFailureInfrastructure.test.ts` (16 tests): the classifier, F3 and F4 cases are kept and all re-run tests are gone. New tests check that an infrastructure-only failure posts no comment, claims and stores nothing, makes no re-run request, and asks for a status update. They also cover a failing status update and an unreadable job. - `pullRequestStatusCiNotes.test.ts` (9): the text with the job name, plus which failed checks get it and which don't. - `pullRequestStatusSync.test.ts` (82): one new end-to-end test. A sync writes the job name into the PR body and makes no re-run request; when the check passes, the text is gone. - **Checks that the tests catch a regression:** - With the status-read wiring disconnected, the new sync test fails. - With the classification call disabled, 2 of the follow-up tests fail. - **Other suites, all passing:** - check-run handler 146 - CI failure follow-up 31 - recovery 3 - Ultrafix CI recovery 61 - comment grouping 8 - status 36, text 12, epic 24, epic sync 46, reconcile runs 8 I also updated `docs/docs/features/pr-followup.md` and the CHANGELOG entry to say the re-run is manual. There's no visual preview, because the change is a line of text in the PR body. **Replacement wording for the PR description**, section "2. Runner-only failures don't start a code follow-up": > **Handling:** an infrastructure-only failure posts no comment, so no follow-up starts and no suspension is recorded. Nothing is claimed, so a real code failure on a later re-run still gets its follow-up. ProPR does not re-run the jobs: re-running is manual. While the check fails on the current head, the status block says `<job> failed on what looks like a runner or network problem, re-run the failed jobs`. The text is worked out from the head's failed checks each time the status block is updated, so nothing is stored, and it disappears once those checks no longer fail. If that status update fails, it is only logged and the failure stays infrastructure-only. The "Deferral" paragraph and the re-run lines of the Tests section should be deleted. PR: #3729 Comment by: @integry (ID: 7000077650) Model: Claude Opus 5.5
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR follows the authorized move to manual reruns, but needs changes before merge: two display paths can suppress the required runner-problem guidance. ✅ Manual reruns only — Infrastructure handling returns before claiming or posting a follow-up and makes no rerun API request. ✅ Conservative evidence handling — Unreadable annotations retain normal follow-up behavior, and mixed install/test steps are rejected as setup steps. ✅ Head-specific suspension notes — Suspension facts require an active record matching the current head. This review is a static trace of the supplied code; no commands were run. Current checks show 20 passed, 3 pending, and no failures. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F8: 🔴 Six failed jobs erase runner guidance
F9: 🔴 Epic rendering omits both CI notes
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Refresh the PR summaryThe supplied PR description still describes automatic reruns, deferred execution, and rerun bookkeeping. Update it to describe manual reruns and the current tests, as requested in the authorized follow-up. This is a documentation follow-up rather than another runtime blocker. ScoreThe simplified handling and focused tests are sound foundations, but required guidance disappears for larger failure sets and epic PRs. These localized gaps need correction; the remaining checks are pending, not failing. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 912edbb
Summary of ChangesI fixed F8 and F9. The CI-notes suite passes 12 of 12 and the other eight status suites pass 240 of 240. Core and root typecheck and lint on the changed folder are clean. With the old source put back, the three new tests fail, so they do catch both defects. F8: six or more failed jobs lost the runner note
F9: epics dropped both CI notes
I looked for the same gap elsewhere and found none. An epic with no issues left to count (total 0) already used the normal path, which handles both notes. The text for sub-PRs inside an epic doesn't use these notes. The docs and CHANGELOG never mentioned the five-job limit or epics, so they needed no change. I made no preview because the change is only text in the PR status line. Review digestRisk-tiered paths
Diff size: 4 files changed, +88/−13 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…he other eight status suites pass 240 of 240. Core and root typecheck and lint on the changed folder are clean. With the old source put back, the three new tests fail, so they do catch both defects. I fixed F8 and F9. The CI-notes suite passes 12 of 12 and the other eight status suites pass 240 of 240. Core and root typecheck and lint on the changed folder are clean. With the old source put back, the three new tests fail, so they do catch both defects. **F8: six or more failed jobs lost the runner note** - `loadCiRunnerProblemFact` in `pullRequestStatusCiNotes.ts` used to give up when more than five jobs failed. It now classifies every failed GitHub Actions job, reading at most four at a time. - The old test that expected no note above five jobs is replaced by a six-job case. All six jobs fail during `npm ci` with a registry 503, and the test checks that: - all six jobs are named. - no more than four are read at once. - only read requests are made. - the line shows "shard-1, shard-2 +4 failed on what looks like a runner or network problem, re-run the failed jobs". - Every status read now reads annotations for every failed job, at most four at a time. A head with dozens of failed jobs means proportionally more GitHub reads each time the status is refreshed. **F9: epics dropped both CI notes** - **Finished epics** (every issue merged): the suspension and runner-problem notes were already attached but never shown. They now appear after the reason or activity and before the check counts, as on a normal PR. - **Unfinished epics:** the notes were never attached. `computeEpicStatus` now attaches the epic branch's own notes in every case, and the line shows them after what the sub-PRs and issues are doing. - New tests cover a finished and an unfinished epic, each with a suspension and with a runner problem. They also check that an unfinished epic's line is unchanged when it has neither. I looked for the same gap elsewhere and found none. An epic with no issues left to count (total 0) already used the normal path, which handles both notes. The text for sub-PRs inside an epic doesn't use these notes. The docs and CHANGELOG never mentioned the five-job limit or epics, so they needed no change. I made no preview because the change is only text in the PR status line. PR: #3729 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
|
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements the requested manual-rerun approach and suspension status notes, but needs a localized classifier correction before merge. ✅ No automatic reruns — Infrastructure handling returns before claiming or posting a follow-up and only requests a status refresh. ✅ Display-only state — Runner-problem notes are derived from current-head checks, without new persistence or recovery machinery. ✅ Failure isolation — Unreadable annotations retain the ordinary follow-up path; status-update failures cannot reverse an infrastructure verdict. The supplied current-head checks show 24 passed and 20 skipped, with no failures. This review is a static analysis of the supplied code; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F10: 🔴 Mixed execution steps still suppress follow-ups
SuggestionsThese are optional follow-ups and are not sent to S2: 🟢 Refresh the PR descriptionThe supplied PR description still describes automatic reruns, deferred recovery, and Redis-backed runner notices. Update it to describe manual reruns and current-head-derived display state, as requested by the scope change. This is review-documentation cleanup rather than an additional code blocker. ScoreThe implementation follows the simplified scope and has passing checks, but its setup predicate still suppresses follow-ups for mixed application commands. That classifier gap needs correction before merge. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
Please fix review finding F10 with a small, bounded change in
Also refresh the PR description so it matches the current scope (suggestion S2): the automatic re-run was removed and the re-run is manual. |
|
✅ Applied the requested follow-up changes in commit d2cbdff Summary of ChangesThe F10 fix is in place and tested. My attempt to update the PR description was refused, so the new wording is below for you to paste in. F10 fix (
Tests (
Nothing else in the PR changed. PR description (S2): Summary: 1. The status block says when CI is suspended
2. Runner-only failures don't start a code follow-up
Tests
Limit on one acceptance test: the "no suspension" check is indirect. In this codebase a follow-up, and the suspension its implementation records, only starts from that posted comment, so the test shows that no comment is posted and nothing is claimed. It doesn't run the worker path itself. I also documented the behaviour in Review digestRisk-tiered paths
Diff size: 14 files changed, +1186/−22 lines Review digestRisk-tiered paths
Diff size: 2 files changed, +65/−3 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…e PR description was refused, so the new wording is below for you to paste in. The F10 fix is in place and tested. My attempt to update the PR description was refused, so the new wording is below for you to paste in. **F10 fix (`packages/core/src/webhook/ciFailureInfrastructure.ts`)** - `isSetupStep` now accepts a step only if it names a single setup operation. - A step is compound, and so not setup, if it contains: - `and`, `then` or `plus`. - `run`, `runs` or `running` with words both before and after it. - `&&`, `;` or `|` anywhere. - `+` or `,` between words. - a `/` with a space beside it, or between two plain words. - The existing `EXECUTION_STEP_PATTERN` rule still applies. - A leading `Run ` is not a joiner, because GitHub adds it to unnamed command steps. That keeps the existing cases "Run npm ci" and "Run ./scripts/ci-install-chromium.sh" (the #3703 case) as setup. A `/` inside a path also doesn't count. - GitHub's generated action steps (`Run <owner>/<action>@<ref>`, or `Post Run …`) are recognised by that shape. They are setup only when the action name is checkout, `setup-*`, cache, login or download-artifact. Any other action, such as "Run actions/github-script@v7", is not setup. **Tests (`test/ciFailureInfrastructure.test.ts`)** - I added every case you listed, the end-to-end classifier case ("Install dependencies and run migrations" with `ECONNRESET` is a code failure), and also "Run actions/cache@v4", "Run docker/login-action@v3" and "Post Run actions/checkout@v4". - The suite passes 20 of 20, including all the earlier setup and non-setup cases. - With the old source put back, 3 of the 4 new tests fail. The test for "Run ./scripts/deploy.sh" and "Run actions/github-script@v7" passed on the old code too, since the old rule already rejected both. - Core and root typecheck, and core lint on the changed file, are clean. Nothing else in the PR changed. **PR description (S2):** `gh pr edit` was refused with "Resource not accessible by integration". Here is the replacement. Keep the status block and header; replace everything from **Summary:** up to the "View task" line. --- **Summary:** This PR does both parts of #3725. The status block says when CI is suspended, and a CI failure that looks like a runner or network problem starts no code follow-up. ProPR never re-runs failed jobs itself: the automatic re-run in the first version was removed, and re-running is manual. The status block tells a person to do it. There's no visual preview because the change is a line of text in the PR body. **1. The status block says when CI is suspended** - While a follow-up holds an active suspension on the current head, the status block in the PR body shows: `CI suspended until the follow-up finishes, re-running checks before then has no effect`. - Once the suspension has cancelled runs, it also shows `runs cancelled by ProPR: N`. A change to that count alone is paced like other check-count changes, so a burst of cancellations doesn't edit the body once per run. The suspension starting or ending is written straight away. - The text goes away when the suspension ends. It is only shown while the suspension is `active`; once ProPR starts restoring runs, a re-run is no longer cancelled. - It uses the existing status computation and rendering, so it follows the same update rules. Epics show it too, whether finished or not. The suspension text is placed ahead of the check counts, so it survives when the line is cut to fit the 512-character limit. - The facts come from the `pr_ci_suspensions` table (`pullRequestStatusCiNotes.ts`). If that record can't be read, the note is left out rather than failing the whole status read. - The worker's suspension store now asks for a status update when a suspension is reserved, changes state, or is deleted. How long a suspension lasts and which runs it cancels are unchanged. **2. Runner-only failures don't start a code follow-up** - **Classifier:** `classifyCiInfrastructureFailure` is a pure function in `ciFailureInfrastructure.ts`. Any sign of a test, type or lint failure, or an annotation pointing at a source file, makes it a code failure. Otherwise it counts as infrastructure only if: - the runner received a shutdown signal or lost communication, or - every failed step is a setup/install step and the evidence shows a network, mirror or registry error. - **Setup steps:** a step is a setup step only if it names one preparation operation (install, checkout, cache, set up, …). - A step that also runs tests, builds, lint or type checks is not one. - A step that joins two operations is not one either: "Install dependencies and run migrations", "Setup && seed database", "Install, then start the server", "Install Chromium / launch app". - GitHub's generated action step names count only when the action is a setup action, for example "Run actions/checkout@v4", "Run actions/setup-node@v4" or "Run docker/login-action@v3". "Run actions/github-script@v7" doesn't count. - **Doubt:** if the steps or annotations can't be read or anything is unclear, it stays a code failure and gets its comment as today. - **Handling:** an infrastructure-only failure posts no comment, so no follow-up starts and no suspension is recorded. Nothing is claimed, so a real code failure on a later re-run still gets its follow-up. ProPR does not re-run the jobs: re-running is manual. - **On the PR:** while the check fails on the current head, the status block says `<job> failed on what looks like a runner or network problem, re-run the failed jobs`. It names two jobs at most, then `+N`. - The text is worked out from the head's failed checks each time the status block is updated, so nothing is stored. - It disappears once those checks no longer fail. - If that status update fails, it is only logged and the failure stays infrastructure-only. - **Evidence read:** `ciFailureInfrastructureCheck.ts` reads the annotations of each failed GitHub Actions job, at most four at a time. It reads the job's step names only when the text already looks like an infrastructure error. Any read failure means no runner-problem text. A head with many failed jobs means proportionally more GitHub reads on each status update. **Tests** - `test/ciFailureInfrastructure.test.ts`: the classifier cases from the issue (the #3703 apt mirror stall, runner shutdown and lost communication, registry 5xx during install as infrastructure; a failing test, a type error and a lint error as not), plus the doubt cases, test/build/lint steps, and compound step names. It also checks that an infrastructure failure posts no comment, claims and stores nothing, makes no re-run request, and asks for a status update. - `packages/core/test/pullRequestStatusCiNotes.test.ts`: the status-line text during and after a suspension, the length limit, the pacing, the runner-problem text with six failed jobs, epics, and reading the facts from SQLite. - `packages/core/test/pullRequestStatusSync.test.ts`: a sync writes the job name into the PR body and makes no re-run request; when the check passes, the text is gone. **Limit on one acceptance test:** the "no suspension" check is indirect. In this codebase a follow-up, and the suspension its implementation records, only starts from that posted comment, so the test shows that no comment is posted and nothing is claimed. It doesn't run the worker path itself. I also documented the behaviour in `docs/docs/features/pr-followup.md` and added a CHANGELOG entry under Fixed. ### Review digest **Risk-tiered paths** - **High risk**: none - **Normal risk** (9 files) - `packages/core/src/services/pullRequestStatus/pullRequestStatus.ts` (+53/−0) - `packages/core/src/services/pullRequestStatus/pullRequestStatusBlock.ts` (+36/−2) - `packages/core/src/services/pullRequestStatus/pullRequestStatusCiNotes.ts` (added, +143/−0) - `packages/core/src/services/pullRequestStatus/pullRequestStatusEditPacing.ts` (+2/−2) - `packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts` (+18/−10) - `packages/core/src/webhook/ciFailureFollowup.ts` (+18/−8) - `packages/core/src/webhook/ciFailureInfrastructure.ts` (added, +174/−0) - `packages/core/src/webhook/ciFailureInfrastructureCheck.ts` (added, +130/−0) - `src/jobs/followupCiSuspensionStore.ts` (+10/−0) - **Low risk** (5 files) - `CHANGELOG.md` (+12/−0) - `docs/docs/features/pr-followup.md` (+10/−0) - `packages/core/test/pullRequestStatusCiNotes.test.ts` (added, +240/−0) - `packages/core/test/pullRequestStatusSync.test.ts` (+35/−0) - `test/ciFailureInfrastructure.test.ts` (added, +305/−0) **Diff size:** 14 files changed, +1186/−22 lines PR: #3729 Comment by: @integry (ID: 7001385179) Model: Claude Opus 5.5
AI Implementation Summary
Closes #3725
Branch:
3725/claude-opus-5-5-follow-up-ci-suspension-s-20261119-0338-xhsCommits: ✅ Changes committed (43bf797)
AI Processing Completed
Execution Details:
Summary:
I've implemented both parts of #3725. All the affected suites pass (about 650 tests) and core and root typecheck and lint are clean. One limit: GitHub only re-runs jobs once the whole workflow run has finished, so the "re-run once" path depends on a deferral explained below. I didn't make a visual preview because the change is a line of text in the PR body.
1. The status block says when CI is suspended
CI suspended until the follow-up finishes, re-running checks before then has no effect.runs cancelled by ProPR: N. A change to that count alone is paced like other check-count changes, so a burst of cancellations doesn't edit the body once per run. The suspension starting or ending is written straight away.active; once ProPR starts restoring runs, a re-run is no longer cancelled.pr_ci_suspensionstable (pullRequestStatusCiNotes.ts). If that record can't be read, the note is left out rather than failing the whole status read.2. Runner-only failures don't start a code follow-up
Classifier:
classifyCiInfrastructureFailureis a pure function inciFailureInfrastructure.ts, next to the CI-failure evidence code. Any sign of a test, type or lint failure, or an annotation pointing at a source file, makes it a code failure. Otherwise it counts as infrastructure only if:Doubt: if the steps can't be read or anything is unclear, it stays a code failure and gets its comment as today.
Handling (
ciFailureInfrastructureRerun.ts): it runs after the existing cancellation check, before anything is claimed. It posts no comment, so no follow-up and no suspension start. It re-runs the failed jobs once per workflow run and records what it did so the status block can name the job:runner problem in <job>, re-run requested…, re-run when its workflow finishes<job> failed on what looks like a runner problem, re-run it(when GitHub refuses the re-run, or the one re-run was already used)Because nothing is claimed, a real code failure on the re-run still gets its follow-up.
Deferral: if the workflow run is still going, the re-run waits and is sent when the next check of that commit completes (a new hook in
checkRunHandler.ts). If that last check finishes before GitHub marks the run complete, the re-run is never sent and the PR stays on "re-run when its workflow finishes", so a person would have to re-run it. A periodic retry would close this gap; I didn't add one.Evidence read: besides the evidence the comment already uses, this reads one extra thing: the failed job's step names, and only when the text already looks like an infrastructure error.
Tests
test/ciFailureInfrastructure.test.ts: the classifier cases from the issue (the CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages #3703 apt mirror stall, runner shutdown and lost communication, registry 5xx during install as infrastructure; a failing test, a type error and a lint error as not), plus the doubt cases. It also checks that an infrastructure failure posts no comment and claims nothing, re-runs once, doesn't re-run twice, handles a refused re-run, and handles the deferred re-run. When I disabled the hook, 4 of these tests failed as they should.packages/core/test/pullRequestStatusCiNotes.test.ts: the status-line text during and after a suspension, the length limit, the pacing, the runner-problem text, and reading the facts from SQLite and Redis.Limit on one acceptance test: the "no suspension" check is indirect. In this codebase a follow-up, and the suspension its implementation records, only starts from that posted comment, so the test shows that no comment is posted and nothing is claimed. It doesn't run the worker path itself.
I also documented the behaviour in
docs/docs/features/pr-followup.mdand added a CHANGELOG entry under Fixed.Review digest
Risk-tiered paths
packages/core/src/services/pullRequestStatus/pullRequestStatus.ts(+41/−0)packages/core/src/services/pullRequestStatus/pullRequestStatusBlock.ts(+31/−1)packages/core/src/services/pullRequestStatus/pullRequestStatusCiNotes.ts(added, +66/−0)packages/core/src/services/pullRequestStatus/pullRequestStatusEditPacing.ts(+2/−2)packages/core/src/services/pullRequestStatus/pullRequestStatusFacts.ts(+6/−1)packages/core/src/webhook/checkRunHandler.ts(+6/−0)packages/core/src/webhook/ciFailureFollowup.ts(+37/−8)packages/core/src/webhook/ciFailureInfrastructure.ts(added, +127/−0)packages/core/src/webhook/ciFailureInfrastructureRerun.ts(added, +199/−0)packages/core/src/webhook/ciInfrastructureNotice.ts(added, +48/−0)src/jobs/followupCiSuspensionStore.ts(+10/−0)CHANGELOG.md(+10/−0)docs/docs/features/pr-followup.md(+8/−0)packages/core/test/pullRequestStatusCiNotes.test.ts(added, +132/−0)test/ciFailureInfrastructure.test.ts(added, +251/−0)Diff size: 15 files changed, +974/−12 lines
View task for the run's logs and conversation.
This PR was created automatically by ProPR after processing issue #3725.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!