Skip to content

fix(skills): let nightly close bot-opened tracking issues when resolved - #290

Merged
max-sixty merged 2 commits into
mainfrom
hourly/review-24502141694
Apr 16, 2026
Merged

max-sixty merged 2 commits into
mainfrom
hourly/review-24502141694

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

Summary

The nightly Step 3 rule defaults to leaving resolved issues open for a maintainer unless the repo's running-tend skill explicitly authorizes closing. That default causes the bot to leave its own tracking issues open indefinitely after the tracked condition resolves.

Adds a narrow carve-out: the bot may gh issue close an issue it opened itself to report a transient condition (e.g. a "Nightly tests failed" report), once the fix PR is merged and the relevant CI on main is passing. Issues whose body contains "do not close manually" (monthly review-runs / review-reviewers trackers) are explicitly excluded.

Evidence

  • Run: PRQL/prql run 24499795330 (tend-review-runs, 2026-04-16T08:19Z)
  • Incident thread: PRQL/prql#5802 — bot opened "Nightly tests failed", opened fixes #5801 and #5803, both merged, main CI went green, bot commented "Leaving open for a maintainer to close"
  • Maintainer pushback: max-sixty: "@prql-bot you should close these when things pass" and then "presumably we need to add this to the tend skill?"
  • Bot's own diagnosis (posted as a diff in issue #5802): proposed to authorize closures in PRQL's local running-tend skill; the tend-level default was the actual structural gap

Gate assessment

  • Evidence level: Critical — direct maintainer correction on a bot behavior
  • Classification: Structural — the nightly skill's Step 3 explicitly instructed "leave it open for a maintainer to close" in every case not covered by running-tend; same conditions → same outcome every run
  • Change type: Targeted fix — one carve-out paragraph added, existing default preserved for user-reported issues
  • Occurrences: 1 direct this window; prior tracking on review-reviewers-tracking: 2026-04 #133 documented one inverse case (closing a tracking issue with "do not close manually"), which this carve-out explicitly guards against by excluding that marker

Both gates pass. The carve-out is intentionally narrow so the #155 / #158 policy (no unauthorized closures on user-reported issues) stays intact.

Test plan

  • Nightly run on a repo without running-tend close-authorization where the bot has an open self-opened "X failed" issue with the fix merged → bot closes the issue with a short comment citing the fix
  • Same flow but issue body says "do not close manually" (e.g. review-runs tracker) → bot still leaves it open
  • User-reported issue (non-bot author) resolved by recent commits on a repo without close authorization → bot comments with evidence, does not close (unchanged behavior)

Nightly Step 3 currently tells the bot to comment with evidence of
resolution but leave the issue open for a maintainer, unless the repo
explicitly authorizes closing. On PRQL/prql#5802 the bot opened a
"Nightly tests failed" issue, opened the fixes, they merged, and the bot
then left it open — max-sixty pushed back ("you should close these when
things pass") and asked to add this to the tend skill.

Adds a narrow carve-out: the bot may close an issue it opened itself to
report a transient condition, once that condition has clearly resolved
(fix PR merged + main CI passing). Skips issues with "do not close
manually" in the body so monthly review-runs trackers keep their
lifecycle.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@tend-agent tend-agent added the claude-behavior Behavioral issues found by review-reviewers label Apr 16, 2026

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Self-review, one minor observation — the marker the skill tells the bot to check for ("do not close manually") doesn't quite match the literal text written into tracker bodies by plugins/tend-ci-runner/shared/review-gates.md (**Do not close manually**, capital D). Inline suggestion fixes the case. In practice LLM instruction-following would tolerate the mismatch, but tightening the quoted marker is cheap and keeps the two sites in sync.


- The bot opened the issue itself to report a transient condition (e.g., a "Nightly tests failed"
report from a prior run) and the condition has clearly resolved — the fix PR is merged and the
relevant CI on `main` is passing. Skip this case if the issue body contains "do not close

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The marker written by shared/review-gates.md is **Do not close manually** (capital D). Match the exact case so the quoted phrase lines up with the source marker.

Suggested change
relevant CI on `main` is passing. Skip this case if the issue body contains "do not close
relevant CI on `main` is passing. Skip this case if the issue body contains "Do not close

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Applied in 4e506ba — changed the quoted marker to "Do not close manually" (capital D) so the skill matches the literal text written by shared/review-gates.md.

The tracker marker written by shared/review-gates.md uses capital D
("**Do not close manually**"). Align the skill's quoted check so the
two sites stay in sync.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@max-sixty
max-sixty merged commit 3c1d329 into main Apr 16, 2026
5 checks passed
@max-sixty
max-sixty deleted the hourly/review-24502141694 branch April 16, 2026 15:21
max-sixty added a commit that referenced this pull request Apr 18, 2026
Bumps generator version to 0.0.16 and syncs lockfile.

7 commits since 0.0.15: nightly bot PAT scope audit (#294), review-reviewers gist-backed evidence storage with single-fetch optimization (#291, #292), nightly closes bot-opened tracking issues when resolved (#290), drops GITHUB_STEP_SUMMARY writes that fail under Claude sandbox (#289), release docs clarification (#288), and notifications dedup of bot-authored PRs (#279).

Co-Authored-By: Claude <[email protected]>
@max-sixty max-sixty mentioned this pull request Apr 18, 2026
max-sixty added a commit that referenced this pull request Apr 18, 2026
Bumps generator to 0.0.16.

## Changes since 0.0.15

- #294 — nightly: audit bot PAT scopes via script
- #292 — review-reviewers: fetch current-month gist once per run
- #291 — review-reviewers: pilot gist-backed evidence storage
- #290 — nightly: close bot-opened tracking issues when resolved
- #289 — skills: drop `GITHUB_STEP_SUMMARY` writes that fail under
Claude sandbox
- #288 — docs(release): commit on the current branch, don't create a new
one
- #279 — notifications: dedup bot-authored PRs cross-referencing the
issue

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-behavior Behavioral issues found by review-reviewers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants