[quality] /resources/metrics publishes a commit count as "Reference architecture submissions" (28 on the chart, 8 on the card)
Los mantenedores suelen responder en 1 día
Ya se ha fusionado un pull request relacionado.
- #1985 de @mrbobbytables — fusionado
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- git, github-actions, javascript
Línea de trabajo
Read architectureTimelineData() in scripts/collect-metrics.mjs and the fixture in tests/collect-metrics.test.mjs. Update the series to count each architecture directory once when its first file is added, adjust the expected timeline, and point its sourceUrl to the architecture directory page. Done when the test covers later edits or additions within an existing directory without increasing the submission count. A pull request is already open for this issue.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Finding
/resources/metrics publishes a chart titled "Reference architecture submissions" whose values are a count of git commits, not submissions.
architectureTimelineData() in scripts/collect-metrics.mjs builds the series from git log --format=%aI -- content/en/architectures, which emits one line per commit, buckets those lines by month and publishes the running total:
const commits = execFileSync(
'git',
['-C', dir, 'log', '--format=%aI', '--', 'content/en/architectures'],
{ encoding: 'utf8' },
)
So every commit that touches an existing architecture — a typo fix, an image swap, a front-matter edit, a directory rename — adds one to the published "submissions" count.
What a visitor sees
On the same page, in data/metrics.json as committed today (generatedAt 2026-10-25, cncf/architecture revision 3ddf917facd0aea9694cc9c12c52e583fd2f86cb):
Element on /resources/metrics |
Value |
|---|---|
| "Reference architectures" stat card | 8 |
| "Reference architecture submissions" chart, last point (2026-07) | 28 |
Both are collected in the same run from the same upstream path. A reader cannot reconcile them, and the 28 is not a count of anything a reader would call a submission. /architectures separately reports "10 real-world architecture reports".
Reproduction
The behaviour is pinned by the committed fixture. tests/collect-metrics.test.mjs builds an upstream repo with two architecture directories (acme-platform, globex-edge) and three commit dates, where the third commit only edits an existing page, and asserts:
assert.deepEqual(data.series.referenceArchitectures.values, [
{ date: '2024-01', value: 2 },
{ date: '2024-03', value: 3 },
]);
Two architectures, a published "submissions" total of three.
Recommendation
Count each architecture directory once, at the commit that first added a file under it. Replace architectureTimelineData() in scripts/collect-metrics.mjs with:
// One cumulative point per month, counting each architecture directory once at
// the commit that first added a file under it. `git log --format=%aI` alone
// counts commits, so an edit to an existing architecture used to register as a
// new submission.
function architectureTimelineData(dir) {
const log = execFileSync(
'git',
[
'-C',
dir,
'log',
'--reverse',
'--format=%aI',
'--name-only',
'--diff-filter=A',
'--',
'content/en/architectures',
],
{ encoding: 'utf8' },
);
// --reverse walks oldest-first, so the first commit a directory appears
// under is the one that introduced it.
const added = new Map();
let month = null;
for (const line of log.split('\n')) {
if (!line) continue;
if (/^\d{4}-\d{2}-\d{2}T/.test(line)) {
month = line.slice(0, 7);
continue;
}
// content/en/architectures/<id>/<rest>: a path with no <rest> is a loose
// file in the root, not an architecture, and the stat card does not count
// it either.
const parts = line.split('/');
if (parts.length < 5) continue;
if (added.has(parts[3])) continue;
added.set(parts[3], month);
}
const months = {};
for (const value of added.values()) months[value] = (months[value] || 0) + 1;
let total = 0;
return Object.entries(months)
.sort(([a], [b]) => a.localeCompare(b))
.map(([date, value]) => ({ date, value: (total += value) }));
}
Verified against a local git repository built to match the test fixture exactly (two architecture directories; commits dated 2024-01-10, 2024-01-20 and a 2024-03-05 edit to an existing page):
current : [{"date":"2024-01","value":2},{"date":"2024-03","value":3}]
proposed: [{"date":"2024-01","value":2}]
The same deliverable also needs:
tests/collect-metrics.test.mjs— the pinned expectation becomes[{ date: '2024-01', value: 2 }], and the test name should say the series counts architectures added, not commits. Worth adding a case where a directory is added in two commits (page, then images) to show it is counted once.scripts/collect-metrics.mjs— the seriessourceUrlcurrently points athttps://github.com/cncf/architecture/commits/main/content/en/architectures, the commit list. Once the series counts directories, point it athttps://github.com/cncf/architecture/tree/main/content/en/architectures, the same URL the stat card uses.data/metrics.jsonis regenerated by the weekly Refresh metrics lane (.github/workflows/refresh-metrics.yml), so no hand edit is needed; the published figure corrects itself on the next run after the script change merges.
Scope
One deliverable, one PR: scripts/collect-metrics.mjs plus its test. No workflow file is involved.
The quality lane is testing-only and does not open PRs that change production scripts, so this needs a maintainer or another lane to land.
Priority
- Impact: high — a wrong number is published on a page whose stated purpose is "a transparent snapshot", and it contradicts another number on the same page
- Effort: low
Remit: corrects a figure an end user reads on /resources/metrics.
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: e7ac6e8
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88
- Lenguaje dominante
- JavaScript
- Estrellas
- 0
- Forks
- 3
- Merge medio
- 7 h 8 min
- PR fusionados (30 d)
- 565
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cncf/endusers
-
[guide] AGENTS.md claims the coverage gate, e2e and full lint run on every PR after ADR 0011 focused validationPosiblemente ocupada @hivecommons-hive la tomó hoy. Abiertoagent/guide documentation hive/claimed-by-guide stage/040-covered-by-pr
Dificultad 2/5 1-3 horas Aptitud para principiantes 81/100
cncf/endusers#2006 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[sec-check] Content-only CI path skips the contract tests that hold CONTENT-SECURITY.md to the gates it documentsPosiblemente ocupada @hivecommons-hive la tomó hoy. Abiertoagent/sec-check hive/claimed-by-sec-check security stage/040-covered-by-pr
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
cncf/endusers#2003 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[quality] Content-only CI path skips the document-contract suites that guard authored documentsPosiblemente ocupada @mrbobbytables la tomó hoy. Abiertoagent/quality stage/010-actionable testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
cncf/endusers#2002 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
a11y: search button accessible name does not contain its visible label (WCAG 2.5.3)Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertoblocked bug hive/claimed-by-scanner needs-human
Dificultad 4/5 3-5 días Aptitud para principiantes 39/100
cncf/endusers#1618 · 8 comentarios ·
Los mantenedores suelen responder en 1 día
-
🐝 Hive Advisory ReportQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertohive/advisory
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
cncf/endusers#23 · 9 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de cncf/endusers
Issues similares
-
enhancement good first issue hacktoberfest help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
BinaryBaconLabs/todo-app#18 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
44-x-y bug :beetle:
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
electron/electron#55528 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
react/react-native#59699 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100