|
| 1 | +# Bump the ecosystem matrix's corpus pins. |
| 2 | +# |
| 3 | +# Manual only, and that is the design. scripts/registry-census/corpus.pins.json |
| 4 | +# names the exact commit of every registry pack the matrix measures, so the |
| 5 | +# gate is a constant: a pack author pushing a bug cannot red an unrelated PR. |
| 6 | +# The cost of that is that pack breakage is invisible until someone bumps the |
| 7 | +# pins - so this workflow opens the PR where a whole month of ecosystem churn |
| 8 | +# lands at once, reviewed, by someone who expected it. |
| 9 | +# |
| 10 | +# A red on THAT pr means the ecosystem moved. A red anywhere else means the |
| 11 | +# diff did. Keeping those two apart is the entire point. |
| 12 | +name: 'Update corpus pins' |
| 13 | + |
| 14 | +on: |
| 15 | + workflow_dispatch: |
| 16 | + |
| 17 | +permissions: |
| 18 | + contents: read |
| 19 | + |
| 20 | +jobs: |
| 21 | + update-pins: |
| 22 | + if: github.repository == 'Comfy-Org/ComfyUI_frontend' |
| 23 | + runs-on: ubuntu-latest |
| 24 | + timeout-minutes: 45 |
| 25 | + permissions: |
| 26 | + contents: write |
| 27 | + pull-requests: write |
| 28 | + steps: |
| 29 | + - name: Checkout repository |
| 30 | + uses: actions/checkout@v7 |
| 31 | + |
| 32 | + - name: Setup Python |
| 33 | + uses: actions/setup-python@v6 |
| 34 | + with: |
| 35 | + python-version: '3.11' |
| 36 | + |
| 37 | + - name: Report the pins being replaced |
| 38 | + run: python3 scripts/registry-census/pins.py |
| 39 | + |
| 40 | + - name: Refresh registry snapshot |
| 41 | + run: python3 scripts/registry-census/refresh_registry.py |
| 42 | + |
| 43 | + # git ls-remote, not the REST API: ~5,100 packs would exhaust the |
| 44 | + # authenticated 5,000/hour REST budget in a single run. |
| 45 | + - name: Resolve every pack to a commit |
| 46 | + run: python3 scripts/registry-census/fetch_corpus.py --write-pins --workers 32 |
| 47 | + |
| 48 | + - name: Summarize the bump |
| 49 | + id: summary |
| 50 | + run: | |
| 51 | + set -euo pipefail |
| 52 | + python3 - <<'PY' >> "$GITHUB_STEP_SUMMARY" |
| 53 | + import json, subprocess |
| 54 | + path = 'scripts/registry-census/corpus.pins.json' |
| 55 | + new = json.load(open(path))['packs'] |
| 56 | + old = json.loads( |
| 57 | + subprocess.run(['git', 'show', f'HEAD:{path}'], |
| 58 | + capture_output=True, text=True).stdout or '{"packs":{}}' |
| 59 | + )['packs'] |
| 60 | + moved = sorted(k for k in new.keys() & old.keys() if new[k] != old[k]) |
| 61 | + added = sorted(new.keys() - old.keys()) |
| 62 | + dropped = sorted(old.keys() - new.keys()) |
| 63 | + print(f'## Corpus pin bump\n') |
| 64 | + print(f'- {len(new)} packs pinned') |
| 65 | + print(f'- {len(moved)} moved, {len(added)} added, {len(dropped)} dropped\n') |
| 66 | + if moved: |
| 67 | + print('<details><summary>moved</summary>\n') |
| 68 | + print('\n'.join(f'- `{k}` {old[k][:8]} -> {new[k][:8]}' for k in moved)) |
| 69 | + print('\n</details>') |
| 70 | + PY |
| 71 | +
|
| 72 | + - name: Open the bump PR |
| 73 | + uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11 |
| 74 | + with: |
| 75 | + branch: chore/corpus-pins |
| 76 | + commit-message: 'chore: bump ecosystem matrix corpus pins' |
| 77 | + title: 'chore: bump ecosystem matrix corpus pins' |
| 78 | + body: | |
| 79 | + Regenerates `scripts/registry-census/corpus.pins.json`, which names the |
| 80 | + exact commit of every registry pack the ecosystem matrix measures. |
| 81 | +
|
| 82 | + **A red `CI: Ecosystem Matrix` on this PR means the ecosystem moved, not |
| 83 | + that this diff broke something.** That is what this PR is for. Read the |
| 84 | + verdict's breached criterion and the per-pack signature drift, decide |
| 85 | + whether it is real breakage worth an upstream issue or acceptable churn, |
| 86 | + and merge either way — leaving the pins stale is strictly worse, because |
| 87 | + it makes the gate measure an ecosystem that no longer exists. |
| 88 | +
|
| 89 | + See the step summary on the triggering run for the moved/added/dropped |
| 90 | + breakdown. |
| 91 | + add-paths: scripts/registry-census/corpus.pins.json |
0 commit comments