Skip to content

Nothing keeps the emit fixture's documented step list in sync with the steps it implements #318

Description

@vyncint

Todayfixtures/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).

Notebash 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

  • The script fails when a step is added to one side only, in both directions, and passes on main today.
  • CI runs it, and it is reproducible locally the way CONTRIBUTING §1 promises.

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions