beads/internal/validation
Kevin Glynn ffe69aaa4b
fix: promote gate to built-in type so formula pour works (#3382)
* fix: promote gate to built-in type so formula pour works (GH#3213)

bd mol pour fails with 'invalid issue type: gate' when a formula step
has a gate field. The pour pipeline creates companion beads of type
"gate", but gate was removed from the built-in types list. Since bd
gate create/check/resolve commands already hardcode IssueType("gate"),
gate should be built-in like molecule and event.

Adds TypeGate constant and includes it in IsValid(). This is the same
pattern used to re-promote molecule for swarm coordination.

Fixes #3213

* fix: update TestEventTypeValidation for gate as built-in

The test asserted gate is NOT built-in, but we promoted it. Flip the
assertion to match the new behavior.

* fix: suppress gosec G304 false positive in hookWorkTreeRoot

The path is filepath.Join(os.Getenv("GIT_DIR"), "gitdir") — reading a
well-known git internal file from a trusted environment variable set by
git itself during hook execution. Not a user-controlled file inclusion.

This false positive causes the Lint CI check to fail on every PR in
the repo, masking real lint issues.
2026-04-24 05:10:56 -07:00
..
bead.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
bead_test.go fix: promote gate to built-in type so formula pour works (#3382) 2026-04-24 05:10:56 -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