Curriculum

Curriculum

Use Passing CI Checks as a Merge Gate

Scenario

Order the four steps required before merging a pull request into the main course branch.

  1. 1…
  2. 2…
  3. 3…
  4. 4…

Try it yourself

Select the merge-gate steps in the exact order they should happen.

Reveal the explanation
  1. Run local type-check, contract tests, and production build

    Step 1 · Catch obvious failures on your machine before pushing.

  2. Push the small commit and wait for clean-environment CI checks

    Step 2 · Prove the exact committed snapshot passes outside your laptop.

  3. Read the diff to confirm no silent test weakening or out-of-scope edits

    Step 3 · Human review verifies intent that green checks alone cannot judge.

  4. Merge only after both CI status and diff review are green

    Step 4 · Main branch stays releasable after every merge.

CI proves repeatability; diff review proves correctness of intent. Using both as a merge gate keeps the main branch trustworthy.

Review first

Your turn

Write a 3-item merge checklist for porting new course guides back into the main repository.

Common mistake Merging immediately after pushing without waiting for CI checks to finish.

Check your work

Checklist requiring (1) passing validation & contract tests, (2) clean production build in CI, and (3) diff review confirming baseline IDs are unchanged.

Quick check

Why is diff review still needed when every automated CI check passes?
Show the answer and reasoning

Correct answer CI cannot tell if someone made tests green by deleting assertions or drifting out of scope

Automated checks verify assertions; diff review verifies the assertions themselves are faithful and scoped.