mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-27 18:22:41 -08:00
1.6 KiB
1.6 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, priority
| id | title | status | assignee | created_date | updated_date | labels | dependencies | priority | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-69 | Harden legacy config migration validation and deprecation handling | To Do | 2026-02-18 11:35 | 2026-02-18 11:35 |
|
high |
Description
src/config/service.ts still applies many legacy ankiConnect keys via unchecked casts (as string|number|boolean) in the mapLegacy block. Invalid legacy values can enter resolved runtime config without warnings and break downstream behavior.
Action Steps
- Inventory every legacy key currently handled in
mapLegacy. - Replace unchecked assignment with typed validators (
asString,asNumber,asBoolean, enum guards). - Emit deprecation warnings for accepted legacy keys and validation warnings for invalid values.
- Preserve backward compatibility for valid legacy configs.
- Add regression tests for invalid legacy value types and accepted legacy values.
- Update configuration docs with migration/deprecation notes.
Acceptance Criteria
- #1 No legacy key path writes directly to resolved config without type validation
- #2 Invalid legacy values produce warnings and safe fallback behavior
- #3 Valid legacy configs still map to equivalent resolved config
- #4 Config test suite includes legacy-invalid regression coverage
Definition of Done
- #1
bun run test:config:distpasses - #2 Any doc changes for migration/deprecation are committed