feat(F-004): typed fail-fast config and feature flag module
- loadConfig: pure over env object, accumulates all problems, names var names only - DATABASE_URL now required at startup; PORT/HOST/LOG_LEVEL/NODE_ENV/REDIS_URL defaulted - flags module behind FeatureFlagProvider; unknown flags OFF; runtime setEnabled (no redeploy) - buildApp decorates app.flags; server.ts fail-fast before app boot - tests caught and fixed flag-store case-normalization bug before gates - zero new dependencies; all gates approved; verify.sh green
This commit is contained in:
10
specs/F-004-config-flags/TASKS.md
Normal file
10
specs/F-004-config-flags/TASKS.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# TASKS — F-004 Typed config and feature flags
|
||||
|
||||
- [ ] TASK-001 src/infrastructure/config/config.ts: AppConfig, ConfigError, loadConfig (pure over env object)
|
||||
- [ ] TASK-002 src/infrastructure/config/tests/config.test.ts: required/optional/invalid cases
|
||||
- [ ] TASK-003 src/modules/flags/domain/feature-flag-store.ts: FeatureFlagProvider + InMemoryFeatureFlagStore + createFlagStore
|
||||
- [ ] TASK-004 src/modules/flags/index.ts: public API
|
||||
- [ ] TASK-005 src/modules/flags/tests/feature-flag-store.test.ts: guard + runtime mutation
|
||||
- [ ] TASK-006 src/app/build-app.ts: optional flags dep
|
||||
- [ ] TASK-007 src/infrastructure/http/server.ts: loadConfig, typed listen, ConfigError exit
|
||||
- [ ] TASK-008 run lint + boundaries + typecheck + build + test + verify.sh
|
||||
Reference in New Issue
Block a user