Required checks should verify risks introduced by a change. A green pipeline is evidence only for the behavior the checks actually cover.
Before you start
You should understand commits, branches, the working tree and the staging area. Draw the commit graph before changing history. Try commands in a disposable repository with a clean working tree so you can observe exactly which references and files each operation changes.
The practical goal is to reason through this situation: A schema migration needs compatibility validation in addition to unit tests. Read the walkthrough first, then try the interview exercise before opening its answer. The important part is explaining the decision and its consequences, rather than remembering a definition alone.
Step-by-step walkthrough
Step 1: Name the introduced risk
A check should detect a concrete failure mode.
Step 2: Use representative evidence
Database migrations need compatibility tests beyond an application build.
Step 3: Set integration requirements
Required checks must run on the prospective change state.
Worked scenario
A schema migration needs compatibility validation in addition to unit tests.
A green unit suite does not prove a migration can handle existing production-shaped records. An isolated migration test applies the change to representative old data, verifies compatibility and checks its intended recovery policy. The pipeline’s green status means those executed assertions passed, not that every operational risk disappeared.
Common mistake
A check that merely builds does not prove production data migration safety.
Verify the behavior
Deliberately introduce the target failure and confirm the required check catches it.
Interview exercise
Choose a required test.
Answer and reasoning
Link the test to a concrete failure mode and run it in a representative, isolated environment.
Continue learning
Compare the scenario with the Git and CI/CD interview questions and test your understanding with the Git and CI/CD MCQs. For terminology and implementation details, consult the reference material.