The internal/config package has 23% test coverage. Only ClassifyTargets() and related PSL logic are tested. The main configuration loading path is untested.
What is Untested
New() — the main config constructor
buildConfig() — reading from Viper, interval parsing, fallback defaults
Nice-to-have for 1.0. The config code is simple and works correctly in practice, but should be tested before claiming production readiness.
## Problem
The `internal/config` package has **23% test coverage**. Only `ClassifyTargets()` and related PSL logic are tested. The main configuration loading path is untested.
## What is Untested
- `New()` — the main config constructor
- `buildConfig()` — reading from Viper, interval parsing, fallback defaults
- `setupViper()` — env prefix binding, default values
- `parseCSV()` — CSV string parsing
- `configureDebugLogging()` — debug mode activation
- `StatePath()` — path construction
- Invalid interval strings (e.g., `DNSWATCHER_DNS_INTERVAL=banana`)
- Config file loading and precedence
## Why This Matters
Configuration is the user's primary interface to the daemon. Untested config paths mean:
- Silent fallback to defaults on typos
- Potentially accepting invalid values without warning
- Undiscovered parsing edge cases
## Recommendation
Add tests covering:
1. Default values are correct
2. Environment variable overrides work
3. Invalid duration strings fall back to defaults (and ideally warn)
4. `parseCSV` edge cases (trailing commas, whitespace, empty strings)
5. `StatePath` returns expected path
## Category
Nice-to-have for 1.0. The config code is simple and works correctly in practice, but should be tested before claiming production readiness.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
The
internal/configpackage has 23% test coverage. OnlyClassifyTargets()and related PSL logic are tested. The main configuration loading path is untested.What is Untested
New()— the main config constructorbuildConfig()— reading from Viper, interval parsing, fallback defaultssetupViper()— env prefix binding, default valuesparseCSV()— CSV string parsingconfigureDebugLogging()— debug mode activationStatePath()— path constructionDNSWATCHER_DNS_INTERVAL=banana)Why This Matters
Configuration is the user's primary interface to the daemon. Untested config paths mean:
Recommendation
Add tests covering:
parseCSVedge cases (trailing commas, whitespace, empty strings)StatePathreturns expected pathCategory
Nice-to-have for 1.0. The config code is simple and works correctly in practice, but should be tested before claiming production readiness.
Closing: completed by PR #81 (merged).