Skip to content

fix(adoption): count unique cloners, not raw git-clone count#25

Merged
thebenignhacker merged 2 commits into
mainfrom
fix/adoption-count-unique-cloners
Jul 22, 2026
Merged

fix(adoption): count unique cloners, not raw git-clone count#25
thebenignhacker merged 2 commits into
mainfrom
fix/adoption-count-unique-cloners

Conversation

@thebenignhacker

Copy link
Copy Markdown
Contributor

Problem

The dashboard's headline Adoption metric summed GitHub's raw git-clone count. That count is dominated by CI/mirror re-cloning: hackmyagent shows ~2,000 clones/day from only 5–10 unique cloners (a 147× re-clone ratio), which inflated its "adoption" to 33,207 — while the tool's own first-party telemetry reports ~15 MAU / 6 engaged. Raw clone count answers "how many git-clone operations happened," which is not adoption.

Fix

Adoption now counts unique cloners using GitHub's own 14-day deduplicated distinct-cloner count (traffic_summary.clones_uniques), not raw clones and not a sum of per-day uniques (which counts a cloner once per active day). GitHub only deduplicates over a rolling 14 days, so this is a snapshot — shown identically under every period and labeled "Cloners 14d". Raw clone count stays on the GitHub-traffic tab as an operational metric.

Before After
HackMyAgent clone term 31,231 (raw) 69 (14-day deduped)
HackMyAgent Adoption (30d) 33,207 2,045
Public summary.json adoption 285,177 150,108

The clone term is identical across surfaces: dashboard API totals.github.totalCloneUniques = summary.json total.cloneUniques = 1,021 (twins collapsed by canonical repo).

Changes

  • lib/adoption.js — one shared definition of adoption (server + client); clone term is the deduplicated 14-day snapshot
  • pages/api/overview.js — every totalAdoption path (per-product, Other, combined) uses recentUniqueCloners
  • pages/index.js — "Cloners 14d" column, hero channel-mix, standards use the snapshot; raw clones stay on the GitHub tab
  • lib/repos.jscanonicalRepoTotals returns twin-deduped uniqueCloners
  • lib/standards.js — spec clone term from the canonical row's snapshot
  • scripts/generate-summary.js — public summary.json adoption uses the deduped snapshot
  • tests — lock "adoption uses the deduped snapshot, not raw count or cloner-days" (mutation-tested)

Notes / follow-ups (not in scope here)

  • Pre-existing ~13.7K gap between summary.json (150,108) and the dashboard hero (163,775): Docker computed as MAX(pull_count) vs the dashboard's sum-latest-per-image, plus HuggingFace omitted from summary.json. Unrelated to the clone term.
  • opena2a-website's canonical-numbers.json headline (240K+) will refresh downward once the daily cron regenerates summary.json and refresh-canonical-numbers.mjs runs.

Adoption summed GitHub's raw clone count, which is dominated by CI/mirror
re-cloning. hackmyagent showed ~2,000 clones/day from only 5-10 unique
cloners (a 147x re-clone ratio), inflating its "adoption" to 33,207 while
its own first-party telemetry reports ~15 MAU / 6 engaged.

Adoption now counts UNIQUE CLONERS using GitHub's own 14-day DEDUPLICATED
distinct-cloner count (traffic_summary.clones_uniques / recentUniqueCloners) —
NOT raw clones, and NOT a sum of per-day uniques (which counts a cloner once
per active day and re-inflates the same noise). GitHub only dedupes over 14
days, so this is a rolling snapshot, handled like the 14-day unique visitors:
shown identically under every period. Raw clone count stays on the
GitHub-traffic tab as an operational metric.
HackMyAgent 30d adoption: 33,207 -> 2,045 (69 unique cloners + 1,976 npm).

- lib/adoption.js: one shared definition of adoption (server + client); the
  clone term is the deduplicated unique-cloner snapshot, never raw count
- overview.js: totalAdoption (per-product, Other, combined) uses recentUniqueCloners
- index.js: "Cloners 14d" column, hero channel-mix, standards use the snapshot;
  raw clones stay on the GitHub tab
- repos.js: canonicalRepoTotals returns twin-deduped uniqueCloners
- standards.js: spec cloneUniques from the canonical row's snapshot
- generate-summary.js: public summary.json adoption uses the deduped snapshot,
  matching the dashboard's clone term exactly (twins collapsed)
- tests: lock "adoption uses the deduped snapshot, not raw count or cloner-days"
@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
github-analytics-tracker Ready Ready Preview, Comment Jul 22, 2026 8:33pm

Request Review

@thebenignhacker
thebenignhacker merged commit bd22fe3 into main Jul 22, 2026
3 checks passed
@thebenignhacker
thebenignhacker deleted the fix/adoption-count-unique-cloners branch July 22, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant