MigrationEngine contracts. It avoids Tautologies by cleanly substituting IdMappingService without mocking the engine itself. Cross-filter parsing asserts against hard-coded, predefined validation dictionaries (no Logic Mirroring). It successfully addresses @PRE negative cases (e.g. invalid zip paths, missing YAMLs) and rigorously validates @POST file transformations (e.g. in-place UUID substitutions and archive reconstruction)." }
Test Strategy: ID Synchronization and Cross-Filter Recovery
Overview
This document outlines the testing strategy for the ID synchronization and cross-filter recovery feature. The strategy focuses on ensuring that object identity remains stable across environments and that complex dashboard configurations (like cross-filters) are preserved during migration.
Testing Tiers
- CRITICAL:
IdMappingService— Tested for sync accuracy, upsert logic, and resilience to API failures. - STANDARD:
MigrationEngine— Tested for YAML transformation, ZIP orchestration, and regex-based metadata patching. - STANDARD: Migration API Routes — Tested for configuration management and data retrieval.
Methodology
- Unit Testing: Isolated logic tests for remapping and synchronization.
- E2E Orchestration: Verification of the full ZIP transformation pipeline via
test_transform_zip_end_to_end. - Contract Testing: Alignment with
@PREconditions and@TEST_DATAfixtures as defined in the semantic protocol.
Test Files
backend/tests/core/test_mapping_service.pybackend/tests/core/test_migration_engine.pybackend/src/api/routes/__tests__/test_migration_routes.py