Skip to content

gardener: close issues merged work already resolved; upgrade to 0.1.22 - #288

Open
scuffi wants to merge 1 commit into
mainfrom
gardener/resolved-check
Open

scuffi wants to merge 1 commit into
mainfrom
gardener/resolved-check

Conversation

@scuffi

@scuffi scuffi commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Upgrades Gardener to 0.1.22 and adds resolved-check, a task that closes open issues merged work already resolved: fixed without a Fixes #N, or made obsolete by changing or removing what the issue is about.

resolved-check

  • Daily (weekdays 07:00 UTC): takes pull requests merged into the default branch in the last 96 hours and matches them to open issues they could have resolved. A match is a mention without a closing keyword, a cross-reference, or an issue title naming code the pull request changed.
  • Backdate (manual run with the prompt backdate #<from>-#<to>): checks open issues in that range, at most 15 per run, against everything merged since each was opened, and ends its summary with the next range to run. This works through the existing backlog.
  • Close or nothing. It closes only on evidence from the code: the change that touched the cause, and why the reported case can no longer happen at HEAD, or that what the issue describes no longer exists and which change removed it. It comments with that evidence (the pull request, path:line, why) and closes. A fixed issue closes as completed, an obsolete one as not planned. Anything unproven, partial or uncertain stays open and is listed in the run summary. There are no labels.
  • Comments count. Gardener's triage comment is treated as a lead to verify, matched by content because lines move. A maintainer saying the issue stays open, or anyone reporting it still happens after the change, keeps it open. For an untriaged issue, the task finds the code itself.
  • Never touched: issues with an open pull request referencing them, on the roadmap, wip, blocked or gardener-fix labels, tracking/RFC issues, issues opened after the pull request merged (triage covers those), and any issue this task has already commented on (<!-- gardener-resolved:… -->). A maintainer reopening one of its closes is final.
  • Limits: claude-opus-5-5, 1 hour, at most 10 closes and 20 operations per run, runs: 15/day so a backdate can proceed in batches. Effects are only issue.comment.create and issue.close.

Gardener 0.1.22

  • issue.close takes an optional reason (completed or not_planned), sent to GitHub as state_reason; without it, closes are unchanged. Gardener change: Close issues as completed or not planned scuffi/gardener#69. The shared runtime is already deployed at 0.1.22, and still accepts this repository's current pin until this merges.

Validated end to end on a demo repository with 12 seeded issues, 4 merged pull requests and a direct commit. The daily run closed the indirect fix found by mention, the one found by file overlap, the triaged issue whose cited lines had moved (all as completed) and the removed function (as not planned). It left open, each for the right reason: a partial fix, a "still happens" report, a maintainer keeping one open, an issue reopened after an earlier close, an unrelated change to the same file, a roadmap label, and an issue with an open pull request. A backdate closed the issue fixed by a direct commit, and on the older backlog closed nothing, including issues about code that never existed.

Regenerated with @scuffi/gardener@0.1.22.


Devin Review

@changeset-bot

changeset-bot Bot commented Oct 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 573b2b6

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 5 potential issues.

Devin Review

Comment on lines +72 to +76
`GET /repos/{owner}/{repo}/pulls?state=closed&sort=updated&direction=desc&per_page=50`, keeping
those with a `merged_at` in the last 96 hours whose base is the default branch, at most 25, newest
first. For each, read its title and body, and its changed files
(`GET /repos/{owner}/{repo}/pulls/{number}/files?per_page=100`; filenames first, patches only when
you verify a candidate).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Recent merges hidden by closed pull requests

When 50 closed pull requests have newer updates, resolved-check never reads a qualifying merge on the next page. After 96 hours, its fixed issues leave the daily search permanently.

Learn more

The daily task lists closed pull requests by their last update time. That order includes old merges and unmerged closed requests, so the first 50 records need not contain every merge from the last 96 hours. Only the first page is requested; an omitted merge can age out before the next run ever sees it.

Example: Fifty old pull requests receive comments on Tuesday. A pull request merged on Monday now appears on page two; Tuesday's run ignores it, and later runs cannot recover it after its merge falls outside 96 hours.

Recommended fix: Paginate /pulls until updated_at falls before the 96-hour cutoff, and select eligible merges by merged_at before applying the 25-pull-request work cap.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

3. the issue's title names a file, function, option, command, error or feature that the pull
request's changed files define, change or delete.

Keep at most 15 issues, strongest first; say in your summary how many you left out.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Repeated candidates starve fixed issues

When 15 stronger candidates stay open, resolved-check selects them on every daily run and never inspects candidate 16. Once its merge ages past 96 hours, that fixed issue remains open.

Learn more

Daily mode sorts possible issue/merge pairs by signal strength, then examines at most 15. A candidate left open remains eligible at the same rank on every subsequent run. No cursor or exclusion lets the next issue through, and each merge is eligible for only 96 hours.

Example: Fifteen issues mentioned by a merged pull request need more evidence and remain open. A sixteenth issue fixed by another merged pull request appears below them; the task rechecks the first fifteen every day until the second merge ages out.

Recommended fix: Track previously examined candidate/merge pairs or rotate the daily selection so lower-ranked candidates get inspected within the 96-hour window. Keep rechecking candidates if new evidence appears.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +168 to +169
- Then two or three short bold-labelled lines: **What changed** (the pull request or commit, and
`path:line` at `HEAD`), **Why this resolves it** (one or two sentences from the code), and

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Deleted components cannot satisfy closure evidence

When a merged change deletes the affected file, resolved-check still requires a path:line at HEAD. No such line exists, blocking a valid obsolete close or forcing an invalid citation.

Learn more

The obsolete verdict includes issues about deleted files, commands, and components. The close comment requires both the merged change and a current path:line citation. For an entirely deleted file, a current line does not exist, even though the merged diff proves why the issue no longer applies.

Example: A merged pull request deletes src/old-command.ts. An open issue concerns only that command. The task can establish obsolescence but cannot cite a line in the deleted file at HEAD.

Recommended fix: Permit a link to the deleting pull request's diff or deleted path for obsolescence, and require path:line at HEAD only when relevant current code exists.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +74 to +76
first. For each, read its title and body, and its changed files
(`GET /repos/{owner}/{repo}/pulls/{number}/files?per_page=100`; filenames first, patches only when
you verify a candidate).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 Large merges hide filename-based candidates

When a merge changes over 100 files, resolved-check matches issue titles against only the first files page. Issues naming later files remain undiscovered until backdate.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

tools:
- repository.list_files
- repository.read_file
- repository.exec

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟨 Issue checker gains unrestricted network access

The scheduled task adds repository.exec without an explicit request for unrestricted network access. The Gardener tool policy forbids this addition without that request and disclosure.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@pkg-pr-new

pkg-pr-new Bot commented Oct 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 573b2b6

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

Labels

None yet

1 participant