Unify validated configuration, schema migration, and secret handling
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Parent: #6
Depends on the service-boundary issue listed in #6 and should complete before the release gate.
## Problem
Configuration is split across hard-coded defaults, CLI flags, environment variables, partial YAML loading, policy defaults, and a `config.example.yaml` that still describes parts as future behavior.
## Scope
- define one typed effective configuration for database, runner, worker, Telegram transport/control, voice, policy, output retention, notifications, and logging;
- define and test precedence: defaults < YAML < environment < CLI;
- validate cross-field constraints, including approvals requiring PTY and one polling owner;
- keep bot tokens and other secrets environment-only or secret-provider-only;
- add versioned, idempotent SQLite migrations for new runtime tables/columns;
- add a safe effective-config diagnostic that redacts secrets;
- preserve current environment variable names through a documented compatibility window.
## Acceptance criteria
- [ ] All production runtime components receive validated configuration rather than reading environment variables ad hoc.
- [ ] Invalid combinations fail before the daemon or worker starts.
- [ ] Existing installations migrate without data loss.
- [ ] Migration tests cover empty, current, partially migrated, and repeated-upgrade databases.
- [ ] Effective config can be inspected with secrets redacted.
- [ ] `config.example.yaml`, README, setup guide, and configuration reference describe actual behavior.
- [ ] Backward compatibility and deprecation rules are documented.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with parent issue #6 and its service-boundary issue, then audit the configuration sources named here, including config.example.yaml, README, setup guide, and configuration reference. Map the runtime components, migration paths, and existing environment variable names before making changes. Done means validated precedence and cross-field checks, safe idempotent migrations, redacted diagnostics, and documentation that matches actual behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlite
- Domain
- backend, databases, documentation, security
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100