Skip to content

Commit 25618e2

Browse files
vintaclaude
andcommitted
docs: warn that renaming an entry can expose it to the pypi sweep
The uv-audit bug has no automatic guard outside the bundled-entry case, so the hazard has to live in the audit process instead. The sweep only queries names matching PYPI_NAME_RE, so a display name with a space is skipped outright; renaming it into a PyPI-shaped name starts it being queried, which is how 'uv audit' became 'uv-audit' and picked up an unrelated third-party package by rocshers. The gotcha tells the auditor to fetch PyPI metadata for any renamed entry and add a null override when the package isn't the linked project. It also records two broader checks that were measured against the full list and rejected, so a future audit doesn't spend time re-proposing them: the repo-backlink check misses this case entirely since uv-audit declares no repo URL, as do 26 legitimate entries, and it flags 10 benign org moves; the name-versus-repo-name check returns 46 hits that are all legitimate, including uv-build with the shape identical to uv-audit. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b7313dc commit 25618e2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎.claude/skills/audit-the-list/SKILL.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Fetch live evidence for every entry in scope before judging anything (CLAUDE.md
1919
- **Downloads/month**: `cd website && uv run python fetch_pypi_downloads_via_clickpy.py` — free keyless ClickPy sweep of the full README, sole writer of `data/pypi_downloads.tsv` (rewritten from scratch each run; header row, every row stamped with its `fetched_at` date). A cache whose `fetched_at` is within the last 7 days is current enough for verdicts — skip the sweep; older than that, re-run it (costs ~1s). Cross-checks print to stdout, take explicit names, and never touch the cache: `fetch_pypi_downloads_via_bigquery.py <name> ...` (canonical source, maintainer's own GCP account, `--dry-run` first — the docstring carries the cost constraints; full-README sweeps exceed the free tier, keep name lists small), `fetch_pypi_downloads_via_pepy.py <name> ...` (needs `PEPY_TECH_API_KEY` in repo-root `.env`, throttled to 5 requests/minute), or `https://pypistats.org/api/packages/{name}/recent` paced 8s or slower. pypistats excludes mirror/CI traffic; ClickPy, BigQuery, and pepy include it — never mix sources within one comparison.
2020
- **Repo state**: archived flag, last push, created date, stars, description — `gh api repos/{owner}/{repo}`, GitLab API for GitLab-hosted projects.
2121
- **PyPI metadata** (`https://pypi.org/pypi/{name}/json`) wherever a name might not be the canonical package — ownership collisions and wrong display names surface here. Wrong-package cache rows are common: the sweep looks up README display names, so when the display name differs from the canonical package, the row silently measures an unrelated squatter or a dead predecessor. When a famous entry shows a count that looks off (too small, or absurdly round), verify identity before citing it, and fetch the canonical package's count via pepy.
22+
- **Renaming an entry can silently expose it to the sweep, and no automatic check catches that.** The sweep only queries names matching `PYPI_NAME_RE`, so a display name carrying a space or other non-PyPI shape is skipped outright. Rename it into a PyPI-shaped one and it starts being queried: `uv audit` became `uv-audit`, and PyPI `uv-audit` is an unrelated third-party tool by rocshers, not Astral's subcommand. After any rename, fetch `https://pypi.org/pypi/{new-name}/json` and confirm the package is the project the entry links to; when it is not, add a null entry to `website/data/pypi_name_overrides.json` with the reason. Only one case is guarded automatically: `test_bundled_entries_are_never_queried_on_pypi` requires a null override for every `(part of X)` entry. Two broader checks were measured against the full list and rejected — do not re-propose either. Requiring a package's PyPI metadata to link back to the entry's GitHub repo misses this case completely, since `uv-audit` declares no repo URL at all, as do 26 legitimate entries including numba, selenium and pyglet; it also flags 10 benign org moves and binding splits (gensim, msgspec, pendulum, instructor, duckdb). Flagging entries whose display name differs from their repo name returns 46 hits, every one legitimate, and `uv-build` sits among them with the shape identical to `uv-audit` despite being a real Astral package.
2223

2324
Done when every entry in scope has downloads (or a stated no-signal reason), repo state, and a confirmed PyPI name.
2425

0 commit comments

Comments
 (0)