Skip to content

gardener: Answer review threads in place and explain failures (Gardener 0.1.11) - #198

Merged
scuffi merged 1 commit into
mainfrom
gardener-upgrade-0-1-11
Oct 6, 2026
Merged

scuffi merged 1 commit into
mainfrom
gardener-upgrade-0-1-11

Conversation

@scuffi

@scuffi scuffi commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Gardener now answers each review finding in its own thread on its pull requests, and resolves only the threads its commit fixed. Each run also writes a GitHub job summary that explains failures in plain words.

pr-review-fix changes

  • One reply per thread: each thread gets a reply where it was raised. A fixed finding links the round's commit; a declined one gives the evidence.
  • Resolves only what it fixed: threads its commit fixed are resolved. Declined or unanswered threads stay open for a maintainer.
  • A short marked summary: one summary comment per round still counts towards the three-round limit.
  • No repeat answers: a thread whose latest comment is already Gardener's answer is skipped until someone replies.
  • Scoped to the triggering PR: both new effects can only act on the pull request that triggered the run. The task's triggers and scope are otherwise unchanged.

Other changes from the upgrade to 0.1.11

  • Job summaries: each plan and apply job writes one. On failure it says what happened and what to do: a task limit to raise, a temporary provider or GitHub problem to retry, or a plan that went stale because the PR changed. A stale plan needs Re-run all jobs; re-running only apply replays the same plan.
  • Comments after a push: comments in the same run as a commit now accept the head that commit produced. Before, they passed only because GitHub reported the new head about two seconds late.
  • Queued reviews: a review queued behind a round now plans on the PR's current head instead of stopping on a stale checkout.
  • Node 24: the workflows use actions/checkout, upload-artifact and download-artifact on Node 24, so the Node 20 deprecation warnings are gone.
  • Version pins: the workflows move to 0.1.11's pinned release, and gardener:generate points at @scuffi/gardener@0.1.11.
  • Unchanged: mention-reply and triage keep the same bundle hashes.
  • Deployment: the runtime is already deployed. Regenerating with the published package changes nothing.

Tested on a demo repository first

  • Mixed review: a real finding was fixed with a test, answered in its thread with the commit link, and resolved. A false finding was answered with evidence and left open. The summary was posted.
  • Apply rerun: re-running apply changed nothing.
  • Two reviews in quick succession: the second run planned on the head the first round pushed.
  • Failure summaries: a run that hit its own tool-call limit showed the new summary.

As before, a maintainer approves CI on commits Gardener makes with the workflow token.


Devin Review

@changeset-bot

changeset-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown

鈿狅笍 No Changeset found

Latest commit: 4a2dbcf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

Devin Review

Comment on lines +90 to +92
Propose the steps in this order: the commit, the replies, the resolves, the summary. A plan may
have at most 40 steps, so answer at most 15 threads in one round, and say in the summary that more
remain for the next one. Nothing

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃煛 Excess review threads remain unanswered

With more than 15 threads, pr-review-fix leaves some unanswered and promises another round. Only a submitted review starts that round, so the remaining threads wait for another reviewer action.

Learn more

The task runs on a submitted pull request review, not on its own commit, thread replies, or summary comment. Its 15-thread limit leaves excess threads pending, but no further task run is scheduled just because work remains. The three-round limit also means a large initial review cannot all be answered through automatic rounds without new submitted reviews.

Example: A review contains 16 unresolved threads. The first run replies to 15 and posts a summary saying one remains for the next round. No next run starts, so the sixteenth thread receives no response.

Recommended fix: Arrange a bounded follow-up run for remaining threads, or remove the artificial per-round truncation while adjusting the effect budget safely. Keep the round limit and termination conditions consistent with the maximum review size.

Devin Review


Was this helpful? React with 馃憤 or 馃憥 to provide feedback.

Comment on lines +58 to +60
request's `reviewThreads(first: 100)` with each thread's `id`, `isResolved`, `path`, `line`,
its `comments(first: 50)` with `databaseId`, author login and body, and its latest comment as
`latest: comments(last: 1)`. Answer every unresolved thread, not only those from the review that

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃煛 Later review threads go unseen

When a pull request has over 100 review threads, reviewThreads(first: 100) excludes later threads. Unresolved findings beyond that page receive no answer.

Learn more

GitHub's reviewThreads is a paginated connection. Requesting only its first 100 nodes can hide unanswered threads even when most of those 100 have already been resolved. The task never tells the model to request pageInfo or use after to fetch later pages.

Example: A pull request has 100 resolved threads followed by one new unresolved thread. The query returns only the resolved ones, so the new finding is never inspected or answered.

Recommended fix: Request pageInfo { hasNextPage endCursor } and paginate reviewThreads until every page has been checked. Then apply any per-round answer limit to the unresolved threads collected across all pages.

Devin Review


Was this helpful? React with 馃憤 or 馃憥 to provide feedback.

Comment on lines +61 to +63
started this run: a round can absorb a review whose own run GitHub dropped. Skip a thread whose
latest comment is by `github-actions[bot]` and contains `<!-- gardener-operation:`: you already
answered it, and nobody has replied since. Also treat the body of the

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃煛 Thread replies do not trigger follow-up

When a reviewer replies to an answered thread without submitting a review, pr-review-fix never runs again. Its workflow trigger listens only for submitted reviews, leaving that reply unattended.

Learn more

The skip condition waits for a new comment after Gardener's last answer. But a reply to a review thread can arrive as a pull_request_review_comment.created event without a new pull_request_review.submitted event. The workflow trigger subscribes only to the latter, so the changed latest-comment state alone cannot run the task.

Example: Gardener declines a thread and replies. A maintainer adds a standalone review-thread reply showing a reproduction. No new review is submitted; the task never checks the reply.

Recommended fix: Add a suitably guarded review-comment trigger for follow-up replies and ensure Gardener's own replies cannot loop, or direct maintainers to submit a new review when they want a reply reconsidered.

Devin Review


Was this helpful? React with 馃憤 or 馃憥 to provide feedback.

@pkg-pr-new

pkg-pr-new Bot commented Oct 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@cloudflare/computer@198

commit: 4a2dbcf

@scuffi
scuffi merged commit 70c0c9b into main Oct 6, 2026
28 checks passed
@scuffi
scuffi deleted the gardener-upgrade-0-1-11 branch October 6, 2026 16:31
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