Refactor validators into package-owned components

This commit is contained in:
2026-05-14 00:28:28 +00:00
parent 3b160cf05b
commit 52ffe42e73
26 changed files with 775 additions and 98 deletions

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"gitea.maximumdirect.net/eric/audita/internal/framework/contracts"
frameworkvalidators "gitea.maximumdirect.net/eric/audita/internal/framework/validators"
"gitea.maximumdirect.net/eric/audita/internal/validators/protected_terms"
)
var builtInChains = map[string][]string{
@@ -70,7 +70,10 @@ func ResolveBuiltInChain(moduleKey string, registry *Registry) ([]contracts.Vali
if moduleKey == "glossary" && key == KeyProtectedTerms {
// Glossary stages preserve current stricter protection semantics while
// reporting the stable protected_terms key.
v := frameworkvalidators.GlossaryStageProtectedGlossaryTermValidator{}
v, buildErr := protected_terms.NewGlossaryStage()
if buildErr != nil {
return nil, buildErr
}
out = append(out, v)
continue
}