Skip to content

ci: check cohort counts against the roster - #40

Merged
yorkerhodes3 merged 1 commit into
mainfrom
ci/content-invariants
Aug 16, 2026
Merged

ci: check cohort counts against the roster#40
yorkerhodes3 merged 1 commit into
mainfrom
ci/content-invariants

Conversation

@yorkerhodes3

Copy link
Copy Markdown
Contributor

Partially closes UPD-008.

Why

This repository has published a wrong cohort size twice:

When Symptom Actual cause
Fall 2025 card said 7 Pegi Bracaj had never been added to the roster
Summer 2026 README said "eight" roster held seven

Neither was catchable. The head-count is written by hand in four places — the roster itself, eam.researchersCount, the cohorts card, and README.md — and nothing forced them to agree. Every wrong value is a perfectly valid string, so the build and the linter were always going to pass.

That matters more than an off-by-one suggests. When prose and data disagree, there is no way to tell from inside the repository which one is wrong — whether someone typo'd the number, or whether a real person is missing from the roster. The two have opposite fixes, and one of them quietly erases a researcher from the public site.

What

scripts/check-content-invariants.mjs, run in CI as npm run check:content. It imports the real site.ts exports rather than parsing text — Node 24 strips the types natively, and the module has no imports of its own — and asserts:

  • each cohort card's "N researchers" matches the roster for that term;
  • team.researchersCount matches the current cohort;
  • the README's prose count matches the current cohort;
  • no two people share a /team/[slug].

Verification

Seeded four faults; each fails with a message naming the file and both numbers:

Seeded fault Result
README says "eight" (the actual bug) exit 1 — README.md says "eight applied researchers", but the Summer 2026 roster holds 7 (seven).
cohort card count stale exit 1 — flags both the card and researchersCount
researcher moved between terms exit 1 — flags all four surfaces at once
two people share a slug exit 1 — slug "yago-rocha" is used by two different people

Clean tree passes: Content invariants OK (3 cohorts, 23 researcher records). Current counts audited and all correct — Summer 2026: 7, Fall 2025: 8, Spring 2025: 8.

Also green on this branch: eslint 0, tsc --noEmit 0, sync:static leaves the snapshot in sync.

One thing reviewers should know

The CI job name is deliberately unchanged. Lint, typecheck, build, snapshot is the exact context the branch ruleset requires. Renaming it to mention the new step would silently detach the gate — the required check would never report, and merges would hang. The step was added inside the existing job instead.

This repository has published a wrong cohort size twice. The Fall 2025 card
read seven when the roster should have held eight, because Pegi Bracaj had
never been added. The README read "eight applied researchers" against a Summer
2026 roster of seven.

Neither was catchable. The head-count is written by hand in four places - the
roster itself, team.researchersCount, the cohorts card, and the README - and
nothing forced them to agree. Every wrong value is a valid string, so the build
and the linter were always going to pass.

Adds scripts/check-content-invariants.mjs, run in CI as `npm run check:content`.
It imports the real site.ts exports rather than parsing text (Node 24 strips
the types natively, and the module has no imports of its own) and asserts:

- each cohort card's "N researchers" matches the roster for that term;
- team.researchersCount matches the current cohort;
- the README's prose count matches the current cohort;
- no two people share a /team/[slug].

Verified against four seeded faults - a wrong README number word, a stale
cohort card, a researcher moved between terms, and two people sharing a slug -
each failing with a message naming the file and both numbers. The current tree
passes.

The CI job name is deliberately unchanged: it is the context the branch ruleset
requires, so renaming it would silently detach the gate.

Partially closes UPD-008. Route reachability, base-path asset references, and
publication anchors are still uncovered.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@yorkerhodes3
yorkerhodes3 merged commit 07d11db into main Aug 16, 2026
1 check passed
@yorkerhodes3
yorkerhodes3 deleted the ci/content-invariants branch August 16, 2026 03:23
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.

2 participants