1. Define a cohort from GitHub pull requests

Pull PR numbers, titles, labels, open and merge timestamps, and commit timestamps. Use the same timestamp field for each commit across every period. Select PRs by merge time in a 7-, 14-, or 30-day window and exclude release PRs using a consistent label or title rule. Save links to the PR and checks so a reviewer can inspect the result. GitHub’s pull request and commit endpoints

Keep an overall view and use an explicit marker such as an agent label for the agent-assisted cohort. Show the denominator beside each percentage. When commit data is missing, flag the incomplete cohort and report insufficient data until you can calculate the result.

2. Calculate first-pass yield, post-open rework, and defect-fix share

Count commits strictly after the PR opens plus a two-minute grace period. The grace period allows for small timing differences when an agent pushes and opens a PR in quick succession. For each qualifying PR, store the count and the qualifying commit links.

Illustrative merged PR cohort
PROpenedLater commitsCounts as
#81 Feature09:0009:01First pass
#82 Fix10:0010:12, 10:34Rework, defect fix
#83 Release11:0011:14Excluded
  • First-pass yield is the share of qualifying PRs with zero late commits. Here it’s 1 of 2, or 50%.
  • Post-open rework is the share with at least one late commit. Here it’s 1 of 2, or 50%, with two late commits in total.
  • Defect-fix share is the share classified as fixes or reverts using your title rule, for example a fix: or revert: prefix. Here it’s 1 of 2, or 50%.

Review feedback, a rebase, or a changed requirement can all produce another commit. Use the rework number to find PRs to investigate. Confirm the cause from the diff, review thread, and CI runs before you change how the team works.

3. Measure PR lead time and CI recovery separately

Calculate PR lead time from open to merge. For a sample of 20, 50, 80, 110, and 140 minutes, p50 is 80 minutes and p90 is 140 minutes using the nearest-rank method. Document the percentile method and sample size so readers can compare periods consistently.

For CI recovery, follow one consistent default-branch workflow. Start a streak when a run first fails or times out, and close it at the next success. Using run conclusion times, failures at 12:00 and 12:08 followed by success at 12:18 count as a single 18-minute recovery. Report the median of closed streaks and show any still-open streak separately. GitHub’s workflow runs endpoints

PR lead time and CI recovery describe the GitHub workflow. DORA’s change lead time ends at production deployment, and failed deployment recovery measures restoration after a failed production deployment. To report DORA metrics, join production deployment and intervention events to your change data. DORA’s software delivery metric definitions

4. Drill into a spike before acting on it

Open the contributing PRs in both periods and compare sample sizes. In the sample, start with PR #82 and inspect the 10:12 and 10:34 commits. If a missing fixture caused the first failure and the second commit added the coverage requested in review, the team can add that fixture check to its local handoff and measure the next cohort using the same rules.

Track PR size, agent attribution, and CI run outcomes alongside the percentages. Keep the comparisons within one repo or workflow until the inputs are consistent enough to compare across teams.

Get early access to quality telemetry

Join the ShipBay Founding Waitlist for launch updates.

Join the Founding Waitlist