Skip to content

feat(action): validate definitions before generating - #252

Merged
BryanFRD merged 2 commits into
mainfrom
feat/121-validate-before-generate
Oct 17, 2026
Merged

BryanFRD merged 2 commits into
mainfrom
feat/121-validate-before-generate

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Closes #121

The action now runs generate-fixtures --validate before generating, so a bad definitions dir fails with the named file and problem instead of partway through generation. CI also validates fixtures/examples so the step is exercised.

Question: a consumer definition that generates today but fails validation (duplicate package names/paths, path traversal in hooks) will now fail their job. I did not treat that as breaking since that is the point of the issue, but please confirm before merge. Auto-merge is off.

@BryanFRD

Copy link
Copy Markdown
Contributor Author

Open question: OK to start failing consumer jobs whose definitions generate but fail validation? If not, this needs to be warn-only.

Comment thread action.yml Fixed

@ferrfleet-interne ferrfleet-interne Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--validate is already supported by the CLI (cli.rs), and it exits 1 on invalid definitions (main.rs), so both new steps fail fast as intended. One nit inline about input interpolation.

Comment thread action.yml Outdated

@ferrfleet-interne ferrfleet-interne Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e27fc0b passes definitions to the Validate step through env, which settles the earlier nit. The new commit breaks nothing.

@BryanFRD
BryanFRD merged commit 5192842 into main Oct 17, 2026
17 of 22 checks passed
@BryanFRD
BryanFRD deleted the feat/121-validate-before-generate branch October 17, 2026 10:18
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.

feat(action): run --validate before generating so bad definitions fail fast

2 participants