beads/internal/validation
Kevin Glynn 4e32258c9a
fix(create): normalize trailing hyphen in dbPrefix before prefix validation (#4233)
ValidateIDPrefixAllowed compared the raw dbPrefix against id via HasPrefix(id, dbPrefix+"-"), so a config.issue_prefix stored with a trailing hyphen (e.g. "bd-") produced "bd--" and threw a false "prefix mismatch" on bd create. The allowedPrefixes branch already normalized each entry with TrimSuffix(allowed, "-"); this applies the same normalization to dbPrefix. Also fixes the error message (shows 'bd-' not 'bd--'). Adds trailing-hyphen regression cases.

Fixes #4208

Co-authored-by: kevglynn <kevglynn@users.noreply.github.com>
2026-06-16 10:21:06 -07:00
..
bead.go fix(create): normalize trailing hyphen in dbPrefix before prefix validation (#4233) 2026-06-16 10:21:06 -07:00
bead_test.go fix(create): normalize trailing hyphen in dbPrefix before prefix validation (#4233) 2026-06-16 10:21:06 -07:00
issue.go feat: epic close guards, merge re-parenting, and progress display 2026-03-10 17:33:13 -07:00
issue_test.go feat: epic close guards, merge re-parenting, and progress display 2026-03-10 17:33:13 -07:00
template.go fix: --validate checks --acceptance field, add validation.on-close config (PR #2654) 2026-03-18 22:21:23 -07:00
template_test.go fix: --validate checks --acceptance field, add validation.on-close config (PR #2654) 2026-03-18 22:21:23 -07:00