Repository navigation
fix(skills): align nightly issue-closing with repo-authorization policy - #158
Merged
Merged
Conversation
The nightly skill's Step 3 still instructed `gh issue close` unconditionally, but #155 (aa5fa74) established that closing issues requires repo-specific authorization. This caused run 24068363424 to close PRQL/prql#5778 without authorization — the repo has no `running-tend` skill authorizing closures. Now: nightly comments with evidence but only closes if the repo's guidance explicitly authorizes it. Co-Authored-By: Claude Opus 4.6 <[email protected]>
This was referenced Apr 7, 2026
3 tasks
max-sixty
pushed a commit
that referenced
this pull request
Apr 16, 2026
…ed (#290) ## 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](https://github.com/PRQL/prql/actions/runs/24499795330) (tend-review-runs, 2026-04-16T08:19Z) - **Incident thread**: [PRQL/prql#5802](PRQL/prql#5802) — bot opened "Nightly tests failed", opened fixes [#5801](PRQL/prql#5801) and [#5803](PRQL/prql#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 #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) --------- Co-authored-by: tend-agent <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]> Co-authored-by: tend-agent <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The nightly skill's Step 3 ("Check existing issues and close resolved ones") unconditionally instructs
gh issue closefor resolved issues. This conflicts with the policy established in #155 (aa5fa74), which defaults to not closing issues unless the repo's guidance explicitly authorizes it.Evidence: Run 24068363424 on PRQL/prql closed issue PRQL/prql#5778 without authorization — PRQL/prql has no
.claudedirectory orrunning-tendskill authorizing closures.Root cause: #155 updated
running-in-ciandreview-reviewersbut missed the nightly skill, which has its own explicit close instruction in Step 3.Fix: Nightly now comments with evidence of resolution but only closes the issue if the repo's
running-tendskill (or equivalent) explicitly authorizes closing.Gate assessment:
Test plan
running-tendauthorizes closing → closes as before🤖 Generated with Claude Code