Commit 267d7da
Add daily nightly wheel-size regression detector (wraps wheel-size-analyzer skill) (#8317)
## Summary
Daily detector for **significant increases in pytorch nightly wheel
sizes**, as a thin cron wrapper around the **existing
`wheel-size-analyzer` skill** (`.claude/skills/wheel-size-analyzer`).
The existing `validate-pypi-wheel-binary-size.yml` enforces a **fixed
ceiling** (fail if a wheel exceeds N MB). It misses a *relative*
regression — a wheel that jumps vs. its recent size while still under
the ceiling. This adds day-over-day detection + root-cause.
## Why a wrapper (not new scrapers)
The `wheel-size-analyzer` skill already:
- reads **real per-artifact sizes** from the GitHub Actions **artifacts
API** (`size_in_bytes` on the `linux-binary-manywheel` nightly runs) — a
more precise source than scraping the published index;
- flags **day-over-day jumps** against a threshold; and
- **investigates the cause** by diffing the nightly base SHAs and
reading the git log.
So this PR does not reinvent any of that — it just runs the skill **on a
schedule** and alerts.
> Note: neither `workflow_job` nor `workflow_run` stores artifact size
in ClickHouse (checked — no size columns; GH job/run webhooks don't
carry it). Artifact sizes live in the artifacts API, which the skill
uses. A ClickHouse+Grafana-alert version is possible but would require
standing up an ingestion table first; this wrapper needs none.
## What's in it
- **`.github/workflows/nightly-wheel-size-regression.yml`** — daily cron
(`environment: bedrock`, `gha_workflow_claude_code` OIDC). Runs the
`wheel-size-analyzer` skill (Claude on Bedrock, read-only) over a short
recent window for the configured manywheel variants, and files an alert
issue **only** when a variant crosses the day-over-day MB threshold on
the most recent day (the skill also fills in the likely cause).
- Inputs: `variants`, `threshold_mb` (default 50), `lookback_days`
(default 3), `dry_run`.
*(Earlier revisions of this PR added a bespoke index-scraper + S3
history + Python delta; those are removed in favor of reusing the
skill.)*
## Test plan
- Workflow YAML validates.
- Recommended: run via `workflow_dispatch` with `dry_run: true` and
inspect the produced report / whether `/tmp/alert.md` is created, before
enabling the schedule.
## Notes / for review
- **Thresholds:** `threshold_mb` is a flat MB delta (matches the skill).
A percentage rule might suit the wide size range better (CPU ~175 MB vs
ROCm ~4 GB) — easy to switch.
- **`prompt:` input** — confirm against the pinned `claude-code-action`
version / Treehugger's autonomous invocation.
- **Variants** default to the current nightly set; could be derived from
`generate_binary_build_matrix.py` if you want zero-maintenance.
This PR was authored with the assistance of an AI coding agent.
---------
Signed-off-by: Andrey Talman <atalman@users.noreply.github.com>
Co-authored-by: Andrey Talman <atalman@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>1 parent c4580ef commit 267d7da
1 file changed
Lines changed: 136 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
0 commit comments