Fail fast on invalid dedupe TTL strings
Context
While tweaking dedupe settings, I mistyped a duration (e.g., 10xs), and the runner quietly fell back to a 24h TTL. I only caught it by reading logs and realizing dedupes lasted way longer than intended.
Problem
Runner.NewRunner parses dedupe.ttl but only applies it when parsing succeeds, otherwise silently using the default. Invalid TTL strings are never reported.
Expected behavior
Supplying an invalid TTL string should fail runner construction (or validation) with a clear error. Valid TTL strings should continue to work.
Scope / non-goals
Don’t redesign the dedupe feature or change the default TTL; just surface bad config early.
Acceptance criteria
Hints
Consider parsing in internal/config/config.go or propagating the error from NewRunner. Tests can live in internal/config and/or internal/engine. Run go test ./internal/config and go test ./internal/engine.
Fail fast on invalid dedupe TTL strings
Context
While tweaking dedupe settings, I mistyped a duration (e.g.,
10xs), and the runner quietly fell back to a 24h TTL. I only caught it by reading logs and realizing dedupes lasted way longer than intended.Problem
Runner.NewRunnerparsesdedupe.ttlbut only applies it when parsing succeeds, otherwise silently using the default. Invalid TTL strings are never reported.Expected behavior
Supplying an invalid TTL string should fail runner construction (or validation) with a clear error. Valid TTL strings should continue to work.
Scope / non-goals
Don’t redesign the dedupe feature or change the default TTL; just surface bad config early.
Acceptance criteria
dedupe.ttlstrings cause runner setup/validation to return an error.Hints
Consider parsing in
internal/config/config.goor propagating the error fromNewRunner. Tests can live ininternal/configand/orinternal/engine. Rungo test ./internal/configandgo test ./internal/engine.