Release rail: component counts, and which identity announces

Playground for PR "fix(release): real component counts, and a machine account on announce" · 2026-08-14

The defect. changelog-to-props.mjs defaulted statsBefore/statsAfter to {0,0,0} and only filled them from a Skill count: 197 → 199 regex that release-please changelogs never emit. That script also feeds release-video.yml, so the zeros reached the rendered release videos, not just the announce payload.

Toggle the fix

Same input changelog, both code paths. These are the real values produced locally.

0
skills — wrong
36
agents — right by luck
0
hooks — wrong
statsBefore: {"skills":0,"agents":36,"hooks":0}
statsAfter : {"skills":0,"agents":36,"hooks":0}

Why the manifest, and not a filesystem walk

Several sources were plausible. Only one is already CI-gated.

SourceVerdictReason
manifests/ork.json description chosen Already asserted against the filesystem by bin/validate-counts.sh, so a green CI makes it correct by construction. One JSON read, no shell-out.
filesystem walkno Correct, but duplicates the counting rules (skip shared/, exclude README/INDEX/CONTRIBUTING, hooks need bin/count-hooks.sh). Two implementations drift.
shared-data.ts TOTALSno Right numbers, but it is TypeScript and this is a plain .mjs script. Reading it means regexing a generated TS file.
the changelogno The original approach. Release-please never writes a count delta, which is the entire bug.

The fallback that was deleted, not ported

agents looked correct the whole time. It was luck.

// removed in this PR
const allAgentMentions = [...fullText.matchAll(/(\d+)\s+agents/g)];
// ...count frequency, take the most frequent value >= 20
landscape.statsBefore.agents = count;   // guessed a CURRENT total
landscape.statsAfter.agents  = count;   // from HISTORICAL prose

It scanned the whole changelog and picked the most common "N agents" mention. It returned 36, which is right, but only because the agent count has been stable for months. One release that changed the count would have produced a stale number with no signal that anything was wrong.