Skip to content

Build Not yet confirmed elsewhere1 publisher 3 min read Published

After five months behind main, classifying 312 conflict hunks helped turn a two-week rebase estimate into 11 hours

The leverage in this rebase sits in routing rather than prompting, and the three regexes that decide which hunks skip the model entirely are tuned to one repository's five months of noise. Copying the method means re-deriving them.

The Engineer · Build desk

Send a correction

Illustration accompanying After five months behind main, classifying 312 conflict hunks helped turn a two-week rebase estimate into 11 hours
Generated illustration

What happened

  • The branch was a storage-layer rewrite begun in February and kept alive on "we'll land it next sprint", and by July it sat five months and 1,900 commits behind main.
  • Rebasing it onto main produced 312 conflict hunks across 137 files, including content conflicts in the storage adapter and index and an add/add conflict on an LRU cache file.
  • A first attempt that simply opened the repo in Claude Code and asked it to resolve the merge conflicts got through about 40 hunks before it went sideways.
  • A triage script then classified every hunk and split the 312 into 117 mechanical, 171 semantic and 24 human-only, each class routed to a different resolver.
  • Semantic hunks went to the model ten at a time behind a build-and-test gate, and the whole rebase landed in 11 hours against a two-week budget.

Why it matters

  • What it limits constraint The gate can only fail a batch that breaks the build or an existing test, so the plausible-but-wrong resolution the author names as the real danger rides straight through it, leaving the human queue and the decision log as the only defence.
  • What it costs cost Adoption is priced in gate runs rather than tokens: at least 18 build-and-test cycles plus every retry, so a team with a 30-minute pipeline pays in wall clock what this author paid in review attention.
  • Who has to decide decision Anyone lifting this harness has to re-derive the mechanical patterns against their own repo's churn first, or they will hand hunks with real semantics to a three-line regex list.
  • What it sets up precedent If a five-month rebase can be done for roughly a seventh of the hand-rolled budget, the cost argument for killing long-lived branches early gets weaker, and more of them get kept alive on the same promise.

The economics of this pipeline are set by one guard inside the classifier. `classify()` calls a hunk mechanical only when every line on both sides is blank or matches one of three regexes [15]. Everything else falls through to the model or to the human queue. That default is the right way round: each hunk has to earn its place on the cheap path before it gets there.

The three patterns tell you what repository this was. One matches lines beginning with `import` or `from`, one matches a quoted key followed by a quoted version string, one matches Markdown-style bullets [16]. Between them they cover import block collisions, lockfile churn, formatter disagreements and two branches appending to the same list [14]. That is 37.5 percent of the hunks routed around the model [21]. For that share to transfer, your drift has to be made of the same noise. A repo whose five months of churn is generated clients, resource YAML or renamed fixtures will see the mechanical bucket shrink and the model's share grow, and the second-order cost of that lands on review attention rather than tokens.

Now the gate. A passing batch is committed and recorded in `resolutions.md`; a failing batch is reverted and re-run with the failure output attached [13]. Worth being precise about what that buys, because the author's own statement of the danger is a resolution that compiles and passes the tests that happen to exist while shipping a bug that looks like it was always there [10]. A green build and a green suite cannot detect that, by construction. What actually stands against picking a side to make the markers go away [6] is the human-only queue and the written record. `resolutions.md` is doing the job the chat session failed at: conflict #12 in `adapter.ts` settled the new retry signature, conflict #88 in a caller reintroduced the old one, and nothing in the session tied the two together [7].

Batch size sets the clock. 171 semantic hunks at ten per batch is 18 batches at minimum [22], so the build-and-test cycle runs at least 18 times before any revert-and-retry loop [13]. Against 11 hours of wall clock that averages about 37 minutes per batch for context assembly, model time, gate, review and commit [23]. If your gate takes 25 minutes, the arithmetic stops working and the method does not fit.

The piece I would want before copying this is the context bundle. The published excerpt breaks off inside the classifier and never says what goes into one [19], and that is exactly where intent is supplied, which the author identifies as the thing the agent was never shown [9]. Everything around it is scheduling, and scheduling is the easy half. Two weeks was the hand estimate [4]; on a branch kept alive by "we'll land it next sprint" [3], estimates had a track record.

What to watch

  • A released triage script, which would let teams measure their own mechanical share instead of inheriting three regexes tuned to one repo.
  • Whether resolutions.md holds up as decisions accumulate, or whether cross-file rulings need to be machine-enforced rather than merely recorded.
  • Whether the human-only bucket stays near 8 percent of hunks on a branch that is not a storage-layer rewrite.

Clarity's read

What the record supports and how the coverage leans. The claims behind it follow.

Reality

Evidence45
Adoption12
Hype gap+20
Incentives55
Confidence52
Why these scores

Claim ledger

Ranked by verification strength, evidence, and original report placement.

  1. [1]

    The rebase took 11 hours instead of the two weeks the author had budgeted.

  2. [2]

    Running `git rebase main` on the branch produced 312 conflict hunks across 137 files, including content conflicts in src/storage/adapter.ts and src/storage/index.ts and an add/add conflict in src/storage/cache/lru.ts; `git diff --name-only --diff-filter=U | wc -l` returned 137.

    Reported Supported Source: dev.to write-up by the branch's authorView cited source
  3. [3]

    The branch was a storage-layer rewrite started in February and kept alive by "we'll land it next sprint"; by July it was five months and 1,900 commits behind main.

    Reported SupportedView cited source

Get this ledger inside ChatGPT. Ask about any of our stories and the answer brings its figure, each claim’s verdict and the sources. Free, no account.

Add to ChatGPTAdd to Claude

Sources

1 independent publisher whose own reporting we read for this story.

  1. dev.to

    1 article · August 30, 2026

    How I Let Claude Code Resolve 312 Merge Conflicts in One Rebase: 5 Lessons

Share your take

Let Clarity write the post for you.

Signed-in readers get a short post drafted on this story in the register they choose — narrative, analytical, or a direct position — editable to the last word before it goes anywhere. The share buttons at the top of this story work without an account.

Topics and entities

Follow any of these and your For You feed starts watching them — no settings page required.

Topics

Loading related stories