Skip to content

Commit d8715a7

Browse files
cliffhallclaude
andcommitted
fix(issue-triage): validate close bodies, exact Dependabot match, completed-not-Done audit check
Copilot round 2 on #4906: - the close loop stops when a response is empty or still holds #ISSUE, so a missing file can never become a close without an explanation - Dependabot is matched as exactly app/dependabot, not by substring - the audit gains 'closed completed, not Done'; Priority stays open-only, now stated - contribution-model.md: a README-only PR pre-classifies as a listing, and reading it decides the class Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent cf677d6 commit d8715a7

2 files changed

Lines changed: 16 additions & 7 deletions

File tree

‎.claude/skills/issue-triage/SKILL.md‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ gh api "repos/$R/collaborators?per_page=100" --paginate \
310310
jq -r --slurpfile m "$D/maintainers.json" '
311311
["everything","filesystem","memory","sequentialthinking","fetch","git","time"] as $seven
312312
| .[] | .author.login as $a | [.files[].path] as $p
313-
| (if ($a | test("dependabot")) then "dependabot"
313+
| (if $a == "app/dependabot" then "dependabot"
314314
elif ($m[0] | index($a)) then "maintainer"
315315
elif ($p | length) > 0 and ($p | all(. == "README.md" or . == "ADDITIONAL.md")) then "listing?"
316316
elif ($p | any(startswith("src/") and ((split("/")[1]) as $d | $seven | index($d) | not))) then "new-server?"
@@ -352,7 +352,7 @@ they fix the same thing:
352352
```sh
353353
# Outside PRs grouped by their exact set of changed files; each line is a candidate group.
354354
jq -r --slurpfile m "$D/maintainers.json" '
355-
[.[] | select((.author.login | test("dependabot")) | not)
355+
[.[] | select(.author.login != "app/dependabot")
356356
| select(.author.login as $a | $m[0] | index($a) | not)
357357
| {n: .number, key: ([.files[].path] | sort | join(" "))}]
358358
| group_by(.key)[] | select(length > 1)
@@ -403,6 +403,8 @@ while IFS=$'\t' read -r PR CLASS ISSUE _; do
403403
security) echo "skipping #$PR: a security fix closes only on a maintainer's call" >&2; continue ;;
404404
*) echo "unknown class '$CLASS' on #$PR — stopping; fix the manifest" >&2; break ;;
405405
esac
406+
# A missing or unfilled response must never become a close with no explanation.
407+
case "$BODY" in ""|*"#ISSUE"*) echo "no usable response for #$PR — stopping" >&2; break ;; esac
406408
[ -n "$SWEEP_REF" ] && BODY="$BODY"$'\n\n'"This is part of the backlog triage in $SWEEP_REF."
407409
if [ -n "$SWEEP_LABEL" ]; then
408410
gh pr edit "$PR" --repo modelcontextprotocol/servers --add-label "$SWEEP_LABEL" </dev/null \
@@ -550,6 +552,7 @@ is read-only.
550552
| Open, no Priority | Every board item is prioritized | Score it with the rubric |
551553
| Closed unshipped, still carded | **`Done` means the work shipped** | Delete the card |
552554
| Open, but carded `Done` | A card in `Done` means its issue is closed | Close the issue, or move the card back |
555+
| Closed as completed, not in `Done` | Shipped work sits in `Done` | Move the card to `Done` |
553556

554557
```sh
555558
D=$(mktemp -d); R=modelcontextprotocol/servers; LIMIT=5000
@@ -601,7 +604,10 @@ jq -nr --slurpfile o "$D/i.json" --slurpfile a "$D/b43.json" --arg R "$R" '
601604
"closed unshipped, still carded":
602605
[$B[] | select(I(.n) != null and (isopen(.n) | not)
603606
and (shipped(.n) | not)) | .n],
604-
"open, but carded Done": [$B[] | select(.s == "Done" and isopen(.n)) | .n]
607+
"open, but carded Done": [$B[] | select(.s == "Done" and isopen(.n)) | .n],
608+
"closed completed, not Done":
609+
[$B[] | select(I(.n) != null and (isopen(.n) | not) and shipped(.n)
610+
and .s != "Done") | .n]
605611
} | to_entries[] | "\(.value|length)\t\(.key)\t\(.value[0:10])"'
606612
```
607613

@@ -630,9 +636,11 @@ What the queries account for:
630636
- **Count the type labels; don't test for presence.** The invariant is
631637
_exactly one_, and a presence test passes an issue labeled both `bug` and
632638
`enhancement`.
633-
- **`Done` is checked from both sides.** One check catches a card in `Done` for
634-
work that never shipped; the other catches an issue still **open** under a
635-
`Done` card. Closing keywords do not fire on `v2/main`, so every issue is
639+
- **`Done` is checked from all sides.** One check catches a card for work that
640+
never shipped; one catches an issue still **open** under a `Done` card; and
641+
one catches an issue closed as completed whose card never reached `Done`.
642+
Priority is checked on open issues only: a closed card's Priority no longer
643+
orders any queue. Closing keywords do not fire on `v2/main`, so every issue is
636644
closed by hand after its PR merges, and forgetting that is the usual way this
637645
breaks.
638646
- **`$M` holds closed issues too**, because the last checks read closed issues'

‎docs/contribution-model.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ this plan:
176176
- **`readme-pr-check.yml`** invited README-only PRs to continue with
177177
`/i-promise-this-is-not-a-new-server`, which no longer matched the policy.
178178
#4868 retired it and folded its behavior into `issue-triage`: a README-only
179-
PR is the listing class, answered with the Registry comment.
179+
PR pre-classifies as a listing, and reading it decides the class (a fix to an
180+
existing entry can still be one to keep).
180181
- **Automatic closing** of outside PRs (a workflow, as maintainer PR #4528
181182
proposes for new-server PRs, or a repository setting where GitHub offers one)
182183
is a maintainer decision about repository settings and workflows.

0 commit comments

Comments
 (0)