A fintech startup with 12 developers ships payment fixes from main and had two unreviewed hotfixes cause outages. They need peer review, blocking checks, and a clean history while still allowing urgent fixes. Which branch strategy and protection configuration should the lead recommend?
Select an answer to reveal the explanation.
Short Explanation
You need branch protection on main: two reviews and status checks keep payment fixes from slipping through unchecked. A hotfix branch path gives you a route for urgent work while keeping changes reviewable and the history clean.
Full Explanation
The pull-request strategy with two reviews and status checks on main best addresses the outages caused by unreviewed hotfixes: peer review adds oversight, while checks help catch defects before changes merge. Pull requests also create a clean, auditable history, and a hotfix branch path preserves a route for urgent fixes without making direct, unreviewed changes to main the default. Requiring two reviews but leaving status checks advisory fails because urgency can still allow code that has not passed required tests or validations to merge. Requiring two reviews and blocking checks but allowing merge commits fails the clean-history goal: merge commits can add branching noise that complicates tracing, reverting, or bisecting payment defects. Requiring two reviews and blocking checks while freezing all emergency hotfixes fails operationally because critical fixes may be delayed or pushed through risky workarounds. Exam caveat: distinguish blocking checks from advisory checks, and preserve an emergency path without confusing it with permission to skip safeguards. Practical check: confirm main requires two approvals and passing status checks, then verify the hotfix branch path is documented and does not become a way to bypass review or checks.