fix: --validate checks --acceptance field, add validation.on-close config#2654
Closed
seanmartinsmith wants to merge 1 commit intosteveyegge:mainfrom
Closed
Conversation
60d1af7 to
0391aa4
Compare
…nfig Three fixes for validation consistency: 1. bd create --validate now uses LintIssue() instead of ValidateTemplate(), bringing it to parity with bd lint. A non-empty --acceptance field now satisfies the "Acceptance Criteria" requirement without needing the heading in --description. (GH#2468 parity) 2. --dry-run no longer bypasses --validate. Validation now runs before the dry-run exit, so users get feedback on template issues during preview. 3. New validation.on-close config option (none|warn|error, default: none). When enabled, warns on terse close reasons (<20 chars) or default "Closed" reasons. Mirrors existing validation.on-create pattern. Does not block any workflow unless explicitly set to error.
0391aa4 to
cbbad52
Compare
Contributor
Author
|
related: #2664 surfaces the quality/lifecycle commands in prime output and the beads-section template, plus adds doctor --check=conventions |
4 tasks
steveyegge
added a commit
that referenced
this pull request
Mar 19, 2026
…nfig (PR #2654) Three fixes for validation consistency: 1. bd create --validate now uses LintIssue() instead of ValidateTemplate(), bringing it to parity with bd lint. A non-empty --acceptance field now satisfies the "Acceptance Criteria" requirement without needing the heading in --description. (GH#2468 parity) 2. --dry-run no longer bypasses --validate. Validation now runs before the dry-run exit, so users get feedback on template issues during preview. 3. New validation.on-close config option (none|warn|error, default: none). When enabled, warns on terse close reasons (<20 chars) or default "Closed" reasons. Mirrors existing validation.on-create pattern. Co-Authored-By: seanmartinsmith <114885497+seanmartinsmith@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Owner
|
Fix-merged to main in 63432ac. Rebased onto current main (resolved config.go conflict from sync.mode cleanup). All validation tests pass. Thanks @seanmartinsmith — clean work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Unifies --validate with LintIssue() so the --acceptance field is recognized
(#2468 parity), fixes --dry-run silently bypassing --validate, and adds
validation.on-close config for terse close reason warnings.
Context
#1472 and #2468 fixed the acceptance field gap in bd lint, but --validate
still used the old ValidateTemplate() path - same bug, different entry point.
this unifies them so both go through LintIssue(). no new validation logic,
just one code path instead of two.
found while dogfooding on 85+ beads: --acceptance was never used because
--validate didn't recognize it, and 26% of close reasons were terse
one-liners ("done", "fixed"). validation.on-close follows the existing
validation.on-create pattern - defaults to off, warn mode doesn't block.
separate from the alias approach in #2638/#2639 (which makes wrong commands
work) - this fixes the validation path so the existing flags work correctly.
also noticed --dry-run completely skips --validate due to an early return.
moved validation before the dry-run exit so users get feedback during preview.
Test plan