From 6208d6686419d1ba6f38c0882a4c1d146fa31fa4 Mon Sep 17 00:00:00 2001 From: Timothy Date: Wed, 22 Jul 2026 17:01:46 +0200 Subject: [PATCH] fix(553): exclude bot-authored issues from the queue selector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit scripts/select-queue.sh ranked Renovate's Dependency Dashboard (#22) as an ordinary `priority: low` candidate. With an all-low backlog ordered by issue number, #22 sorted to the top and was proposed to every fresh session — a bot- rewritten status board whose checkboxes are commands to Renovate, not work items. A session trusting the selector's "trust the ordering" contract would either waste a pickup or make the exact undocumented judgment call the script exists to eliminate (this session hit it live). Drop bot-authored issues in the same jq pass that drops PRs/in-progress/parked: match login `renovate` plus the GitHub `name[bot]` convention so a future bot dashboard is excluded too. A bot's actionable output is PRs (already excluded); it never files a human work-item issue, so the whole class is never a pickup. Also make "scan for bundle-able siblings after claiming" an explicit kickoff step (new step 4) with a third bundle axis — shared label / adjacent subject — so a session sweeps small independent same-label issues together (e.g. this change's own #553 + #512 ci-cd hygiene bundle) instead of closing one at a time. Verified: selector no longer lists #22; genuine backlog issues still rank; the only bot-authored open issue is #22. shellcheck clean. Fixes #553 Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/handoffs/chicorytv-issue-queue.md | 30 +++++++++++++++++--------- scripts/select-queue.sh | 11 ++++++++++ 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/docs/handoffs/chicorytv-issue-queue.md b/docs/handoffs/chicorytv-issue-queue.md index 54f2eb8a3..912347cf6 100644 --- a/docs/handoffs/chicorytv-issue-queue.md +++ b/docs/handoffs/chicorytv-issue-queue.md @@ -31,13 +31,15 @@ So a fresh session stops re-discovering this every time: - **`parked` → closed, not parked** (convention 2026-07-17): `parked` means "no concrete plans," and the decision was to **close** such issues rather than let them linger (reopen instantly if revived). So `parked` should normally not appear; if it does, treat it as excluded and surface it to the user. -- **Bundles (single-session sweeps)**: related issues are grouped two ways — (a) an **active-arc +- **Bundles (single-session sweeps)**: related issues are grouped three ways — (a) an **active-arc milestone** (e.g. "Scheduling: refactor + distribution", "Auto-Tune DetailPanel", "Design system - (Claude Design ↔ prod)"), or (b) a **cross-reference comment** on backlog clusters (e.g. "🔗 Session - bundle — security hardening: #293, #376"). When you claim an issue, check its **milestone** AND its - **cross-references / backlinks** for co-workable siblings, and sweep the whole disjoint cluster in one - session. Active-arc milestones auto-sort above the flat priority backlog; leave individually-important - backlog bugs unmilestoned so their `priority:` label still orders them. + (Claude Design ↔ prod)"), (b) a **cross-reference comment** on backlog clusters (e.g. "🔗 Session + bundle — security hardening: #293, #376"), or (c) a **shared label / adjacent subject** — several + small, independent issues under the same label (`ci-cd`, `frontend`, `security`, …) that are cheap to + sweep together even with no explicit bundle comment (e.g. #553 + #512, two `ci-cd` tooling-hygiene + fixes). **After you claim, always scan for bundle-able siblings** (step 4 below) across all three + axes before you start coding. Active-arc milestones auto-sort above the flat priority backlog; leave + individually-important backlog bugs unmilestoned so their `priority:` label still orders them. - A **new gate re-appears only** when a future adversarial-review Blocker/High finding is slotted as a priority pickup, or a new OPEN milestone re-establishes an arc. Until then, backlog features (ordered by milestone/`priority:` label) are the normal, expected work. @@ -111,7 +113,8 @@ never orchestrator-tier work: contract. - **Track B — Selection** (only when the user has NOT named an issue): run the deterministic selector, `ETV_GITEA_BASICAUTH=user:pass scripts/select-queue.sh [N]`. It does the mechanical parts a cheap - model used to get wrong IN CODE: excludes `in-progress`/`parked`/PRs, resolves + model used to get wrong IN CODE: excludes `in-progress`/`parked`/PRs/bot-authored issues (Renovate's + Dependency Dashboard #22, ersatztv#553), resolves `GET /issues/{n}/dependencies` on every candidate (dropping any with an OPEN blocker), tiers by LOCAL `.milestone.state`/`review`/`priority:` filters (never the server `?milestones=` name filter, which no-ops on `:`/`+`), and orders by (tier, priority, issue#). **Its DEPS/tiering/ordering are @@ -225,15 +228,22 @@ Then work the queue: reviewer-repo audits are claimed by comment only. Treat that claim as live until a later comment explicitly releases or abandons it, and exclude audits with a posted deliverable even while the issue remains open for implementer replies. -4. Read the issue bodies (they carry the task context/evidence) and work the item under the +4. **Scan for bundle-able siblings** (always, right after claiming — not optional). Check all three + bundle axes from "Bundles" above: the claimed issue's **milestone**, its **cross-references / + backlinks**, and its **shared label(s)** (list the other open issues under each of its labels). + Surface any small, independent siblings to the user with a size/fit read and a recommendation, and + fold the agreed ones into this session (parallel worktrees for disjoint slices). This is how #22's + sibling-cluster fixes (#553 + #512) got swept together; skipping it silently narrows a session that + could have closed two or three issues for barely more cost. +5. Read the issue bodies (they carry the task context/evidence) and work the item(s) under the HARD CONSTRAINTS below. -5. Finish the session: run the **H12 qualification audit** +6. Finish the session: run the **H12 qualification audit** (`ETV_GITEA_BASICAUTH=user:pass scripts/issue-qualification-audit.sh`) and add a `priority:` label to anything it lists (every issue you filed this session included); post a `## Closing record` (template below) on each issue you closed or substantially progressed; remove your `in-progress` labels; and complete the per-issue Task Completion Protocol from the applicable `AGENTS.md` / `CLAUDE.md` instructions (including the `done` workflow when required). -6. **Leave the shared checkout fresh** (H13): run `scripts/refresh-shared-checkout.sh`. It +7. **Leave the shared checkout fresh** (H13): run `scripts/refresh-shared-checkout.sh`. It fast-forwards `/Users/timothy/ersatztv` to `origin/main` and refreshes `web/node_modules` if the lockfile moved; it refuses and changes nothing unless that tree is on a clean, non-ahead `main`. A NO-OP is a normal result — report it and carry on. diff --git a/scripts/select-queue.sh b/scripts/select-queue.sh index 308ea69c6..21eddd5b1 100755 --- a/scripts/select-queue.sh +++ b/scripts/select-queue.sh @@ -19,6 +19,9 @@ # - ordering: within a tier, priority high>medium>low, then lowest issue number. # - label exclusions: `in-progress` and `parked` are dropped; pull requests are excluded # (type=issues + a .pull_request guard). +# - author exclusion: bot-authored issues are dropped (login `renovate` or a `name[bot]` login). +# A bot's actionable output is PRs (already excluded); its one lingering ISSUE is Renovate's +# Dependency Dashboard (#22), a status board, not a pickup — see ersatztv#553. # # WHAT STAYS JUDGMENT (the script FLAGS, it does not decide): # - CLAIM? — a "claiming" note can precede the `in-progress` label; the script flags any candidate @@ -84,6 +87,14 @@ rows=$( .[] # drop PRs and label-excluded issues up front | select(.pull_request == null) + # drop bot-authored issues. A bot only emits PRs as work (already excluded above); it never + # files a human work-item issue, so the whole class is never a pickup. The concrete case is + # Renovate Dependency Dashboard (#22): a bot-rewritten status board whose checkboxes are + # commands to Renovate, not work items -- yet as a priority:low issue it sorts to the top of an + # all-low backlog and was proposed to every fresh session (ersatztv#553). Matches known bot + # logins plus the GitHub name[bot] convention so a future bot dashboard is excluded too. + | (.user.login // "") as $author + | select(($author == "renovate" or ($author | test("\\[bot\\]$"))) | not) | (.labels | map(.name)) as $L | select(($L | index("in-progress")) | not) | select(($L | index("parked")) | not) -- 2.47.3