Engineering Practice
Trunk-based: multiple-choice review
Six questions that cut across the whole unit. Each one mirrors a call you make in a real workflow argument — not a definition to recite, but a tradeoff to defend when someone says “trunk-based doesn’t scale.”
Confirm you can connect the unit’s spine: drift sets merge cost, short-lived branches cap it, flags decouple deploy from release, the green CI gate makes the shared trunk safe, merge queues hold it at scale, and cleanup is what makes the whole trade net-positive.
One engineer merges a 2,000-line feature the same hour they forked; another merges a 50-line fix from a three-week branch. Which merge is more expensive, and why?
A team reads 'trunk-based development,' turns off branch protection, and commits straight to main. A week later trunk is red twice a day and a credential leaked. What did they actually get wrong?
An engineer insists they can't integrate daily because their checkout rewrite isn't finished and 'you can't put half a flow on trunk.' What dissolves the objection?
You must replace the ORM across a continuously deployed service; the migration will take six weeks. What's the trunk-based way to do it?
At 50 PRs/day on one trunk, every PR is green before merge yet trunk still breaks a few times a week. What's the right fix?
Two years in, a trunk-based team has 400 flags, a 'new checkout' flag at 100% for a year with the old path still behind the else, and an incident from two flags whose combination was never tried. What's the root failure?
The through-line of the unit is one disciplined system, not a branching trick. Drift sets merge cost, so short-lived branches (three or fewer, gone within a day) cap it; feature flags decouple deploy from release so unfinished work rides on trunk dark and big refactors use branch by abstraction; the fast blocking green gate makes the shared trunk safe and merge queues hold it green at scale; and cleanup — delete the branch on merge, the flag on full rollout — is what stops branch debt from reappearing as 2^N flag debt. Adopt the branch model alone and you get the failure modes; adopt the whole system and the DORA numbers follow.