refactor(seedspec): move seed spec parsing out of the campaign command

the campaign tool and the sweep tools that drive it have to read a seed specification the same way, or a sweep records an intent that differs from what ran. parseSeeds becomes seedspec.Parse with no behaviour change.
This commit is contained in:
pj committed 2026-08-16 17:44:57 +05:30
1 parent 7823f53453
commit a28178337c
3 files changed
+17 -11

No files matched your search

+3 -1
View File
@@ -15,6 +15,8 @@ import (
"strings"
"syscall"
"time"
"github.com/priyanshujain/sanderling/internal/seedspec"
)
type config struct {
@@ -118,7 +120,7 @@ func parseArguments(arguments []string, stderr io.Writer) (config, error) {
return config{}, fmt.Errorf("--run-timeout %s must exceed --duration %s, or every run is killed before it finishes",
configuration.runTimeout, configuration.duration)
}
seeds, err := parseSeeds(seedSpecification)
seeds, err := seedspec.Parse(seedSpecification)
if err != nil {
return config{}, fmt.Errorf("--seeds: %w", err)
}