fix(adoption): count unique cloners, not raw git-clone count#25
Merged
Conversation
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"
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The dashboard's headline Adoption metric summed GitHub's raw git-clone count. That count is dominated by CI/mirror re-cloning:
hackmyagentshows ~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.summary.jsonadoptionThe clone term is identical across surfaces: dashboard API
totals.github.totalCloneUniques=summary.jsontotal.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 snapshotpages/api/overview.js— everytotalAdoptionpath (per-product, Other, combined) usesrecentUniqueClonerspages/index.js— "Cloners 14d" column, hero channel-mix, standards use the snapshot; raw clones stay on the GitHub tablib/repos.js—canonicalRepoTotalsreturns twin-dedupeduniqueClonerslib/standards.js— spec clone term from the canonical row's snapshotscripts/generate-summary.js— publicsummary.jsonadoption uses the deduped snapshotNotes / follow-ups (not in scope here)
summary.json(150,108) and the dashboard hero (163,775): Docker computed asMAX(pull_count)vs the dashboard's sum-latest-per-image, plus HuggingFace omitted fromsummary.json. Unrelated to the clone term.opena2a-website'scanonical-numbers.jsonheadline (240K+) will refresh downward once the daily cron regeneratessummary.jsonandrefresh-canonical-numbers.mjsruns.