Repository navigation
Commit 32be6ec
authored
feat(ci): regenerate the adoption wall weekly and act on the classification (#397)
## What this adds
- `scripts/update-adoption-wall.ts` — the generator that rebuilds the
adopter marquee on `docs/index.html`.
- `.github/workflows/update-adoption-wall.yml` — a weekly scheduled
workflow that runs the generator and acts on its result.
- `src/__tests__/adoption-wall.test.ts` — the test suite covering the
generator and the workflow's shell logic.
The rendered page itself shipped separately in #395, and its live
defects were fixed in #396. This branch is automation only — it does not
change how the wall looks.
## Exit-code contract
| code | meaning | workflow action |
| --- | --- | --- |
| `0` | clean — nothing changed | nothing |
| `10` | `CHANGED_SAFE` | auto-push directly to `main` |
| `20` | `NEEDS-REVIEW` | open a PR instead |
## End-to-end proof
All six were verified against the **live GitHub API** at `59ce9f8`:
1. **Real-API happy path** — exit `0`, `ADOPTION_WALL_STATUS=CLEAN`,
"Resolved 22 of 22 repo(s) … in 1 request(s)", 22 avatars probed, zero
warnings.
2. **No-op property** — the re-render is byte-identical to the shipped
page: `git diff --exit-code docs/index.html` exit `0`, 0 bytes. An
unchanged week pushes nothing.
3. **All three exit paths driven for real**, with exit codes captured
via `CODE=$?` after a redirect (never through a pipe):
- `0` CLEAN.
- `10` SAFE — adding `CopilotKit/CopilotKit`, +39/−1; the workflow's own
"diff is confined" awk/cmp logic, run verbatim on that real diff,
returned `confined=true`.
- `20` NEEDS-REVIEW — dropping `deepnote/vscode-deepnote`, reason "…is
on the wall today but absent from the new list."
4. **Scraped-log contract** — the workflow's real `sed`/heredoc/`case`
extraction run against the five real logs.
5. **Rate limit** — a genuinely exhausted unauthenticated quota (real
HTTP 403, `x-ratelimit-remaining: 0`) makes all 22 owner-identity checks
`inconclusive` → NEEDS-REVIEW, exit `20`. Never a silent pass.
6. **First production run with the `adoption-data` orphan branch
absent** (`git ls-remote` exit 2 = the `exists=false` arm) — exit `0`,
CLEAN, tree untouched, no commit/push/PR reachable, and Slack resolves
to "no data" rather than "logos healthy".
## Tests
174 → 245 adoption-wall tests; full suite 5,567 passing. Every
regression test was observed failing before its fix.
## Known gaps (non-blocking)
- The workflow's `cut -c1-300`/`iconv` truncation guard has no
real-output coverage: the longest real reason is 234 bytes, so nothing
in practice reaches the cutoff.
- The owner-identity guard depends on `api.github.com` being reachable.
An outage degrades the run to NEEDS-REVIEW rather than failing open.6 files changed
Lines changed: 6228 additions & 4 deletions
File tree
- .github/workflows
- docs
- scripts
- src/__tests__
- fixtures
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1568 | 1568 | | |
1569 | 1569 | | |
1570 | 1570 | | |
1571 | | - | |
1572 | | - | |
1573 | | - | |
1574 | | - | |
| 1571 | + | |
1575 | 1572 | | |
1576 | 1573 | | |
1577 | 1574 | | |
| |||
0 commit comments