{"template":"twocol","title":"Maintainer Retirement under Reversible Whitespace Changes","short_title":"Maintainer retirement under reversible whitespace changes","authors":[{"name":"Ansel M. Calderwick","affiliations":[1]}],"affiliations":["Software Stewardship Laboratory, Greyfen Institute for Software Systems, Norwich, United Kingdom"],"abstract":"We study a retirement rule that permits an incumbent software maintainer to leave once a designated successor holds a majority of the project's line credit. We replay six successive appointments in ten released Python packages. In alternate terms an incoming maintainer inserts one trailing space per eligible line or removes the space inserted in the previous term. The transformation preserves the parsed program. Each incoming maintainer acquires credit for 87,490 of 111,377 nonblank lines across the corpus, enough to qualify the outgoing roster in every package. The three removal terms restore the exact release tree and assign the edited lines to a new author each time. Processing the largest files first reduces the median number of file commits needed to qualify from 15 to 6.5. Whitespace-insensitive blame yields no eligible retirements. Under ordinary line attribution, the same released source can support successive retirements without any additional code entering the project.","keywords":["software maintenance","maintainer succession","code ownership","repository mining","Git blame"],"body":"# Introduction\n\nThe runtime package at release 23.2.0 of attrs contains 4,443 nonblank lines. One file supplies 1,912 of those lines when a new maintainer inserts a trailing space on each eligible line. With the appropriate second file, the new maintainer holds a majority of line credit. An incoming maintainer can obtain the same credit a second time by removing those spaces.\n\nRepository-based assessments use code ownership as evidence of maintenance capacity [@avelino; @ferreira]. We use that evidence for a retirement decision. An outgoing roster qualifies to retire once its designated successor holds more than half of the current line credit. On handover the successor takes office and becomes eligible through a fresh successor under the same rule. There is no minimum elapsed service period. The condition for an orderly departure is the availability of an appropriately credited replacement.\n\nWe evaluate this case with a reversible intervention. Six successive maintainers take turns adding and removing trailing spaces in ten Python packages. Each maintainer is given a new Git author identity. In every second term we restore the release tree exactly. We measure whether the roster can retire at each handover, how many file commits it takes to qualify, and which earlier authors are visible to the auditor after the source is restored.\n\n# Related Work\n\nAvelino et al. [@abandonment] describe the takeover of open-source projects after their original core developers leave. Their study identifies work that occurs independently of version history, including establishing contact and obtaining access. Bus-factor methods estimate where knowledge is concentrated while the current maintainers are still available [@avelino; @ferreira; @jabrayilzade]. An orderly departure presents a different problem. The continuity decision concerns coverage held by a particular incoming roster. Counting how many other authors might leave does not establish that the successor is among the remaining holders.\n\nGit line attribution is used in studies of how source code is co-edited [@gote]. Git can compare versions with whitespace ignored [@gitblame]. A content-based audit should also be able to recognize an exact return to a previous tree. This is a stricter condition than whitespace equivalence. The experiment uses it to separate the effect of changing programmers from the effect of changing programs.\n\n# Method {#sec:method}\n\n## Release snapshots\n\nWe used the same ten snapshots for every condition (@tbl:corpus). This is a convenience sample of tagged Python packages spanning command-line tools, web frameworks, testing, packaging, and serialization. Four are Pallets projects. We fetched complete commit ancestry to each tag and restricted the audit to tracked Python files in runtime package directories. Separate test and documentation trees are outside scope. We count nonblank physical lines, including comment lines and docstrings.\n\nTable: Audited release snapshots. Counts include all tracked Python files in the listed runtime roots and all nonblank physical lines in those files. {#tbl:corpus span=full}\n\n| Project | Tag | Commit | Runtime roots | Files | Lines |\n| :--- | :--- | :--- | :--- | ---: | ---: |\n| [attrs](https://github.com/python-attrs/attrs) | 23.2.0 | 9e443b18527d | `src/attr`, `src/attrs` | 19 | 4,443 |\n| [click](https://github.com/pallets/click) | 8.1.7 | 874ca2bc1c30 | `src/click` | 16 | 8,201 |\n| [flask](https://github.com/pallets/flask) | 3.0.0 | 735a4701d6d5 | `src/flask` | 24 | 7,065 |\n| [jinja](https://github.com/pallets/jinja) | 3.1.4 | dd4a8b5466d8 | `src/jinja2` | 25 | 11,598 |\n| [marshmallow](https://github.com/marshmallow-code/marshmallow) | 3.21.3 | b9646e326c51 | `src/marshmallow` | 13 | 4,196 |\n| [packaging](https://github.com/pypa/packaging) | 24.1 | 85442b8032cb | `src/packaging` | 14 | 3,790 |\n| [pytest](https://github.com/pytest-dev/pytest) | 8.2.2 | 329d3712146e | `src/_pytest`, `src/pytest` | 69 | 27,709 |\n| [requests](https://github.com/psf/requests) | v2.32.3 | 0e322af87745 | `src/requests` | 18 | 4,560 |\n| [rich](https://github.com/Textualize/rich) | v13.7.1 | 7f580bdcf07a | `rich` | 78 | 23,244 |\n| [werkzeug](https://github.com/pallets/werkzeug) | 3.0.3 | f9995e967979 | `src/werkzeug` | 52 | 16,571 |\n| Total |  |  |  | 328 | 111,377 |\n\n## Eligibility and term boundaries\n\nWe identify a line's author by the lowercased email returned by ordinary `git blame --line-porcelain`. Git returned no email on 44 nonblank lines at release. We include them in the denominator and assign their credit to no roster. Let $L$ be the number of audited lines and $A_s(j)$ the number credited to designated successor $s$ after the $j$th file commit in a term. That successor qualifies the former roster to retire at\n$$\nj_s(q)=\\min\\{j : A_s(j)>qL\\},\n\\label{eq:release}\n$$\nprovided the successor reaches the cutoff by the end of the term. We use a strict majority ($q=0.50$), with 67% and 75% as sensitivity cutoffs. The full term includes every planned file commit even when eligibility occurs earlier. The appointment changes once per term. We record the cutoff crossing in the audit and leave the source schedule fixed.\n\nThe original roster consists of all identified authors in the release audit. It is followed by six distinct one-person rosters. When a roster retires, its credit can remain visible in the repository. That credit does not count toward any subsequent roster's eligibility. A roster qualifies its predecessor only through its own attributed lines. Thus the same lines can qualify more than one outgoing roster, but only after credit has passed to another successor.\n\n## Reversible intervention\n\nWe generate the intervention from the release snapshot using CPython 3.14.6. Insertions add one ASCII space before the line ending on eligible nonblank lines. We protect lines intersecting a multiline token and lines containing a type comment. We also protect lines ending in a backslash, where inserting a space can invalidate explicit continuation [@pylex]. Every edited file must have the same parsed syntax tree including type comments, with source positions omitted. None failed this check. An inverse edit restores each original blob from the release tree. The inverse does not strip whitespace that was already in the release.\n\nWe use Git 2.43.0 to write one commit per changed file and one author per term. Odd terms apply the insertions. Even terms apply the inverses. This yields three round trips per project. Each round trip ends in the original whole-repository tree, including paths outside the audited roots. We verify the tree ID at each endpoint and compare every scored line's author email with its release value. All commits are local and have a fixed committer and timestamp. Time to eligibility is measured in commits because the intervention does not use elapsed time as an input.\n\n## Schedules and controls\n\nThe lexical schedule processes files in ascending path order. The largest-first schedule places files in descending order by the number of changed lines, breaking ties by path. Both schedules edit exactly the same files in each term. We score the affected path after each commit, when the other paths have not changed in that step, and verify the accumulated count with a full audit at the end of the term. The two schedules provide a comparison of the amount of work needed for retirement before the term ends. If each file transfers its observed changed lines, largest first also gives the smallest possible number of files for any fixed cutoff. The sum of the $j$ largest files is at least the sum of any other $j$ files.\n\nWe run two controls. First, we rerun all endpoint audits with `git blame -w` and compare those authors with a whitespace-insensitive audit at release. This tests a retirement procedure in which whitespace edits are excluded from ownership accounting. Second, each of the six successor identities writes a metadata-only commit in a separate replay from the same release. We leave the tree unchanged at every commit. This tests whether an announcement of the successor in version history is sufficient to transfer credit.\n\n# Results\n\n## The transfer of retirement eligibility\n\nThe audited releases contain 111,377 nonblank lines in 328 files. We edit 87,490 lines in 325 files per term. The smallest transfer is 62.4% of audited lines in Flask. The largest is 87.0% in Rich. In ordinary blame every edited line goes to the current successor in both directions. Each original roster and each of the first five successors therefore qualifies for retirement. At the majority cutoff there are six eligible handovers per package, or 60 across the ten packages. The sixth successor has no designated replacement within the experiment.\n\nThe insertion and removal passes give the same eligibility counts for a fixed schedule. In particular, the maintainer appointed after an insertion term receives the same credit for removing each space as the outgoing maintainer received for adding it. The relevant comparison is between consecutive file versions. At the end of the second term the working tree is the release tree, while all 87,490 edited lines are credited to the second successor. Every subsequent round trip gives the same result with a fresh name.\n\n@fig:reversal reports the two comparisons with the release. There is no content difference at the end of terms 2, 4, and 6. The share of changed author records is the same at all six endpoints. If a maintenance office audits two successive release trees without their histories, it cannot observe those retirements from the trees alone.\n\n```chart {#fig:reversal caption=\"Pooled share of audited lines differing from the release by text or by last author. Term 0 is the release. Even-numbered terms restore the release tree.\"}\n{\n  \"type\": \"line\",\n  \"xlabel\": \"Completed terms\",\n  \"ylabel\": \"Lines differing from release (%)\",\n  \"x\": [\n    0,\n    1,\n    2,\n    3,\n    4,\n    5,\n    6\n  ],\n  \"xlim\": [\n    -0.15,\n    6.15\n  ],\n  \"ylim\": [\n    0,\n    110\n  ],\n  \"size\": [\n    3.4,\n    2.4\n  ],\n  \"legend\": \"upper right\",\n  \"series\": [\n    {\n      \"label\": \"Last author\",\n      \"y\": [\n        0,\n        78.55,\n        78.55,\n        78.55,\n        78.55,\n        78.55,\n        78.55\n      ],\n      \"style\": \"solid\",\n      \"marker\": \"o\",\n      \"color\": \"#184c66\"\n    },\n    {\n      \"label\": \"Line text\",\n      \"y\": [\n        0,\n        78.55,\n        0,\n        78.55,\n        0,\n        78.55,\n        0\n      ],\n      \"style\": \"dashed\",\n      \"marker\": \"s\",\n      \"color\": \"#99302b\"\n    }\n  ]\n}\n```\n\n## File commits required for eligibility\n\n@tbl:crossings gives the first qualifying commit under each file order. At the majority cutoff the median falls from 15 file commits in lexical order to 6.5 in largest-first order. The largest-first order reached the cutoff earlier in every package. In attrs, two commits suffice. The first transfers 1,912 lines from `src/attr/_make.py`. The second raises the total to 2,233 lines, 11 more than required.\n\nTable: First qualifying file commit at the 50% cutoff. Edited is the number of file commits in a full term. Credit is the successor's share at that term's end. {#tbl:crossings}\n\n| Project | Edited | Lexical | Largest first | Credit (%) |\n| :--- | ---: | ---: | ---: | ---: |\n| attrs | 19 | 6 | 2 | 71.1 |\n| click | 16 | 11 | 6 | 75.2 |\n| flask | 24 | 17 | 11 | 62.4 |\n| jinja | 25 | 15 | 7 | 78.8 |\n| marshmallow | 13 | 9 | 2 | 74.4 |\n| packaging | 14 | 11 | 5 | 75.7 |\n| pytest | 68 | 36 | 15 | 84.1 |\n| requests | 18 | 15 | 4 | 76.9 |\n| rich | 78 | 49 | 11 | 87.0 |\n| werkzeug | 50 | 39 | 20 | 70.0 |\n\n@fig:prefix shows the paths to eligibility across releases of different sizes. We report progress as the proportion of all files scheduled for editing. In Requests the cutoff is reached after 15 of 18 file commits in lexical order. Starting with the largest files moves the decision to the fourth commit.\n\n```chart {#fig:prefix caption=\"Cumulative share of packages whose outgoing rosters qualify to retire by a given fraction of the term. The denominator of progress is the number of edited files in that package.\"}\n{\n  \"type\": \"line\",\n  \"xlabel\": \"Edited files committed (%)\",\n  \"ylabel\": \"Packages eligible (%)\",\n  \"x\": [\n    0,\n    31.579,\n    31.579,\n    52.941,\n    52.941,\n    60.0,\n    60.0,\n    62.821,\n    62.821,\n    68.75,\n    68.75,\n    69.231,\n    69.231,\n    70.833,\n    70.833,\n    78.0,\n    78.0,\n    78.571,\n    78.571,\n    83.333,\n    83.333,\n    100\n  ],\n  \"xlim\": [\n    -2,\n    104\n  ],\n  \"ylim\": [\n    0,\n    105\n  ],\n  \"grid\": true,\n  \"size\": [\n    3.4,\n    2.3\n  ],\n  \"legend\": \"lower right\",\n  \"series\": [\n    {\n      \"label\": \"Lexical\",\n      \"x\": [\n        0,\n        31.579,\n        31.579,\n        52.941,\n        52.941,\n        60.0,\n        60.0,\n        62.821,\n        62.821,\n        68.75,\n        68.75,\n        69.231,\n        69.231,\n        70.833,\n        70.833,\n        78.0,\n        78.0,\n        78.571,\n        78.571,\n        83.333,\n        83.333,\n        100\n      ],\n      \"y\": [\n        0,\n        0,\n        10,\n        10,\n        20,\n        20,\n        30,\n        30,\n        40,\n        40,\n        50,\n        50,\n        60,\n        60,\n        70,\n        70,\n        80,\n        80,\n        90,\n        90,\n        100,\n        100\n      ],\n      \"style\": \"dashed\",\n      \"marker\": \"none\",\n      \"color\": \"#99302b\"\n    },\n    {\n      \"label\": \"Largest first\",\n      \"x\": [\n        0,\n        10.526,\n        10.526,\n        14.103,\n        14.103,\n        15.385,\n        15.385,\n        22.059,\n        22.059,\n        22.222,\n        22.222,\n        28.0,\n        28.0,\n        35.714,\n        35.714,\n        37.5,\n        37.5,\n        40.0,\n        40.0,\n        45.833,\n        45.833,\n        100\n      ],\n      \"y\": [\n        0,\n        0,\n        10,\n        10,\n        20,\n        20,\n        30,\n        30,\n        40,\n        40,\n        50,\n        50,\n        60,\n        60,\n        70,\n        70,\n        80,\n        80,\n        90,\n        90,\n        100,\n        100\n      ],\n      \"style\": \"solid\",\n      \"marker\": \"none\",\n      \"color\": \"#184c66\"\n    }\n  ]\n}\n```\n\nThere are fewer eligible handovers at higher cutoffs. At 67% we observe 9 eligible packages. At 75% there are 6. With the latter requirement, Click needs all 16 file commits in either order, although six suffice for a majority under largest first. Reordering files changes when a project qualifies. Reordering cannot make a project eligible if the complete term transfers too few lines.\n\n## Credit with whitespace ignored\n\nThere were zero changes to release attribution under the whitespace-insensitive comparison at any of the 120 endpoints across the two schedules. No successor became eligible under that audit. No author acquired line credit from metadata-only commits either. Together the controls locate the effect in the last-edit attribution of changed file content. A commit that restores the entire release tree transfers credit because the immediately preceding tree is different. A commit that retains the current tree transfers none.\n\n# Discussion\n\nWith the retirement rule used here, a project can authorize another departure whenever it can deliver a new successor across the threshold. The same set of editable lines can serve every term under ordinary blame. At the end of the first round trip in this study, the release has passed through two eligible departures and has the same repository tree as before the first appointment. A third appointment can begin with the first intervention verbatim.\n\nThere are two separable decisions for a continuity office. It can make a once-only handover decision for each newly appointed successor. It can also ask whether the organization has gotten better at replacing staff after successive departures. Our measurements distinguish those decisions. Eligibility can recur even when the code audit has found no evidence of additional maintainable source. If the procedure requires changes in demonstrated responsibility, it needs observations that still distinguish roles when file content and author credit move independently. Review activity and other records of participation have been used for this purpose [@jabrayilzade].\n\nA simple control for a release-based process is to score both the current tree and the closest prior tree with equal content. Where both occur, a second query with whitespace ignored identifies cases in which the current distribution of authority depends entirely on formatting. These checks address different parts of the decision. The first identifies a return to a previous source state. The second also applies at intermediate endpoints, where the trees differ by spaces.\n\n# Threats to Validity\n\nOur ten projects are a convenience sample of Python releases. The eligible line shares depend on the proportion of the files occupied by multiline strings and other protected constructs. Other languages may require other transformations. The experiment includes no claim that typical formatting reviews are this extensive. A layout rewrite that splits or moves lines would also require a different line-matching check.\n\nGit author emails are identity labels. The six experimental appointments were simulated, and real contributors were never removed from a project. We measure the behavior of a rule applied to Git records. We do not observe either a developer's readiness to retire or a successor's ability to take over independent work. The majority convention weights every line equally. A procedure based on responsibility for specific modules or release duties can give a different decision. AST equality controls changes to the parsed program in one Python version. Other tooling can respond to whitespace in source text.\n\n# Conclusion\n\nA maintenance rule that treats last-edit credit as evidence of completed succession can release several successive rosters against one release tree. Reversing a whitespace change restores the file content and gives the next maintainer credit for the same lines. A retirement approval therefore depends on the direction from which a maintainer arrived at the tree, even when the project could distribute exactly the same source both before and after the appointment.\n\n\\appendix\n\n# Replication Details\n\nUse the tag and commit abbreviation in @tbl:corpus to locate each release. Enumerate package paths in lexical order. Keep both the original Git blob and the transformed blob for each edited file. For each term write the appropriate blobs to an index initialized from the preceding term's endpoint. After each file, record the index tree and write a commit with the current term's author and previous commit as its parent. Count the term author's nonblank records in `git blame --line-porcelain`, summing across files. The endpoint following each removal term must have the same tree ID as the release. Run `git blame -w` at that point and at release for the whitespace control. @sec:method specifies token protection, counting, and file order.\n","bibliography":"@inproceedings{abandonment,\n  author = {Avelino, Guilherme and Constantinou, Eleni and Valente, Marco Tulio and Serebrenik, Alexander},\n  title = {On the Abandonment and Survival of Open Source Projects: An Empirical Investigation},\n  booktitle = {2019 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM)},\n  pages = {1--11},\n  year = {2019},\n  doi = {10.1109/ESEM.2019.8870181}\n}\n\n@inproceedings{avelino,\n  author = {Avelino, Guilherme and Passos, Leonardo and Hora, Andre and Valente, Marco Tulio},\n  title = {A Novel Approach for Estimating Truck Factors},\n  booktitle = {2016 IEEE 24th International Conference on Program Comprehension (ICPC)},\n  year = {2016},\n  pages = {1--10},\n  doi = {10.1109/ICPC.2016.7503718}\n}\n\n@article{ferreira,\n  author = {Ferreira, Mívian and Mombach, Thaís and Valente, Marco Tulio and Ferreira, Kecia},\n  title = {Algorithms for Estimating Truck Factors: A Comparative Study},\n  journal = {Software Quality Journal},\n  volume = {27},\n  number = {4},\n  pages = {1583--1617},\n  year = {2019},\n  doi = {10.1007/s11219-019-09457-2}\n}\n\n@inproceedings{jabrayilzade,\n  author = {Jabrayilzade, Elgun and Evtikhiev, Mikhail and Tüzün, Eray and Kovalenko, Vladimir},\n  title = {Bus Factor in Practice},\n  booktitle = {2022 IEEE/ACM 44th International Conference on Software Engineering: Software Engineering in Practice (ICSE-SEIP)},\n  pages = {97--106},\n  year = {2022},\n  url = {https://arxiv.org/abs/2202.01523}\n}\n\n@article{gote,\n  author = {Gote, Christoph and Scholtes, Ingo and Schweitzer, Frank},\n  title = {Analysing Time-Stamped Co-Editing Networks in Software Development Teams Using git2net},\n  journal = {Empirical Software Engineering},\n  volume = {26},\n  pages = {75},\n  year = {2021},\n  doi = {10.1007/s10664-020-09928-2}\n}\n\n@misc{gitblame,\n  author = {{Git Project}},\n  title = {{git-blame} Documentation},\n  year = {2023},\n  note = {Version 2.43.0},\n  url = {https://git-scm.com/docs/git-blame/2.43.0}\n}\n\n@misc{pylex,\n  author = {{Python Software Foundation}},\n  title = {Lexical Analysis},\n  year = {2026},\n  note = {Python 3.14 Language Reference},\n  url = {https://docs.python.org/3.14/reference/lexical_analysis.html}\n}\n","figures":[],"options":{"citation_style":"numeric","venue_note":"Preprint."}}