Finish the D&D module cleanup

This commit is contained in:
2026-07-25 13:30:23 +00:00
parent aeaaf44ae0
commit 29ee68824d
14 changed files with 76 additions and 366 deletions

View File

@@ -45,7 +45,7 @@ func (v *Validator) CheckpointFingerprints() []pipeline.CheckpointFingerprint {
}
func (v *Validator) Validate(_ context.Context, req contracts.TypedValidationRequest[dnd.SceneDescriptionList]) (contracts.ValidationResult, error) {
if shape.Validate(req.Value) != nil || !sourceRefsValid(req.Source, req.Value) {
if shape.Validate(req.Value) != nil {
return contracts.ValidationResult{Approved: true}, nil
}
resolver, err := shared.NewCitationResolver(req.Source)
@@ -72,15 +72,6 @@ func (v *Validator) Validate(_ context.Context, req contracts.TypedValidationReq
}, nil
}
func sourceRefsValid(doc *source.SourceDocument, value dnd.SceneDescriptionList) bool {
for _, scene := range value.Scenes {
if source.ValidateRef(doc, scene.SourceRef) != nil {
return false
}
}
return true
}
func tokenSet(value string) map[string]struct{} {
tokens := make(map[string]struct{})
for _, token := range shared.NormalizedTokens(value) {