# Three pull requests, done over

I took one oversized pull request from each of three repos, measured what was really in it, and rebuilt it as a stack of smaller ones. Then I wrote down the naming and changelog rules that would have prevented it.

- Author: Joshua Jordan
- Published: 2026-11-12
- Tags: Git, Code review, AI
- URL: https://modataconsulting.com/blog/three-pull-requests-done-over

## Why look again

Companion to [Lean in hard, not blindly](/blog/lean-in-hard)

A 13,000-file pull request looks like negligence. Part of it is. But most of those files were built by a script, and counting them as code hides the real problem, which is smaller and easier to fix.

**Interactive figure.** Three pull requests to choose from: registry #17 (Component registry. 65 commits, open one day.), kliffit #35 (Client analytics app. 22 commits, open three days.) and wmc-mono #15 (Data pipeline monorepo. 50 commits, open five days.). registry #17 is selected.

Your choice here drives the next two sections.

## 1. How big was it really?

GitHub counts every changed line the same. A regenerated JSON snapshot and a rewritten focus handler both count as one line each. Switch the two filters on and watch the number.

**Interactive figure.** registry #17, 13,326 files. 642,223 lines, as the pull request page shows it, and 642,223 lines with no filter. Built registry JSON is 343,295 lines, Docs site source 150,885, Components and styles 36,788, Icon data 36,624, Tests 32,838, Demos 26,070, Other source 11,866 and Docs content 3,857. Hatched rows were produced by a build step or are data. Nobody was meant to read them line by line.

> **What the filter shows**
>
> In two of these, a quarter to three quarters of the lines were never meant to be read. That makes the headline less alarming and the remainder more so, because the part that needed review was hidden inside the part that didn't. In the third, every line was written and the filters change nothing.

Three small settings make this visible on every pull request from now on.

```text title=".gitattributes"
apps/api/public/**        linguist-generated=true
**/registry.json          linguist-generated=true
FILE_TREE.md              linguist-generated=true
bun.lock                  linguist-generated=true
```

- **Mark generated paths.** GitHub collapses files marked `linguist-generated` in the diff view, so the reviewer sees source first.
- **Regenerate once, last.** The registry branch regenerated its snapshot 16 times in 65 commits. One final `chore(registry): regenerate` commit keeps every earlier commit readable.
- **Let CI prove it.** A check that rebuilds the output and fails on any difference means nobody has to read generated files at all.

## 2. The same work as a stack

Here is each pull request again, cut along the lines its own commits already drew. Click a row to see the branch, the title and what it would have carried.

**Interactive figure.** registry #17 as 8 pull requests. 3 of 8 still need another cut. The first row is selected: refactor(icons): move icons to @/icons/core. One import path for icons, before anything else touches them. Almost all of it is the icon data moving. Branch: refactor/icon-core-paths. Size: 11,945 lines to read, plus 75,706 generated. From: 2 of the original commits. Needs: Nothing. 65 commits. Sizes are measured per commit group. Sixteen commits regenerated output and one built the preview. Together they are about 338,000 lines and belong to no row.

Three things came out of doing this honestly.

**Interactive figure.** The commits already knew. All three branches had clean, scoped commit messages. The split was sitting in the history. I merged each as one anyway. A split is not enough. Several rows are still tens of thousands of lines. Cutting by topic after the fact can't fix work that was never done in small steps. The changelog saw one topic. The release note for kliffit #35 is one clean sentence about humanized reports. A restyle of every shared control and two filter fixes shipped with it, unrecorded.

> **What I'd actually do differently**
>
> Merge the first row before starting the second. A stack that only exists at the end is a big pull request with extra steps. The size limit has to apply while the work is happening.

## 3. One change, from branch to changelog

Every change passes through the same six places, and each one has a name or a message to get right. Step through one real change from the registry stack.

**Interactive figure.** feat(ui): native overlays, as it should be, at step 01, Branch: feat/native-overlays. The type comes first, so a list of branches sorts by kind of work. 20 characters. The limit is 30, because the branch name becomes the preview hostname. One topic. If the name needs the word and, it's two branches. Format: type/topic

The chain matters more than any one link. With squash merging, the pull request title becomes the commit on `main`, and the body becomes its message. The release note is collected into the changelog. So a vague title is a vague history, and a bloated body is a bloated `git log`.

## 4. Try a name

These are the registry's real limits. A branch is at most 30 characters because it becomes part of a preview hostname. A title is at most 72. Type a subject and see what fails.

**Interactive figure.** Name builder, set to the real #17 title: type refactor, scope registry, subject native overlays, CSS scrollbars, page-layout shell. Branch: refactor/native-overlays-css, 28 / 30. Commit and PR title: refactor(registry): native overlays, CSS scrollbars, page-layout shell, 70 / 72. Has a subject. Fits in 72 characters. A comma or the word and means more than one change. Split it. Starts lowercase. No closing punctuation. Imperative mood. Says what specifically.

## 5. Changelogs I got right

I started versioning the Kliffit repo in June, and it took a few releases to find a shape. By August each entry names the area, says in one sentence what a user will notice, adds a few bullets, and stops. The pipeline repo got there too.

**Interactive figure.** Three entries from my own repos. The wmc-mono entry is shown: a patch release note for @wmc-mono/server. Compile Bronze duplicate-detection keys from the contract columns, avoiding repeated column-name sorting and hashing for wide reports. Preserve missing/null distinctions, nested-value equality and unexpected-column fallback. Persisted source signatures and output schemas are unchanged. One package and one bump level. The first sentence says what changed and why it's faster. The last two sentences say what did not change. That's what a nervous consumer is looking for.

> **The shape**
>
> Area: what changed for the person using it, in one sentence. Up to three bullets if it needs them. What stayed the same, if someone might worry. A table for anything that was renamed.

## 6. The rules, short

| Place            | Rule                                                           | Checked by                |
| ---------------- | -------------------------------------------------------------- | ------------------------- |
| Branch           | type/topic, 30 characters or fewer, one topic                  | Pre-push hook             |
| Commit           | type(scope): subject, 72 or fewer, imperative, no full stop    | Commit hook               |
| PR title         | The same format. It becomes the commit on main                 | Title check               |
| PR body          | Why first. Then consumer impact, deploys and evidence          | Template and length check |
| Size             | Under 400 hand-written lines. Generated paths don't count      | CI, using .gitattributes  |
| Release note     | One file per consumer-visible change, in the same pull request | Path check                |
| Changelog        | Never edited by hand. Collected from the notes at release      | Release workflow          |
| Generated output | One commit, last, reproducible in CI                           | Rebuild-and-compare check |

*The type, scope and length limits are the ones already in the registry's Git config. The 400-line limit and the length check on bodies are proposals I haven't adopted yet.*

## How I measured

- Sizes come from the merge commit compared with its parent in a local clone. They differ from GitHub's totals by a few percent.
- "Generated" is a path rule I wrote for each repo. It covers built registry JSON, catalog snapshots, the file tree, lockfiles, icon data, contract data and planning records.
- "Moved" uses Git's rename detection at 60% similarity.
- Stack sizes add up the lines in each commit, so a line edited twice on the branch counts twice. They show proportion, and they overstate the final diff.
- Kliffit is the app repo where I first set up versioning. The rewritten titles, bodies and notes in sections 3 and 4 are my examples. Section 5 quotes real entries, trimmed of commit links.
