A merged pull request records that a change was accepted. It does not tell us how much of that change survives, whether later work depends on it, or how much of the current repository can still be attributed to it. This research prototype measures those quantities by tracing each PR forward through git history to the present version of the codebase.

What the study is trying to measure

The goal is to estimate how much any merged PR — written by a person or an agent — contributes to the repository today. The method models the repository as a dependency graph, follows each PR’s code and structures into current main, and expresses attribution against a 100-point representation of the current repository.

Current Value %The PR’s share of the current 100-point attribution ledger.
Code Survival %The proportion of the PR’s original code that remains.
Structural Survival %The proportion of its symbols and dependency structure that remains.
EvidenceLater PRs that extend, depend on, replace, or remove the contribution.

Code survival and structural survival are deliberately separate. A function may be rewritten line by line while its API, role, and downstream dependencies remain. In that case, literal code survival is low but structural survival can still be high.

Merged PRs analyzed
256
Full ky history in scope.
Evidence-linked PRs
53 (21%)
Structurally connected to at least one other PR.
Contracts generated
253 (99%)
Inferred by gemma4:e4b running locally.
Novel semantic links
66
Relations git evidence alone cannot see.

The evidence graph

The figure below shows a readable subset of the deterministic graph: the nine PRs with the highest current-value estimates. Node area represents current value. Lines represent relationships recovered from git history. The complete analysis contains 256 PRs and 106 evidence edges.

Dependency graph of high-value pull requests in sindresorhus/ky Nine pull requests sized by current value and joined by extension, dependency, and removal evidence. #3309.69% #7794.80% #8744.29% #8303.86% #8293.33% #4332.82% #8422.64% #7461.66% #7671.59%
Extended byDependency evidenceRemoval evidenceNode size and shade = current value
A focused view of the highest-value PRs. Edges shown are selected deterministic relationships from the evidence graph; the figure is not the complete 256-node network.

Finding 1: value is concentrated in connected contributions

Fifty-three of the 256 PRs are structurally linked to at least one other PR. These connected PRs account for 52.3 current-value points. The 203 isolated PRs account for 9.1 points. The result suggests that later reuse and dependency relationships are important to the attribution estimate.

53
connected PRs21% of the sample; 52.3 current-value points.
203
isolated PRs79% of the sample; 9.1 current-value points.

The analyzed PRs account for 61.4 of the repository’s 100 value points in this run. The balance belongs to repository history outside the in-scope merged-PR set. Within the PR-attributed portion, connected PRs hold about 85% of the value.

What this meansPR count and lines changed are activity measures. This method is trying to measure a different quantity: how much of a contribution remains present or depended upon in the current repository.

Finding 2: contract types age differently

Each PR was classified by inferred contract type. The categories reveal different durability profiles. Reliability work carries the largest share of current value but the lowest average code survival: the ideas last even when the exact lines get rewritten. Refactors are the opposite — few in number, high in structural survival, and disproportionately valuable per PR.

Contract type value share and average survival
Reliability n=77
25.73%
Feature n=46
16.80%
Refactor n=15
11.92%
Maintenance n=114
6.32%
Feature Reliability Maintenance Refactor

Value share is the percentage of PR-attributed current value held by each contract type. Colors match the Contract Graph legend: blue = feature, orange = reliability, green = maintenance, yellow = refactor. Average structural survival is 90% for reliability, 95% for feature, 96% for refactor, and 84% for maintenance. The sample is 253 of 256 PRs with generated contracts.

What this means Reliability PRs hold the largest value share even though their average code survival is 39%. Their average structural survival is 90%. In this sample, the continuation of a contribution’s role and dependencies is often more informative than survival of its original lines.

Source and method note. The data come from a value-attribution analysis of the open-source repository sindresorhus/ky. Evidence edges are reproducible from git history. Contract type, inferred intent, and preserved invariants were generated by a locally running gemma4:e4b model and are reported separately from deterministic attribution evidence.