mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
Implements the ability to mirror local requests to the official Bose Cloud in the background, allowing for real-time comparison and parity analysis between the emulated service and the original backend. Core Changes: - Implement `MirrorMiddleware` for asynchronous and synchronous mirroring. - Add `Parity Logger` to detect discrepancies in status, headers, and body. - Implement storage for parity mismatches in `data/parity_mismatches/`. - Add `Internal Paths` configuration to exclude management traffic from logs. Web UI & API: - Add "Parity & Mirroring" tab to the Web UI for discrepancy analysis. - Integrated "Internal Paths" configuration in Settings. - Add "mirror" category filter to the Interactions UI. - Implement endpoints for listing and clearing parity mismatches. Infrastructure & Tools: - Extend `setup.Manager` with `HTTPGet` override for reliable testing. - Add CLI flags `--mirror-enabled`, `--mirror-endpoints`, and `--internal-paths`. - Update `datastore.Settings` to persist mirroring and internal path configurations. Tests: - Add `pkg/service/handlers/mirror_test.go` for middleware verification. - Update `TestProxySettingsAPI` and `TestRecordMiddleware` for new settings. - Refactor `TestMigrationAndCA` to use mocked network calls (30x speedup).