Contention-Graph Thresholds for Concurrent Agent Fault Propagation¶
Track shared-file contention variance across concurrent agent pull requests to identify hub files and show reviewers which open changes overlap.
Use a live contention graph to spot clusters of open pull requests that touch the same files. The graph shows routes a fault could take, but the probability of a fault crossing a link remains unmeasured (arXiv:2604.19827v2).
When this diagnostic applies¶
Most repositories in Russo’s study had no defined reference threshold. The study analyzed 33,105 agent-authored pull requests across 2,731 public repositories with over 100 stars in the AIDev curated subset (24 December 2024 to 30 July 2025) (arXiv:2604.19827v2). Of those repositories, 2,259 (82.7%) had no defined contention threshold: 1,972 had no contending changes and 287 had contention too sparse for κ to be positive (arXiv:2604.19827v2).
Use the historical results to decide where a live diagnostic is worth trying:
- Volume over the study window: the paper grouped repositories by total changes over the window, not by how many pull requests were open at once. Among the 472 repositories with a defined threshold, the median reference threshold is 56% (interquartile range 24% to 100% or higher) (arXiv:2604.19827v2). That median drops to 19% for repositories with at least 30 changes (127 repositories) and 7.5% for repositories with at least 100 changes (29 repositories) (arXiv:2604.19827v2).
- Concentrated file overlap: a small set of files absorbs edits from many open pull requests. Among the 127 repositories with at least 30 changes and a defined threshold, the Spearman correlation between mean excess degree and pull request count is 0.29, so volume alone misses which repositories concentrate overlap (arXiv:2604.19827v2).
- Descriptive triage intent: the team uses the graph to split hotspot files and show reviewers co-active pull requests, rather than enforcing a pass/fail merge gate (arXiv:2604.19827v2).
Concentration in the corpus is steep and heavily product-skewed. Thirteen repositories (0.5% of the corpus) had reference thresholds below 5% and held 14,080 changes, or 42.5% of the corpus (arXiv:2604.19827v2). One coding-agent product authored 95.9% of the changes in those 13 repositories, compared with 65.8% of the full corpus (arXiv:2604.19827v2). That headline concentration therefore largely describes deployments of that product (arXiv:2604.19827v2).
How contention and incorporation spread faults¶
Reviewing one pull request at a time can miss interactions between concurrent changes that merge without textual conflicts (arXiv:2604.19827v2).
Two pull requests contend if they touch a common file and their open periods overlap. Even edits that merge cleanly can carry a fault from one change to another (arXiv:2604.19827v2).
When a faulty pull request merges, an open contending pull request can rebase onto the updated branch and hit a failing check. If an autonomous agent adapts its own logic or tests to match the faulty behavior, the fault is incorporated into the second change. Reverting the originating pull request then leaves the defect in the repository (arXiv:2604.19827v2).
This file-mediated channel operates on a different graph and timescale than runtime agent messaging. Runtime multi-agent error cascades travel over directed message-dependency graphs inside a single task, where a message-layer governance plugin kept final artifacts free of infection in 89% to 94% of benchmark runs on average, depending on the operating mode (arXiv:2603.04474v2). In the repository corpus, coding-agent accounts posted 4,674 comments on changes authored by others compared with 42,600 contending pairs, a ratio of 0.110 (95% cluster-bootstrap interval 0.0645 to 0.233) (arXiv:2604.19827v2). Contending pairs outnumbered recorded agent-account comments by about nine to one. The author treats this as suggestive evidence that shared files dominate: 0.110 is just above the study’s 0.1 bound for supporting that premise, and comments agents posted through engineer accounts were not counted (arXiv:2604.19827v2).
Why mean overlap hides tail exposure¶
Looking at the average number of contending pull requests per change hides concentration on hub files. A fault traveling across a contention link disproportionately arrives at a heavily contended pull request (the friendship paradox), so onward exposure depends on both the mean contention degree and its variance (arXiv:2604.19827v2):
κ = (⟨k²⟩ − ⟨k⟩)/⟨k⟩ = ⟨k⟩ − 1 + Var(k)/⟨k⟩
In a large configuration-model reference graph, sustained spread requires the branching ratio R = qκ to exceed 1, where q is the probability that a fault crosses a contention link. With homogeneous, independent, single-pass transmission, the reference threshold is q_c = 1/κ (arXiv:2604.19827v2).
Pooling all 33,105 pull requests in the corpus shows the gap between mean overlap and onward exposure (arXiv:2604.19827v2):
| Metric | Pooled corpus value | What it measures |
|---|---|---|
Mean contention degree (⟨k⟩) |
2.574 | Contending pull requests for a random change |
Contention variance (Var(k)) |
272.79 | Spread in the number of contending pull requests per change |
Mean excess degree (κ) |
107.6 | Expected onward links reached by following a link |
Pooled reference threshold (q_c = 1/κ) |
0.93% | Aggregate reference point, not any single repo's threshold |
Average contention understates onward links by roughly a factor of 40 in the pooled corpus (arXiv:2604.19827v2). The pooled threshold describes the corpus as one aggregate and is not the threshold of any individual repository within it (arXiv:2604.19827v2).
Three descriptive practices from repository metadata¶
Teams can compute these diagnostics from git history and pull request metadata they already store, without waiting for an empirical estimate of q (arXiv:2604.19827v2):
- Compute contention degrees and
κacross currently open pull requests. Compareκagainst the mean degree to see whether concurrent edits are spread evenly or piled onto a few hub files (arXiv:2604.19827v2). - Identify the files mediating the most contention links and separate code from non-code hubs. In the corpus, 45.0% of contention links involved no shared programming-language code file. High-contention files are candidates for splitting (arXiv:2604.19827v2).
- Surface contending open pull requests inside the code review UI. Showing a reviewer every open pull request that touches the same files exposes concurrent dependencies that single-PR review hides (arXiv:2604.19827v2).
Why it works¶
A fault crossing a contention link is more likely to land on a heavily contended change than on an average one, so the variance term in κ captures hub exposure that mean degree hides (arXiv:2604.19827v2).
Use live contention degrees and κ to spot concentrated overlap, then inspect the file lists to see which files and open changes contribute to it (arXiv:2604.19827v2).
When this backfires¶
Treating the contention-graph threshold as a calibrated safety metric creates blind spots and false alarms across five conditions:
- Unmeasured crossing probability and incorporation: the paper's Stage 1b pilot sampled 20 contending pairs (10 Python, 10 TypeScript) and reconstructed 17 pairs, but none met the conditions for a measured trial (arXiv:2604.19827v2). The cited version reports that none of its four outlined validation studies (V1–V4) had been run. Only V1 is a live-agent incorporation study. The paper does not estimate
qor real-world incorporation rates (arXiv:2604.19827v2). - Hard CI gates built on
q_c = 1/κ: the reference threshold is a ratio of moments and is non-monotonic, so adding a contention link between two lightly contended pull requests can raiseq_c(arXiv:2604.19827v2). A sparse repository can also have a low globalκwhile hiding a dense supercritical sub-component (arXiv:2604.19827v2). In synthetic corpus-matched graphs, the simulated transition was 21.1% aboveq_catN = 30,000and 14.3% aboveq_catN = 100,000. Clustering is one possible explanation, alongside finite-size effects, calibration error, and changes in the generated graph ensemble as graph size increases (arXiv:2604.19827v2). That gap is neither a correction factor nor evidence thatq_cis a conservative safety bound (arXiv:2604.19827v2). - Static-window distortion: aggregating contention across the seven-month history discards merge and rebase order (arXiv:2604.19827v2). Reachability along time-respecting paths is not transitive. A fault that reaches a second pull request can continue to a third only if the next exposure occurs after the fault arrives (arXiv:1108.1780v2). In the corpus, accumulated contention degrees reached 731, whereas the largest number of pull requests open at the same moment in any repository was 139, with a median peak of 5 across the 472 thresholded repositories (arXiv:2604.19827v2). For live triage, compute
κover currently open pull requests (arXiv:2604.19827v2). - Unweighted non-code hub files: in the single most contended repository (
q_c = 0.35%,κ = 283.3), 96% of contention ran through documentation and continuous-integration files (arXiv:2604.19827v2). If faults cross those files less often than code files, unweighted contention overstates risk and triggers false alarms on non-code hubs (arXiv:2604.19827v2). - Cross-file dependencies and review overload: a change that depends on a fault through a call from another file lies outside the contention graph (arXiv:2604.19827v2). Separately, a rival throughput explanation predicts a sharp failure spike whenever changes requiring human review arrive faster than reviewers can process them, even across disjoint files (arXiv:2604.19827v2). To reduce file overlap, consider shortening pull request lifetimes or partitioning work by directory.
Example¶
The AIDev corpus shows what a code-only restriction changes. In the corpus, 45.0% of contention links have no shared program-source file. The excluded files include documentation, continuous integration, configuration, markup, style, and query files (arXiv:2604.19827v2).
- Unweighted graph across all files: pooled
κ = 107.6, with 13 repositories belowq_c = 5%holding 42.5% of changes. The highest-contention repository showsκ = 283.3(q_c = 0.35%), but 96% of its links run through documentation and continuous-integration files. - Code-only graph restricted to programming-language files: pooled
κdrops from 107.6 to 25.7, and 10 of the 13 low-threshold repositories remain below 5% (holding 41.2% of changes).
The concentration largely survives the restriction, while the magnitudes change (arXiv:2604.19827v2).
Key Takeaways¶
- Compare contention across all shared files and across code files only: 45.0% of links involve no shared code file, but faults can also travel through configuration and documentation, and which file types transmit them is unmeasured (arXiv:2604.19827v2).
- Compute
κover currently open pull requests rather than multi-month histories so each degree reflects current overlap (arXiv:2604.19827v2). - Keep
q_c = 1/κout of blocking CI gates. The reference threshold can rise when a link is added, can mask dense sub-components, and cannot be compared with a measured crossing probabilityqin this corpus (arXiv:2604.19827v2). - Track review backlog alongside file contention to catch overload that can occur even when pull requests touch different files (arXiv:2604.19827v2).
Related¶
- Concurrent Agent Pull Requests and Merge-Conflict Cost — empirical rates of textual merge conflicts on the same AIDev corpus and a coordination ladder for overlapping PRs
- Ecosystem-Level Integration Friction Governance — repository-level variance in PR integration latency across concurrent agent contributions
- Pre-Write Change Intent Admission (Claim Plane) — brokered pre-write scope declarations that prevent overlapping edits before code is written
- Single-Branch Git for Agent Swarms — advisory file reservations and mechanical guards as an alternative to long-lived parallel feature branches