Problem
The Config.Validate() method always returns nil, making it a no-op.
Evidence
config.go:150-157
func (c *Config) Validate() error {
if _, err := os.Stat(c.ProjectsDir); os.IsNotExist(err) {
return nil // Not an error - returns nil even when dir doesn't exist
}
return nil // Always nil
}
The method is named Validate but doesn't validate anything - it always returns nil regardless of input.
Impact
- Misleading API - callers expect validation to occur
- Future maintainers might add calls to
Validate() expecting it to work
- Defensive programming relies on validation actually validating
Suggested Fix
Either:
- Make it validate something useful, such as:
- Check if
ClaudeBin exists and is executable
- Verify
DBPath parent directory is writable
- Validate
Backend is a known value
- Remove the method entirely if validation isn't needed
Files: internal/config/config.go:150-157
Problem
The
Config.Validate()method always returns nil, making it a no-op.Evidence
config.go:150-157
The method is named
Validatebut doesn't validate anything - it always returns nil regardless of input.Impact
Validate()expecting it to workSuggested Fix
Either:
ClaudeBinexists and is executableDBPathparent directory is writableBackendis a known valueFiles:
internal/config/config.go:150-157