Repository navigation
skills(review-reviewers,review-runs): retry tracking-issue lookup on empty result - #345
tend-agent wants to merge 1 commit into
Conversation
…empty result Why: GitHub's /issues endpoint intermittently returns [] even when matching issues exist (different read replicas serve different ETags for the same query). A single empty response makes the skill think no tracking issue exists and create a duplicate, which then triggers a tend-triage run on the new dup. Both skills had identical lookup code; both retry up to 3 times before treating empty as ground truth. Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
I'm skeptical that |
|
Reproduced just now against max-sixty/tend (gh 2.89.0). The exact query the script runs, captured raw with That's the literal byte sequence A second batch of 10 attempts run a moment later showed a different artifact of the same flake — Note also: even the "non-empty" responses are stale — they omit #344, an OPEN issue with the matching label and title created an hour earlier. So this isn't strictly a binary |
|
is there an issue on |
|
Your skepticism was warranted — this isn't a GitHub Status, 2026-04-27 "GitHub search is degraded" — critical impact, 16:31–22:46 UTC, components Issues / Pull Requests / Actions / Packages. Status update at 19:50 UTC pinpointed the cause: "identified the source of the additional load causing stress on our ElasticSearch clusters." The 17:35 update explicitly named symptoms — "intermittent failures to view issues, pull requests, projects and Actions workflow runs." The two duplicate tracking issues were created at 16:18 (#342) and 17:16 (#344) — squarely inside that window. The reproduction I posted yesterday at 19:23 UTC was also during the incident. That explains the symmetric flake pattern from yesterday's repro — Cannot reproduce now. Re-ran 30 attempts each via curl REST, curl search/issues, curl GraphQL, and No upstream So the question for the PR is whether to keep the retry as defensive mitigation against future GitHub search/ES incidents, or close it since today's specific cause is resolved server-side. Your call. The retry is cheap (3 attempts, no backoff needed since the flake is per-request) but it is mitigating GitHub, not |
|
close it, any variants of it |
|
Closing per #345 (comment) — root cause was the GitHub search-degradation incident on 2026-04-27, not a gh bug, and the workaround isn't worth keeping. |
…earch missed (#1096) The weekly `consumers.json` refresh rebuilds the file wholesale from `gh search code`, so the file inherits the search's recall. Today's search returned 6 of the 8 listed consumers, and running the recipe as written would have deleted `jakobtfaber/Faber2026` and `max-sixty/cargo-affected` — both live, both still carrying eight `tend-*.yaml` files — from the data the public site renders. This makes the search a discovery step only: candidates are the union of the search hits and the repos already listed, and a per-repo API check decides who stays. <details><summary>Evidence and verification</summary> **The miss is in the index, not the query or the cap.** The search returns 52 hits against a 100 cap, so nothing is crowded out; both repos simply return zero hits for `max-sixty/tend` while their workflow files demonstrably contain the ref: ``` $ gh search code 'max-sixty/tend' --repo max-sixty/cargo-affected (no results) $ gh api repos/max-sixty/cargo-affected/contents/.github/workflows/tend-review.yaml | ... | grep uses: - uses: max-sixty/tend/[email protected] ``` `max-sixty/cargo-affected` returns nothing for a bare `tend` query either — the repo is absent from the code index, not stale in it. #1093 observed the same 6-of-8 result independently and named this as out of scope for that PR. **Not a retry.** #345 was closed on the principle that a retry wrapper around a transient search blip isn't worth keeping. This adds no retry and re-queries nothing: it stops treating search absence as evidence of removal, and moves the keep/drop decision onto an authoritative per-repo API check that an uninstall actually fails. **Verified.** The recipe was extracted verbatim from the file and run under `set -euo pipefail` against real GitHub: 6 discovered, 8 candidates, 8 retained, output byte-identical to the committed `data/consumers.json`. The drop path was exercised separately against a repo with no matching workflows (`octocat/Hello-World` → `count=0`, dropped). `uv run pytest` passes (763), as does `pre-commit` on the changed file. **Out of scope, worth its own look:** `max-sixty/tend-integration` satisfies both filters — 3 `tend-*.yaml` files and `bot_name: tend-agent` — and is absent from the list only because code search does not index it either. If it is ever indexed, the weekly refresh adds the test fixture to the public site's adopter list. </details> --------- Co-authored-by: tend-agent <[email protected]>
…earch missed (#1096) The weekly `consumers.json` refresh rebuilds the file wholesale from `gh search code`, so the file inherits the search's recall. Today's search returned 6 of the 8 listed consumers, and running the recipe as written would have deleted `jakobtfaber/Faber2026` and `max-sixty/cargo-affected` — both live, both still carrying eight `tend-*.yaml` files — from the data the public site renders. This makes the search a discovery step only: candidates are the union of the search hits and the repos already listed, and a per-repo API check decides who stays. <details><summary>Evidence and verification</summary> **The miss is in the index, not the query or the cap.** The search returns 52 hits against a 100 cap, so nothing is crowded out; both repos simply return zero hits for `max-sixty/tend` while their workflow files demonstrably contain the ref: ``` $ gh search code 'max-sixty/tend' --repo max-sixty/cargo-affected (no results) $ gh api repos/max-sixty/cargo-affected/contents/.github/workflows/tend-review.yaml | ... | grep uses: - uses: max-sixty/tend/[email protected] ``` `max-sixty/cargo-affected` returns nothing for a bare `tend` query either — the repo is absent from the code index, not stale in it. #1093 observed the same 6-of-8 result independently and named this as out of scope for that PR. **Not a retry.** #345 was closed on the principle that a retry wrapper around a transient search blip isn't worth keeping. This adds no retry and re-queries nothing: it stops treating search absence as evidence of removal, and moves the keep/drop decision onto an authoritative per-repo API check that an uninstall actually fails. **Verified.** The recipe was extracted verbatim from the file and run under `set -euo pipefail` against real GitHub: 6 discovered, 8 candidates, 8 retained, output byte-identical to the committed `data/consumers.json`. The drop path was exercised separately against a repo with no matching workflows (`octocat/Hello-World` → `count=0`, dropped). `uv run pytest` passes (763), as does `pre-commit` on the changed file. **Out of scope, worth its own look:** `max-sixty/tend-integration` satisfies both filters — 3 `tend-*.yaml` files and `bot_name: tend-agent` — and is absent from the list only because code search does not index it either. If it is ever indexed, the weekly refresh adds the test fixture to the public site's adopter list. </details> --------- Co-authored-by: tend-agent <[email protected]>
Summary
Retries the
gh issue listtracking-issue lookup up to 3 times before treating empty as ground truth. Same fix applied to bothreview-reviewersandreview-runsSKILL.md (identical lookup code in both).Evidence
GitHub's
/issuesendpoint is intermittently returning[]for queries whose matching issues clearly exist. Reproduced empirically during analysis run 25009161877:Response ETags differ between empty and populated responses, suggesting different read replicas/cache entries serve the same query inconsistently.
gh search issues,gh api search/issues, andgh api repos/.../issues(with and without label filter) all show the same flake — it's at the GitHub API layer, not specific to one endpoint.Outcome impact (today, max-sixty/tend)
Two duplicate tracking issues created within one hour today on top of pre-existing tracking issue #133:
Each duplicate triggered a
tend-triagerun that exited silently after recognizing the tracking-label shape:Gates
Evidence gist
https://gist.github.com/8f10d7c1abcb07c79bef00ee6d02d315
Cleanup
#342 and #344 can be closed by a maintainer (both empty, the pre-existing #133 is the canonical tracking issue for 2026-04 with all per-target gist references).