Repository navigation
fix(review): resume requested reviews on a scheduled check scan - #654
Conversation
|
One live-transition gap: |
|
@all-hands-bot please address the event-to-cron managed-comment transition and the event-only retry wording described in my latest comment. Add focused regression coverage, keep the scope narrow, run relevant tests, and push. Do not merge. Live Canvas validation will follow. |
|
Addressed both points and pushed to 1. Event-to-cron managed-comment transition
That covers the live gap: a pending PR first gated by the event-only deployment holds the "remove and re-request" comment on 2. Event-only retry wording is now explicit Both event-path bodies now say the outstanding request must be removed and re-requested, since GitHub rejects a second request for a reviewer who is already requested:
Regression coverage
Docs
Verification
Scope is limited to the gate-comment upsert, the two event-path bodies, their docs, and the focused tests; the scheduled-scan selection, dedupe keys, and check ordering are untouched. The catalog Generated by OpenHands AI on behalf of the user. |
|
@all-hands-bot Please rebase this stacked PR onto the current head of its base PR #651 before it is reviewed or deployed. The #654 branch still carries |
d242ee4 to
014659e
Compare
|
Rebased and pushed to Rebase
The branch no longer carries the old ordering. run_id = int(run.get("id") or 0)
return (run_id, run.get("started_at") or "")The Scheduled-retry change preserved
Verification
Generated by OpenHands AI on behalf of the user. |
A scheduled scan resumed every outstanding all-hands-bot request it found and started one conversation for each, so a first scan over the OSS backlog could start an agent for hundreds of eligible pull requests at once and exhaust the deployment. The scan now starts at most `max_new_per_run` new review conversations, defaulting to 2, counted across every configured repository rather than reset per repository. Delivery reuses the existing machinery: eligible candidates are collected with the request event and head SHA #654 already keys deliveries on, ordered by the oldest outstanding request and then by repository and pull-request number, and started through the same `dispatcher.deliver`. The bound counts conversations a scan starts, so a deduplicated or already-running delivery reuses its runtime and consumes no slot, and a candidate whose exact-head checks are pending or failing posts its gate disposition and consumes none either. Reaching the bound still evaluates the remaining candidates and their gate comments, and a dispatch that raises is reported without aborting the scan. The explicit reviewer-request event path and the trigger-label scan are unchanged. Wires the bound through the worker's rendered config with the `max_new_per_run` key the other automations already use, documents it in SKILL.md and README.md, bumps the catalog entry and bundle 1.6.0 -> 1.7.0, and regenerates the catalogs. Part of #656. Stacked on #654. Co-authored-by: openhands <openhands@all-hands.dev> (cherry picked from commit cb1b625)
|
@all-hands-bot #654 now conflicts with its base #651 after the exact-head workflow-run gate was fixed. Please restack this PR onto the current #651 head (6034e07), resolve only the resulting conflicts, regenerate generated artifacts if needed, and run CI. Keep the scheduled retry behavior focused. #659 is stacked on this branch, so preserve a clean history for its subsequent restack. Do not merge. |
014659e to
fbfece9
Compare
|
Restacked onto the current #651 head Restack
Conflicts resolved (only the resulting ones)
The branch no longer carries the old ordering. Verification
CI
#659 still targets this branch, so its own restack onto the new tip Generated by OpenHands AI on behalf of the user. |
A scheduled scan resumed every outstanding all-hands-bot request it found and started one conversation for each, so a first scan over the OSS backlog could start an agent for hundreds of eligible pull requests at once and exhaust the deployment. The scan now starts at most `max_new_per_run` new review conversations, defaulting to 2, counted across every configured repository rather than reset per repository. Delivery reuses the existing machinery: eligible candidates are collected with the request event and head SHA #654 already keys deliveries on, ordered by the oldest outstanding request and then by repository and pull-request number, and started through the same `dispatcher.deliver`. The bound counts conversations a scan starts, so a deduplicated or already-running delivery reuses its runtime and consumes no slot, and a candidate whose exact-head checks are pending or failing posts its gate disposition and consumes none either. Reaching the bound still evaluates the remaining candidates and their gate comments, and a dispatch that raises is reported without aborting the scan. The explicit reviewer-request event path and the trigger-label scan are unchanged. Wires the bound through the worker's rendered config with the `max_new_per_run` key the other automations already use, documents it in SKILL.md and README.md, bumps the catalog entry and bundle 1.6.0 -> 1.7.0, and regenerates the catalogs. Part of #656. Stacked on #654. Co-authored-by: openhands <openhands@all-hands.dev> (cherry picked from commit cb1b625)
|
@all-hands-bot Please update this stacked PR onto the current head of its base branch |
fbfece9 to
d63d9d7
Compare
|
Restacked onto the current #651 head Restack
Conflicts resolved
One semantic conflict, reconciled #651 made an explicit
Preserved #651's required-check gate ( Validation
CI
#659 still targets this branch, so it needs its own restack onto the new tip; I left it untouched to keep its history clean. The live deployment was not changed. Generated by OpenHands AI on behalf of the user. |
A scheduled scan resumed every outstanding all-hands-bot request it found and started one conversation for each, so a first scan over the OSS backlog could start an agent for hundreds of eligible pull requests at once and exhaust the deployment. The scan now starts at most `max_new_per_run` new review conversations, defaulting to 2, counted across every configured repository rather than reset per repository. Delivery reuses the existing machinery: eligible candidates are collected with the request event and head SHA #654 already keys deliveries on, ordered by the oldest outstanding request and then by repository and pull-request number, and started through the same `dispatcher.deliver`. The bound counts conversations a scan starts, so a deduplicated or already-running delivery reuses its runtime and consumes no slot, and a candidate whose exact-head checks are pending or failing posts its gate disposition and consumes none either. Reaching the bound still evaluates the remaining candidates and their gate comments, and a dispatch that raises is reported without aborting the scan. The explicit reviewer-request event path and the trigger-label scan are unchanged. Wires the bound through the worker's rendered config with the `max_new_per_run` key the other automations already use, documents it in SKILL.md and README.md, bumps the catalog entry and bundle 1.6.0 -> 1.7.0, and regenerates the catalogs. Part of #656. Stacked on #654. Co-authored-by: openhands <openhands@all-hands.dev> (cherry picked from commit cb1b625)
* fix(review): bound scheduled PR review intake across repositories A scheduled scan resumed every outstanding all-hands-bot request it found and started one conversation for each, so a first scan over the OSS backlog could start an agent for hundreds of eligible pull requests at once and exhaust the deployment. The scan now starts at most `max_new_per_run` new review conversations, defaulting to 2, counted across every configured repository rather than reset per repository. Delivery reuses the existing machinery: eligible candidates are collected with the request event and head SHA #654 already keys deliveries on, ordered by the oldest outstanding request and then by repository and pull-request number, and started through the same `dispatcher.deliver`. The bound counts conversations a scan starts, so a deduplicated or already-running delivery reuses its runtime and consumes no slot, and a candidate whose exact-head checks are pending or failing posts its gate disposition and consumes none either. Reaching the bound still evaluates the remaining candidates and their gate comments, and a dispatch that raises is reported without aborting the scan. The explicit reviewer-request event path and the trigger-label scan are unchanged. Wires the bound through the worker's rendered config with the `max_new_per_run` key the other automations already use, documents it in SKILL.md and README.md, bumps the catalog entry and bundle 1.6.0 -> 1.7.0, and regenerates the catalogs. Part of #656. Stacked on #654. Co-authored-by: openhands <openhands@all-hands.dev> (cherry picked from commit cb1b625) * chore(review): add read-only bounded-intake canary for #656 Loads the shipped catalog bundle and drives the real scheduled scan and shared-intake drain against the live GitHub API. It starts no agent and posts no comment: the dispatcher and the gate comment upsert record what would have happened, so the canary is read-only. Development-only, kept in .pr/. Co-authored-by: openhands <openhands@all-hands.dev> (cherry picked from commit 9396c24) * chore(review): drop the one-off bounded-intake canary harness The 197-line read-only canary was evidence for #656, not part of the shipped automation, so it does not belong in this focused per-scan bound PR. The live result stays recorded in the PR description; the harness itself is preserved on factory/reviewer-continuous-canary. Co-authored-by: openhands <openhands@all-hands.dev> --------- Co-authored-by: all-hands-bot <all-hands-bot@users.noreply.github.com> Co-authored-by: openhands <openhands@all-hands.dev>
The OSS reviewer's only trigger was the GitHub review_requested event. #651 stopped dispatching an agent while the exact head's checks were pending or failing, and its waiting comment promised a scheduled retry that deployment did not have, so a request arriving during CI could be left unreviewed. Reuse the existing worker and one automation record. In scheduled mode the scan now also considers every open, non-draft PR that still holds an outstanding all-hands-bot review request, keyed by that request's own review_requested event so repeated scans reuse one conversation and one review. The explicit request event path is unchanged for event-only deployments. The waiting and blocked comments now name the retry the deployment actually has: a scheduled scan where a cron trigger exists, and another review request where only the event trigger does. Bumps the catalog entry and bundle to 1.6.0, documents the retry contract, and adds scheduled-scan, duplicate-scan, draft, and gate-message tests. Part of #653. Stacked on #651. Co-authored-by: openhands <openhands@all-hands.dev>
A pending PR first gated by an event-only deployment kept its 'request all-hands-bot again' comment after the automation was switched to a cron scan, because the gate returned early on a matching state:sha marker without comparing the body. The comment therefore named a retry that deployment no longer had. The gate now compares the full managed body for the same marker and rewrites the comment in place when it changed, so an event-only comment becomes the scheduled one once the scan exists and an identical body stays a no-op. No second comment is created. The event-only wording also makes the retry explicit: the outstanding request must be removed and re-requested, since GitHub will not accept a second request for a reviewer who is already requested. Adds a focused event-then-cron regression plus a stale-body rewrite test, and documents the in-place reword in SKILL.md and README.md. Part of #653. Co-authored-by: openhands <openhands@all-hands.dev>
* fix(review): bound scheduled PR review intake across repositories A scheduled scan resumed every outstanding all-hands-bot request it found and started one conversation for each, so a first scan over the OSS backlog could start an agent for hundreds of eligible pull requests at once and exhaust the deployment. The scan now starts at most `max_new_per_run` new review conversations, defaulting to 2, counted across every configured repository rather than reset per repository. Delivery reuses the existing machinery: eligible candidates are collected with the request event and head SHA #654 already keys deliveries on, ordered by the oldest outstanding request and then by repository and pull-request number, and started through the same `dispatcher.deliver`. The bound counts conversations a scan starts, so a deduplicated or already-running delivery reuses its runtime and consumes no slot, and a candidate whose exact-head checks are pending or failing posts its gate disposition and consumes none either. Reaching the bound still evaluates the remaining candidates and their gate comments, and a dispatch that raises is reported without aborting the scan. The explicit reviewer-request event path and the trigger-label scan are unchanged. Wires the bound through the worker's rendered config with the `max_new_per_run` key the other automations already use, documents it in SKILL.md and README.md, bumps the catalog entry and bundle 1.6.0 -> 1.7.0, and regenerates the catalogs. Part of #656. Stacked on #654. Co-authored-by: openhands <openhands@all-hands.dev> (cherry picked from commit cb1b625) * chore(review): add read-only bounded-intake canary for #656 Loads the shipped catalog bundle and drives the real scheduled scan and shared-intake drain against the live GitHub API. It starts no agent and posts no comment: the dispatcher and the gate comment upsert record what would have happened, so the canary is read-only. Development-only, kept in .pr/. Co-authored-by: openhands <openhands@all-hands.dev> (cherry picked from commit 9396c24) * chore(review): drop the one-off bounded-intake canary harness The 197-line read-only canary was evidence for #656, not part of the shipped automation, so it does not belong in this focused per-scan bound PR. The live result stays recorded in the PR description; the harness itself is preserved on factory/reviewer-continuous-canary. Co-authored-by: openhands <openhands@all-hands.dev> --------- Co-authored-by: all-hands-bot <all-hands-bot@users.noreply.github.com> Co-authored-by: openhands <openhands@all-hands.dev>
0f3a2df to
a8936f4
Compare
|
🚀 Released in v0.25.0. |
Why
The live OSS reviewer's only trigger was the GitHub
review_requestedevent. #651 stopped dispatching an agent while the exact head's checks were pending or failing, and its waiting comment promised a scheduled retry that this deployment did not have. A request that arrived during CI could therefore be left unreviewed unless a human removed and re-requestedall-hands-bot, which undermines automatic coverage of non-draft PRs.Summary
skills/github-pr-reviewerworker and one reviewer automation record: in scheduled mode the scan now also considers every open, non-draft PR that still holds an outstandingall-hands-botreview request, keyed by that request's ownreview_requestedevent so repeated scans reuse one conversation and one review. The explicit-request event path is unchanged and stays usable in event-only deployments. No second automation record, no new GitHub webhook types, nocheck_runparsing, and no deployment-specific code in this repo.all-hands-botrequest instead of promising a scan. Bump the catalog entry and bundle1.5.0→1.6.0, move the default catalog schedule to*/5 * * * *, and document the retry contract inSKILL.md/README.md.Details:
skills/github-pr-reviewer/scripts/worker.py_outstanding_review_request(pr)readsrequested_reviewersoff the list endpoint the scheduled scan already fetches. It is the live set, so an answered or withdrawn request simply drops out; open, non-draft PRs only.review_requestedevent, so repeated scans produce the samedelivery({event_id}:{sha}) and the existing keyed subject/delivery dedupe reuses one conversation and one review._gate_body()takes ascheduledflag and names the retry that actually exists.automations/catalog/github-pr-reviewer/manifest.json— version bump, description/example update, default schedule*/5 * * * *;automations/bundle-index.jsandskills/index.jsregenerated withnpm run build.Stacking
Base is
fix/644-reject-failed-checks, the head branch of #651, so GitHub records this as a stacked PR and it will retarget tomainwhen #651 merges. #651 must merge first. I will update the base when #651's check-ordering fix lands.Issue Number
Part of #653
How to Test
Required. Share the steps for the reviewer to be able to test your PR.
uv run pytest -q tests/test_github_reviewer_delivery.py tests/test_github_automation_foundation.py tests/test_automation_setup.py tests/test_catalogs.py tests/test_interface_manifest.py— expect 209 passed, 17 skipped.uv run pytest -q— expect 1010 passed, 23 skipped.uv run python scripts/sync_extensions.py --check— expect clean (the pre-existing, non-blockingissue-duplicate-checkercoverage warning is unrelated).npm run build— expect no drift inautomations/bundle-index.jsorskills/index.js.Live Canvas / live-API validation
The Canvas automation service on this host was not reachable for a create/dispatch mutation (
127.0.0.1:8001returned403for the available key, and${OPENHANDS_URL}resolves to anERR_NGORK_3200tunnel), so there is no live Canvas run to report. Instead I loaded the shipped bundle fromautomations/catalog/github-pr-reviewer/manifest.jsonand drove the realPullRequestReviewerscan against the live GitHub API with a read-only reviewer (no dispatch, no comment posted) across all four configured repos:This exercises the new scan against live data:
requested_reviewersis populated on real PRs, drafts are excluded, and each outstanding request resolves to a real exact head and gate disposition. The remaining acceptance evidence — a review requested while a check is pending and completed after it goes green on a live deployment — requires theoss-agent-canvasautomation to switch to the cron trigger, which is post-live-test deployment work and not part of this change.Video/Screenshots
Not applicable: this changes automation worker dispatch logic, not a GUI.
Notes
Generated by OpenHands AI on behalf of the user.