Problem
Wake-word configuration is rewritten directly at its live path. An interrupted or partial write can leave malformed configuration, and the current recovery path can replace that state with empty defaults instead of preserving the last valid settings.
Evidence
- pipeline.py:329-387 reads, modifies, and directly rewrites the live wake-word configuration.
Proposed work
Validate the complete new configuration before publication. Serialize updates through one owner, write and flush a temporary file in the same directory, replace the live file atomically, and preserve the prior valid file when any step fails.
Acceptance criteria
- Start with a failing test that interrupts a configuration write and produces malformed live data.
- Failed writes leave the prior valid configuration readable.
- Concurrent updates cannot overwrite each other silently.
- The application reports success only after replacement completes.
- Malformed input is rejected without publishing empty defaults.
- Tests cover crash recovery and the supported operating systems.
Non-goals
- Changing wake-word detection behavior.
- Moving configuration to a remote service.
Problem
Wake-word configuration is rewritten directly at its live path. An interrupted or partial write can leave malformed configuration, and the current recovery path can replace that state with empty defaults instead of preserving the last valid settings.
Evidence
Proposed work
Validate the complete new configuration before publication. Serialize updates through one owner, write and flush a temporary file in the same directory, replace the live file atomically, and preserve the prior valid file when any step fails.
Acceptance criteria
Non-goals