feat(doctor): add configuration value validation (bd-alz)

Add a new Config Values check to bd doctor that validates:
- flush-debounce: must be a valid duration (e.g., 30s, 1m)
- issue-prefix: must start with letter, alphanumeric with dashes/underscores
- routing.mode: must be auto, maintainer, or contributor
- sync-branch: must be a valid git branch name
- routing paths: warns if configured paths do not exist
- metadata.json database: should be filename (not path), with db extension
- metadata.json jsonl_export: should have .jsonl extension
- deletions_retention_days: must be non-negative if set

This catches misconfigurations before they cause runtime errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-03 10:31:50 -08:00
parent 8d4f664b91
commit a4163e42e7
3 changed files with 477 additions and 0 deletions

View File

@@ -581,6 +581,11 @@ func runDiagnostics(path string) doctorResult {
result.OverallOK = false
}
// Check 7a: Configuration value validation (bd-alz)
configValuesCheck := convertDoctorCheck(doctor.CheckConfigValues(path))
result.Checks = append(result.Checks, configValuesCheck)
// Don't fail overall check for config value warnings, just warn
// Check 8: Daemon health
daemonCheck := checkDaemonStatus(path)
result.Checks = append(result.Checks, daemonCheck)