You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Ensure existing queries continue to work during migrationdefmoduleCPGCompatibilityLayerdodefexecute_query_with_fallback(query_spec)docaseexecute_cpg_enhanced_query(query_spec)do{:ok,result}->{:ok,result}{:error,:cpg_not_available}->execute_legacy_query(query_spec){:error,_}=error->Logger.warn("CPG query failed, falling back to legacy: #{inspect(error)}")execute_legacy_query(query_spec)endendend
## Revised Test Strategy Emphasizing Production Readiness
### Update `CPG-OPUS_TESTLIST.md` with Production-Focused Tests
Add new test categories:
```markdown
### XII. Production Readiness Tests
#### Migration and Compatibility Tests
- `test "existing ElixirScope installations can upgrade without data loss"`
- `test "CPG features gracefully degrade when ETS memory limits reached"`
- `test "concurrent access to ETS tables during CPG generation is safe"`
- `test "CPG generation failure does not impact existing AST functionality"`
- `test "rollback procedures restore system to pre-CPG state successfully"`
#### Load and Stress Tests
- `test "CPG generation under memory pressure completes or fails gracefully"`
- `test "concurrent CPG queries do not cause ETS table locks or deadlocks"`
- `test "large project analysis (10k+ functions) completes within SLA"`
- `test "ETS table corruption detection and recovery procedures work"`
- `test "CPG cache eviction under memory pressure maintains query functionality"`
#### Monitoring and Observability Tests
- `test "CPG operation metrics are correctly reported to telemetry"`
- `test "ETS table size monitoring triggers appropriate alerts"`
- `test "slow CPG queries are identified and logged for optimization"`
- `test "CPG cache hit/miss ratios are tracked and reported"`
- `test "algorithm performance regressions are detected automatically"`