Skip to content

fix: allow ballot sub-kinds (yay/nay/pass) in operation kind validation#755

Merged
jevonearth merged 1 commit intoecadlabs:mainfrom
vch9:fix/ballot-sub-kinds-validation
Mar 3, 2026
Merged

fix: allow ballot sub-kinds (yay/nay/pass) in operation kind validation#755
jevonearth merged 1 commit intoecadlabs:mainfrom
vch9:fix/ballot-sub-kinds-validation

Conversation

@vch9
Copy link
Copy Markdown
Contributor

@vch9 vch9 commented Feb 23, 2026

Hey, while debugging ecadlabs/gotez#13 I noticed this regression between 1.3.0 and 1.3.1. I used git bisect and it came down to #657.


Note

Low Risk
Small, localized change to configuration validation plus tests; low risk aside from potentially changing behavior for configs that previously (incorrectly) used : in operation kinds.

Overview
Fixes policy validation to accept ballot sub-kinds in allow.generic using ballot:yay, ballot:nay, and ballot:pass syntax, while still rejecting kind:subkind for non-ballot operations and invalid ballot values.

Adds unit tests for the new ballot sub-kind validation, including negative cases for invalid sub-kinds and unsupported op:sub formats.

Written by Cursor Bugbot for commit ecbdc35. This will update automatically on new commits. Configure here.

- Fixes operation kind validation to allow ballot:yay, ballot:nay, and ballot:pass in allow.generic config
- These are valid signatory-specific sub-kind values for granular ballot policy control
- Validation splits on ':', validates base operation, and strictly validates ballot suffixes
- Sub-kind syntax on non-ballot operations is rejected
- Added 5 new test cases to TestOperationKindCheck
@jevonearth jevonearth merged commit 3c613ee into ecadlabs:main Mar 3, 2026
1 check passed
@jevonearth
Copy link
Copy Markdown
Contributor

Thank you for the contribution @vch9 !

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.

3 participants