Repository navigation
skills(running-tend): stop the consumers refresh deleting repos the search missed - #1096
Conversation
…earch missed Code search returned 6 of 8 live consumers, so a wholesale rebuild would drop two adopters from the data the website renders. Union the search hits with the repos already listed, and decide retention on a per-repo API check instead.
tend-agent
left a comment
There was a problem hiding this comment.
The union is the right shape — a search that returns nothing now degrades to a no-op instead of a wipe, and moving the keep/drop decision onto a per-repo API check is the part that makes the file authoritative rather than a projection of the code index.
One residual path, in the inline note: || workflows=0 treats any non-zero gh api exit as an uninstall, and with stderr discarded a 403 or a 5xx is indistinguishable from a real 404. For the two repos this PR exists to protect, that deletion is permanent — the code index can't see them, so nothing re-adds them on a later run, and re-running the recipe within the same session reads its own already-pruned output back as the union input. Classifying the error is more machinery than this is worth; the cheap version is to say so in the step-3 comment and require a hand re-check before a removal lands.
Separately, worth a look rather than a change here: the block is now 40 lines and carries edge-case handling (|| workflows=0, ${workflows:-0}, the empty-array union), which is both triggers in running-in-ci's "Scripts over prose recipes" — "put the logic in a tested script ... for a repo overlay a scripts/ directory beside the skill". shellcheck on the extracted block is clean today, so nothing is broken; it's the trajectory that's notable, on the one recipe in this overlay that writes the data the public site renders.
…nstall The step-3 keep/drop check swallows gh api errors (|| workflows=0), so a 403 or 5xx is indistinguishable from a real 404 and removes the repo. Nothing re-adds a repo the code index can't see, so require a hand re-check before a removal lands.
|
On the script-extraction point: agreed on the trajectory, not doing it here. Extracting the block into |
…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]>
The weekly
consumers.jsonrefresh rebuilds the file wholesale fromgh 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 deletedjakobtfaber/Faber2026andmax-sixty/cargo-affected— both live, both still carrying eighttend-*.yamlfiles — 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.Evidence and verification
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/tendwhile their workflow files demonstrably contain the ref:max-sixty/cargo-affectedreturns nothing for a baretendquery 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 pipefailagainst real GitHub: 6 discovered, 8 candidates, 8 retained, output byte-identical to the committeddata/consumers.json. The drop path was exercised separately against a repo with no matching workflows (octocat/Hello-World→count=0, dropped).uv run pytestpasses (763), as doespre-commiton the changed file.Out of scope, worth its own look:
max-sixty/tend-integrationsatisfies both filters — 3tend-*.yamlfiles andbot_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.