# Test Coverage Matrix: ID Synchronization and Cross-Filter Recovery

| Component | Path | Type | Test File | Status | TIER | Coverage Notes |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| **IdMappingService** | `backend/src/core/mapping_service.py` | Backend Core | `backend/tests/core/test_mapping_service.py` | ✅ PASS | CRITICAL | Comprehensive coverage of upsert logic, remote ID retrieval, empty database handling, and integration with `SupersetClient`. |
| **MigrationEngine** | `backend/src/core/migration_engine.py` | Backend Core | `backend/tests/core/test_migration_engine.py` | ✅ PASS | STANDARD | Covers double import strategy orchestration, YAML dictionary extraction, ZIP file manipulation (extracting, regex-patching metadata, repacking), and error handling logic. |
| **Migration Routes** | `backend/src/api/routes/migration.py` | API Routers | `backend/src/api/routes/__tests__/test_migration_routes.py` | ✅ PASS | STANDARD | API contract tests covering Cron config endpoint behavior, environment orchestration via `IdMappingService`, failure arrays, database mapping offsets/searches, and SQLAlchemy Session configurations using in-memory SQLite mocks. |
| **Migration Dashboard** | `frontend/src/routes/migration/+page.svelte` | Frontend UX | `frontend/src/routes/migration/__tests__/migration_dashboard.ux.test.js` | ✅ PASS | STANDARD | UX contract tests verifying validation blocks to prevent migrations without explicit environment selections and testing checkbox properties. |
| **Settings Dashboard** | `frontend/src/routes/settings/+page.svelte` | Frontend UX | `frontend/src/routes/settings/__tests__/settings_page.integration.test.js` | ✅ PASS | CRITICAL | Integration tests validating dynamic loading of mapping schedules, verification of correct headers representing migration settings, and verifying UI handles synchronous API execution endpoints (Sync Now). |

## Summary
- **Total Components Audited**: 5
- **Tests Covering Core/API Backed**: 35 (approx.)
- **Tests Covering Svelte Frontend**: 5
- **Pass Rate**: 100%
