Updated audita configuration to reflect the new audita public CLI
All checks were successful
ci/woodpecker/tag/release Pipeline was successful
All checks were successful
ci/woodpecker/tag/release Pipeline was successful
This commit is contained in:
@@ -200,15 +200,12 @@ func validateAudita(cfg AuditaConfig) error {
|
||||
if err := validateDuration("pipeline.audita.timeout", cfg.Timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
if len(cfg.Modules) == 0 {
|
||||
return fmt.Errorf("pipeline.audita.modules must include at least one module")
|
||||
}
|
||||
for i, mod := range cfg.Modules {
|
||||
m := strings.TrimSpace(mod)
|
||||
if m == "" {
|
||||
for i, m := range cfg.Modules {
|
||||
module := strings.TrimSpace(m)
|
||||
if module == "" {
|
||||
return fmt.Errorf("pipeline.audita.modules[%d] must be non-empty", i)
|
||||
}
|
||||
switch m {
|
||||
switch module {
|
||||
case "glossary", "homophones", "spoken_word", "grammar":
|
||||
default:
|
||||
return fmt.Errorf("pipeline.audita.modules[%d] must be one of: glossary, homophones, spoken_word, grammar", i)
|
||||
@@ -226,18 +223,31 @@ func validateAudita(cfg AuditaConfig) error {
|
||||
if strings.TrimSpace(cfg.Model) == "" {
|
||||
return fmt.Errorf("pipeline.audita.model is required")
|
||||
}
|
||||
if cfg.LLMConcurrency == nil {
|
||||
return fmt.Errorf("pipeline.audita.llm_concurrency must be set (defaults should populate this)")
|
||||
if cfg.TotalLLMConcurrency != nil && *cfg.TotalLLMConcurrency <= 0 {
|
||||
return fmt.Errorf("pipeline.audita.total_llm_concurrency must be > 0")
|
||||
}
|
||||
if *cfg.LLMConcurrency <= 0 {
|
||||
return fmt.Errorf("pipeline.audita.llm_concurrency must be > 0")
|
||||
if cfg.ProposalLLMConcurrency != nil && *cfg.ProposalLLMConcurrency <= 0 {
|
||||
return fmt.Errorf("pipeline.audita.proposal_llm_concurrency must be > 0")
|
||||
}
|
||||
if cfg.ValidationLLMConcurrency == nil {
|
||||
return fmt.Errorf("pipeline.audita.validation_llm_concurrency must be set (defaults should populate this)")
|
||||
}
|
||||
if *cfg.ValidationLLMConcurrency <= 0 {
|
||||
if cfg.ValidationLLMConcurrency != nil && *cfg.ValidationLLMConcurrency <= 0 {
|
||||
return fmt.Errorf("pipeline.audita.validation_llm_concurrency must be > 0")
|
||||
}
|
||||
if strings.TrimSpace(cfg.TranscriptDescription) == "" && cfg.TranscriptDescription != "" {
|
||||
return fmt.Errorf("pipeline.audita.transcript_description must be non-empty when provided")
|
||||
}
|
||||
if strings.TrimSpace(cfg.ConfigPath) == "" && cfg.ConfigPath != "" {
|
||||
return fmt.Errorf("pipeline.audita.config_path must be non-empty when provided")
|
||||
}
|
||||
switch strings.TrimSpace(cfg.OutputSchema) {
|
||||
case "", "bare-segments", "audita-v1":
|
||||
default:
|
||||
return fmt.Errorf("pipeline.audita.output_schema must be one of: bare-segments, audita-v1")
|
||||
}
|
||||
switch strings.TrimSpace(cfg.WorkDirRetention) {
|
||||
case "", "always", "auto", "never":
|
||||
default:
|
||||
return fmt.Errorf("pipeline.audita.work_dir_retention must be one of: always, auto, never")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user