Skip to content

Commit 32be6ec

Browse files
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.
2 parents a31b8a6 + 59ce9f8 commit 32be6ec

6 files changed

Lines changed: 6228 additions & 4 deletions

File tree

‎.github/workflows/update-adoption-wall.yml‎

Lines changed: 505 additions & 0 deletions
Large diffs are not rendered by default.

‎.gitignore‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,13 @@ docs/specs/
2121
# belt-and-suspenders for local runs and covers the post-fix / pinned variants.
2222
claude-code-output.log
2323
drift-report*.json
24+
25+
# Adopter state checked out from the orphan adoption-data branch by
26+
# .github/workflows/update-adoption-wall.yml. Never committed to main.
27+
#
28+
# The name "adoption-data" is spelled in three places that cannot import from
29+
# each other: here, STATE_BRANCH in scripts/update-adoption-wall.ts, and the
30+
# STATE_BRANCH env in that workflow. The workflow's "Guard adoption-data naming"
31+
# step fails the run if the three disagree, so a rename that misses one is
32+
# caught before it can commit weekly state data into main's history.
33+
/adoption-data/

‎docs/index.html‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,10 +1568,7 @@ <h1>
15681568
<div class="container">
15691569
<p class="adopter-eyebrow fade-in">Teams building on aimock</p>
15701570
<!-- adoption-wall:start -->
1571-
<!-- Maintained BY HAND for now. The weekly generator that will own this
1572-
region ships separately; the adoption-wall:start/end sentinels above
1573-
and below mark the block it will rewrite, so keep them intact and
1574-
keep hand edits inside them. -->
1571+
<!-- Generated by scripts/update-adoption-wall.ts — do not edit by hand. -->
15751572
<div class="adopter-marquee fade-in" style="--marquee-duration: 64s">
15761573
<div class="adopter-marquee-viewport">
15771574
<div class="adopter-marquee-row">

0 commit comments

Comments
 (0)