Problem
The generator already ships a validation mode — generator/src/cli.rs exposes --validate (Mode::Validate) and generator/src/validate.rs implements the checks (duplicate package names/paths, hook path traversal, etc., per the closed issues #70/#71). But action.yml never uses it: the "Generate fixtures" step (lines 56-63) jumps straight to generate-fixtures --definitions ... --output ....
Why it matters
When a consumer passes a malformed definitions directory, generation fails partway through with a generation-time error rather than an upfront validation error that names the offending file and the specific problem. Validation exists precisely to give that clear signal, and the CLI flag is documented (README directory-structure note for validate.rs), yet the Action — the primary entry point for consumers — bypasses it.
Proposed approach
- Add a step in
action.yml before "Generate fixtures" that runs generate-fixtures --validate --definitions "${{ inputs.definitions }}" and fails the job on a non-zero exit.
- Keep it cheap: same already-built release binary, no extra build.
Acceptance criteria
action.yml validates definitions before generating.
- A definitions dir that fails validation surfaces the validation error and stops the job before generation runs.
Problem
The generator already ships a validation mode —
generator/src/cli.rsexposes--validate(Mode::Validate) andgenerator/src/validate.rsimplements the checks (duplicate package names/paths, hook path traversal, etc., per the closed issues #70/#71). Butaction.ymlnever uses it: the "Generate fixtures" step (lines 56-63) jumps straight togenerate-fixtures --definitions ... --output ....Why it matters
When a consumer passes a malformed definitions directory, generation fails partway through with a generation-time error rather than an upfront validation error that names the offending file and the specific problem. Validation exists precisely to give that clear signal, and the CLI flag is documented (README directory-structure note for
validate.rs), yet the Action — the primary entry point for consumers — bypasses it.Proposed approach
action.ymlbefore "Generate fixtures" that runsgenerate-fixtures --validate --definitions "${{ inputs.definitions }}"and fails the job on a non-zero exit.Acceptance criteria
action.ymlvalidates definitions before generating.