A fintech program manager oversees a 12-person team shipping a payments API from a main branch with weekly releases. Auditors require no direct pushes, two peer approvals, and passing status checks before merge. Which branch protection configuration should the program manager recommend to enforce review quality?
Select an answer to reveal the explanation.
Short Explanation
You can make audits smoother by letting branch protection enforce the review gates for you. Two fresh approvals and passing checks keep the main branch protected before a merge.
Full Explanation
The configuration requiring pull requests, two approvals, dismissal of stale reviews, and passing status checks is correct: pull requests prevent direct pushes, two peer approvals meet the audit threshold, stale-review dismissal ties approval to the commit actually reviewed, and required checks block merges until validation passes. Requiring signed commits instead of status checks can strengthen provenance and non-repudiation, but signatures do not show that tests pass, so that configuration misses the explicit validation gate. Retaining approvals after new commits may reduce re-review work, but an approval for an earlier diff remains effective after changes, weakening review quality. Allowing hotfix bypasses while requiring the other gates can speed incident response, but it creates an unreviewed path and conflicts with the requirement for controlled merges. An exam caveat is that useful audit safeguards do not substitute for a specifically required gate: signed commits cannot replace passing checks, and exceptions undermine enforcement. As a practical check, inspect main's protection settings to confirm two approvals, stale-review dismissal, and required status checks are enabled, bypass is not permitted, and both a direct push and a merge with failing or pending checks are rejected.