Today — fixtures/emit documents its step language in the //! header of fixtures/emit/src/main.rs and implements it in a match a few hundred lines below. Measured on 0.10.1 the two agree exactly — 27 documented steps (grep -c '^//! --') and 27 match arms (grep -cE '^\s+"--[a-z-]+" =>') — which is precisely the moment to make the agreement permanent rather than lucky.
Why it is worth fixing — that header is the reference every test author reads, and a step added without a doc line (or renamed on one side) is invisible until someone wastes an afternoon on it. This repository already solves exactly this class of drift twice, with check-ci-gates-listed.sh (CI gates vs CONTRIBUTING §1) and check-skill-snippets.sh (skill snippets vs the crate) — so the pattern, the placement and the CI wiring are all established.
Fix — add .github/scripts/check-emit-steps.sh: extract the step names from the //! header and from the match arms, compare the two sets, and fail naming the difference in either direction. Wire it into ci.yml beside the other two checks, and list it in CONTRIBUTING §1 if it is a cargo line (a shell script is not, but read check-ci-gates-listed.sh first to see which rule applies).
Note — bash 3.2 runs on the macOS leg, so no declare -A and no GNU-only sed -i. Both existing scripts are good models.
Done when
A good first contribution: one file, no architecture decisions. Start with
CONTRIBUTING.md
— §1 lists every gate you can run locally, and §3 asks that a change land
with a test. Commits are Conventional Commits and need git commit -s
(DCO). Happy to review a draft PR early.
Today —
fixtures/emitdocuments its step language in the//!header offixtures/emit/src/main.rsand implements it in amatcha few hundred lines below. Measured on 0.10.1 the two agree exactly — 27 documented steps (grep -c '^//! --') and 27 match arms (grep -cE '^\s+"--[a-z-]+" =>') — which is precisely the moment to make the agreement permanent rather than lucky.Why it is worth fixing — that header is the reference every test author reads, and a step added without a doc line (or renamed on one side) is invisible until someone wastes an afternoon on it. This repository already solves exactly this class of drift twice, with
check-ci-gates-listed.sh(CI gates vs CONTRIBUTING §1) andcheck-skill-snippets.sh(skill snippets vs the crate) — so the pattern, the placement and the CI wiring are all established.Fix — add
.github/scripts/check-emit-steps.sh: extract the step names from the//!header and from the match arms, compare the two sets, and fail naming the difference in either direction. Wire it intoci.ymlbeside the other two checks, and list it in CONTRIBUTING §1 if it is acargoline (a shell script is not, but readcheck-ci-gates-listed.shfirst to see which rule applies).Note —
bash3.2 runs on the macOS leg, so nodeclare -Aand no GNU-onlysed -i. Both existing scripts are good models.Done when
maintoday.A good first contribution: one file, no architecture decisions. Start with
CONTRIBUTING.md
— §1 lists every gate you can run locally, and §3 asks that a change land
with a test. Commits are Conventional Commits and need
git commit -s(DCO). Happy to review a draft PR early.