MR Cycle Time Track: Optimize MR review processes and workflow automation
## Context This Track EPIC is part of [the MR Cycle Time Project](https://gitlab.com/groups/gitlab-org/-/epics/16026). ## Problem statements From [the developer interviews](https://gitlab.com/gitlab-org/gitlab/-/issues/508116), it is highlighted that **_Merge Request Review Time_** is currently thought to be the biggest contributing factor to cycle time. The associated problem statements - 1. Code review tooling not matching the latest MR design, this can result in choosing reviewers that are not best suited for the MR. 2. Prolonged "warm-up" time for reviewers to respond to MRs. This can be caused by a mix of * context switch * lack of context if reviewer is unfamiliar with the domain * timezone differences * waiting for a long pipeline This effort will require significant involvement from the Engineering Division, as we will need to shape up incentives for Engineers to drive down Review Time. ## Goals 1. Reduce time from **MR assigned to reviewer** to **MR merge** 2. Design an incentives system to drive and keep review time to a minimum, without compromising the daily work duties 3. Improve code review process efficiency with tooling (tooling example: [Reviewer Roulette](https://gitlab.com/gitlab-org/gitlab-roulette), [GitLab Duo](https://docs.gitlab.com/ee/user/project/merge_requests/duo_in_merge_requests.html#have-gitlab-duo-review-your-code) ) ## Metrics Data Source of Truth: [MR Review Time Dashboard](https://app.snowflake.com/ys68254/gitlab/#/dx-mr-review-time-dUKkxKCWi) | States | Description | Metric | Baseline Value when initiative started (FY25) | Improved Value | |--------|-------------|--------|-----------------------------------------------|----------------| | State 1: Before Review Request | From MR creation to first review request | **`Time to First Reviewer Assignment`** | \~45 hours | TBD | | State 2: Waiting for First Review | From review request to first reviewer engagement | **`Reviewer Response Time`** | \~25.6 hours | TBD | | State 3: Feedback Loop | From first engagement to approval | Time from First Review to Approval \[TFRRA\] | \~47.1 hours | TBD | | State 4: After Approval to Merge | From approval to merge | **`Approval to Merge Time`** | \~12.5 hours | TBD | ## Overall Strategy ```mermaid flowchart LR Strategy["Overall Strategy"] Strategy --> Tooling["Tooling/automation Improvement"] Strategy --> Motivation["Motivate engagement"] Strategy --> Pool["Increasing the reviewer pool"] %% Tooling improvements with clearer intentions Tooling --> Tool1["Smart reviewer selection based on domain, timezone and capacity"] Tooling --> Tool2["Automate merging bottlenecks"] Tooling --> Tool3["Enhance visbility in review analytics"] %% Motivation strategies with purpose Motivation --> Mot1["Recognize and reward timely reviews"] Motivation --> Mot2["Showcase team and individual performance metrics"] Motivation --> Mot3["Set clear SLAs and celebrate achievements"] %% Pool improvements with clearer objectives Pool --> Pool1["Increase reviewer pool to reduce review feedback time"] Pool --> Pool2["Balance reviewer workload"] %% Color styling for the three main segments classDef toolingStyle fill:#d4f1f9,stroke:#05386B classDef motivationStyle fill:#e1f7d5,stroke:#379683 classDef poolStyle fill:#ffeed9,stroke:#8D5524 class Tooling,Tool1,Tool2,Tool3,Tool4 toolingStyle class Motivation,Mot1,Mot2,Mot3 motivationStyle class Pool,Pool1,Pool2,Pool3 poolStyle ``` Note that: Improvements happening in other tracks for[ the broader initiative ](https://gitlab.com/groups/gitlab-org/-/epics/16026)will help fast track review cycle too. ## Deliverables <table> <tr> <th>Category</th> <th>Goal</th> <th>Status</th> <th>Timeline</th> <th>DRI</th> <th>Tracker / Epic / Issue</th> </tr> <tr> <td>Reduce MR review time by increasing maintainer pools</td> <td>Increase reviewer pool to reduce MR review time</td> <td> :hourglass_flowing_sand: </td> <td> ~"FY26::Q1" ~"FY25::Q2" </td> <td> Self-learning (led by @ddavison) </td> <td> [Epic](https://gitlab.com/groups/gitlab-org/-/epics/16532) </td> </tr> <tr> <td>Incentivize MR engagement by awarding achievements</td> <td>Introduce MR code review achievements framework and have team members start earning one-time achievements</td> <td> :white_check_mark: </td> <td> ~"FY26::Q1" </td> <td> @ddavison </td> <td> [Issue](https://gitlab.com/gitlab-org/achievements/gitlab-profile/-/issues/15) </td> </tr> <tr> <td>Improve MR Cycle Time via Automation and Tooling</td> <td>Update Roulette and Danger to track “awaiting review” instead of total assigned MRs</td> <td> :white_check_mark: </td> <td> ~"FY26::Q1" </td> <td> @jennli </td> <td> [Issue](https://gitlab.com/gitlab-org/gitlab/-/issues/513461) </td> </tr> <tr> <td></td> <td> Improve merge train process experience for gitlab project by [Enable smarter notification](https://gitlab.com/gitlab-org/gitlab/-/issues/535217) </td> <td> :hourglass: </td> <td> ~"FY26::Q1" </td> <td> @pranshusharma </td> <td></td> </tr> <tr> <td></td> <td>Improve auto-merge process</td> <td> :hourglass_flowing_sand: </td> <td> ~"FY26::Q2" </td> <td> @ddavison </td> <td> [Epic](https://gitlab.com/groups/gitlab-org/-/epics/17658) </td> </tr> <tr> <td></td> <td>Improve Reviewer Selection using AI in Roulette & Danger</td> <td>—</td> <td> ~"FY26::Q3" </td> <td> @ddavison </td> <td> [Epic](https://gitlab.com/groups/gitlab-org/-/epics/17240) </td> </tr> <tr> <td></td> <td>Audit and reduce mandatory reviews per MR</td> <td>—</td> <td> ~"FY26::Q3" </td> <td> @ddieulivol </td> <td> [Epic](https://gitlab.com/groups/gitlab-org/-/epics/17219) </td> </tr> <tr> <td>Dogfood & Enhance GitLab Features</td> <td>Dogfood Intelligent Reviewer Selection, propose and contribute improvements</td> <td>—</td> <td> ~"FY26::Q3" </td> <td>—</td> <td> [Issue](https://gitlab.com/gitlab-org/quality/analytics/team/-/issues/31) </td> </tr> <tr> <td></td> <td>Dogfood Value Stream Analytics (VSA), explore integration and enhancements</td> <td>—</td> <td> ~"FY26::Q3" </td> <td>—</td> <td> ue\](https://gitlab.com/gitlab-org/gitlab/-/issues/515880++) | A </td> </tr> </table> ## Dependencies / Blockers / Challenges ### Metric dashboards issue: https://gitlab.com/gitlab-org/gitlab/-/issues/508901+ - While we await completion of our metric dashboards to demonstrate review time bottlenecks and data trends, we can proceed with implementing known improvements to the review process. Several deliverables can move forward independently of the data collection phase, particularly those changes we've already identified as beneficial to reducing review times. ### Adapt reviewer roulette to the newest MR homepage design issue: https://gitlab.com/gitlab-org/gitlab-roulette/-/issues/74+ - Reviewer roulette is pending a significant update after GitLab redesigned the MR home page. Danger is not able to make accurate reviewer suggestions now because it is not filtering reviewer by their review statuses at the moment. This essentially makes the roulette unusable in a lot of the scenarios. Before we can improve the reviewer suggestion logic, we need to fix the roulette so it takes consideration of the code review status. ## Results \[TBD Quarterly\] <!-- STATUS NOTE START --> ## Status 2025-04-30 One achievement merged to help incentivize MR reviews. Another achievement in review. Epic initiative created for auto-merge and auto-retry processors. Work continues on merge train failure notification. :tada: **achievements**: - A new [Approver achievement](https://gitlab.com/gitlab-org/developer-relations/contributor-success/toolbox/-/merge_requests/132) was added. This is especially exciting since this is both a team member _and_ community achievement! Community contributors can also be awarded this achievement for reviewing and Approving an MR in GitLab! :tada: :arrow_forward: **next**: - Get https://gitlab.com/gitlab-org/developer-relations/contributor-success/toolbox/-/merge_requests/175+ merged. - Close out https://gitlab.com/gitlab-org/achievements/gitlab-profile/-/issues/15+ for ~"FY26::Q1" - Continue working on https://gitlab.com/gitlab-org/gitlab/-/issues/535217+ - _Low-priority for ~"FY26::Q2"_ https://gitlab.com/groups/gitlab-org/-/epics/17658+ _Copied from https://gitlab.com/groups/gitlab-org/-/epics/16028#note_2476951887_ <!-- STATUS NOTE END -->
epic