From 29cd12022d96082f1003dafdd6efd3cf81420a97 Mon Sep 17 00:00:00 2001 From: Hunter B Date: Thu, 25 Jun 2026 16:33:17 -0700 Subject: [PATCH 1/2] chore: reactivate stale issue cleanup Create the missing stale-policy labels in GitHub and make the workflow match the documented policy: needs-info bugs can age out unless they also carry a protected label such as release-blocker or security.\n\nDocument the maintainer dry-run queries and first manual cleanup pass so the automation is auditable before it closes anything.\n\nRefs #3089 --- .github/workflows/stale.yml | 2 +- docs/ISSUE_TRIAGE.md | 66 +++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 docs/ISSUE_TRIAGE.md diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index ab8538ee40..24436d52dc 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -28,7 +28,7 @@ jobs: you can share the requested information. stale-issue-label: 'stale' only-labels: 'needs-info' - exempt-issue-labels: 'pinned,keep-open,bug,security' + exempt-issue-labels: 'pinned,keep-open,release-blocker,security' # Don't touch PRs — `actions/stale` defaults can be aggressive # there. We only want it for `needs-info` issues. days-before-pr-stale: -1 diff --git a/docs/ISSUE_TRIAGE.md b/docs/ISSUE_TRIAGE.md new file mode 100644 index 0000000000..00fed8f777 --- /dev/null +++ b/docs/ISSUE_TRIAGE.md @@ -0,0 +1,66 @@ +# Issue Triage + +## Stale `needs-info` cleanup + +The stale workflow only acts on issues that a maintainer has explicitly labeled +`needs-info`. This keeps old roadmap, release, security, and current milestone +work out of automatic cleanup unless a maintainer first marks the issue as +waiting on reporter input. + +Required labels: + +- `needs-info`: waiting on reporter information or current-version reproduction details. +- `stale`: inactive `needs-info` issue pending automatic closure. +- `keep-open`: protected because maintainers intentionally keep it open. +- `pinned`: protected maintainer issue. + +Protected labels for stale cleanup: + +- `pinned` +- `keep-open` +- `release-blocker` +- `security` + +A `bug` issue is not protected just because it is a bug. If a maintainer has +also labeled it `needs-info`, it is eligible for stale warning and closure +unless one of the protected labels above is present. + +## Dry-run queries + +Run these before changing stale policy or doing a manual cleanup pass: + +```sh +gh issue list --repo Hmbown/CodeWhale --state open \ + --search 'updated:<2026-05-11' \ + --limit 100 \ + --json number,title,updatedAt,labels,url + +gh issue list --repo Hmbown/CodeWhale --state open \ + --search 'label:needs-info updated:<2026-05-28' \ + --limit 100 \ + --json number,title,updatedAt,labels,url + +gh issue list --repo Hmbown/CodeWhale --state open \ + --search 'created:<2026-05-11 comments:0 -label:keep-open -label:release-blocker -label:security' \ + --limit 100 \ + --json number,title,createdAt,updatedAt,labels,url +``` + +Use `updatedAt`, labels, and current release relevance as the closure basis. +Creation date alone is too aggressive. + +## First cleanup pass + +Before relying on automation, perform one manual pass: + +- Label unresolved old bug reports as `needs-info` only after asking for + current-version reproduction details. +- Close obvious GUI, VS Code, and web UI duplicates with links to canonical + desktop/runtime issues. +- Close old brand-discussion issues as superseded when the CodeWhale rebrand + and README/history work already covers them. +- Protect intentional v0.9.0 roadmap shards with `keep-open` or close them as + superseded by a canonical epic. + +Do not close release blockers, security issues, or active milestone work from +stale automation alone. From 6771558fd4ff7896e28840fd3d8bbfc93d9e9f35 Mon Sep 17 00:00:00 2001 From: Hunter B Date: Fri, 26 Jun 2026 19:53:55 -0700 Subject: [PATCH 2/2] chore: harden stale cleanup workflow Pin actions/stale to the current v10 commit and replace release-era dry-run dates with generated cutoff variables so the triage docs stay usable over time. Signed-off-by: Hunter B --- .github/workflows/stale.yml | 3 ++- docs/ISSUE_TRIAGE.md | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 24436d52dc..4b1d88370b 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -13,7 +13,8 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v10 + # Pinned from actions/stale@v10; update deliberately when refreshing the policy. + - uses: actions/stale@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899 with: days-before-stale: 14 days-before-close: 7 diff --git a/docs/ISSUE_TRIAGE.md b/docs/ISSUE_TRIAGE.md index 00fed8f777..2b4126780c 100644 --- a/docs/ISSUE_TRIAGE.md +++ b/docs/ISSUE_TRIAGE.md @@ -30,18 +30,21 @@ unless one of the protected labels above is present. Run these before changing stale policy or doing a manual cleanup pass: ```sh +STALE_CUTOFF=$(python3 -c 'from datetime import date, timedelta; print(date.today() - timedelta(days=45))') +NEEDS_INFO_CUTOFF=$(python3 -c 'from datetime import date, timedelta; print(date.today() - timedelta(days=30))') + gh issue list --repo Hmbown/CodeWhale --state open \ - --search 'updated:<2026-05-11' \ + --search "updated:<${STALE_CUTOFF}" \ --limit 100 \ --json number,title,updatedAt,labels,url gh issue list --repo Hmbown/CodeWhale --state open \ - --search 'label:needs-info updated:<2026-05-28' \ + --search "label:needs-info updated:<${NEEDS_INFO_CUTOFF}" \ --limit 100 \ --json number,title,updatedAt,labels,url gh issue list --repo Hmbown/CodeWhale --state open \ - --search 'created:<2026-05-11 comments:0 -label:keep-open -label:release-blocker -label:security' \ + --search "created:<${STALE_CUTOFF} comments:0 -label:keep-open -label:release-blocker -label:security" \ --limit 100 \ --json number,title,createdAt,updatedAt,labels,url ```