Phase 2: Duo-Assisted Flaky Test Issue Investigation
## Summary Enhance the automated flaky test detection system ([Phase 1](https://gitlab.com/gitlab-org/container-registry/-/issues/1737)) with GitLab Duo to provide intelligent analysis, root cause suggestions, and identification of related issues. Duo acts as the "first responder" after issues are created, reducing manual investigation effort. ## Motivation Phase 1 provides excellent data capture and occurrence tracking, but engineers still face challenges: - **Manual investigation:** Each flaky test requires time to understand the root cause - **No context:** Engineers start from scratch when investigating each failure - **Duplicate effort:** Similar failures investigated independently by different engineers AI-assisted analysis can: - Provide initial assessment of likely root causes - Identify related issues with similar failure patterns - Suggest investigation steps based on error patterns - Reduce time-to-resolution for flaky tests - **(future iteration)**: add 1 test failure issue with high priority to the next milestone and assign enginners to the issue in a round robin fashion ## Proposal ### Overview Build on Phase 1's deterministic tracking by adding GitLab Duo as an intelligent first responder: 1. Automatically tag Duo when issues are created/updated 2. Duo analyzes failure logs and compares against existing issues 3. Duo provides root cause assessment and investigation recommendations 4. Engineers review Duo's analysis to expedite resolution **Key Design Decision:** Duo analyzes issues **after creation**, not before. This ensures: - No data loss if Duo fails or is unavailable - Phase 1 continues working independently - Easier debugging of Duo's analysis quality - Gradual improvement based on real data
issue