Skip to content

fix(config): enforce run_policy/on_failure/retries validation on the validate block#589

Merged
joshua-temple merged 1 commit into
mainfrom
fix/validate-block-validation
Jul 16, 2026
Merged

fix(config): enforce run_policy/on_failure/retries validation on the validate block#589
joshua-temple merged 1 commit into
mainfrom
fix/validate-block-validation

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

The manifest validate callback block skipped the run_policy/on_failure enum and retries-bound checks the deploy block enforces, so an invalid enum in a validate block was silently accepted and emitted.

Extracts a shared validateCallbackPolicy helper (run_policy: default/always/force; on_failure: abort/continue; retries 0..3) and routes build/deploy/validate through it, removing three duplicated inline blocks. Pure validation-tightening; generated output unchanged; build/deploy messages unchanged.

Verification: build/-race/lint green, 3056 tests; TestValidate_ValidateBlockPolicyParity covers the four previously-fail-open invalid cases (fail-before/pass-after).

…date block

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple joshua-temple merged commit 1ea0998 into main Jul 16, 2026
21 checks passed
@joshua-temple joshua-temple deleted the fix/validate-block-validation branch July 16, 2026 00:07
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.

1 participant