promptdojo_

GitHub Actions for model checks — what a green check does and doesn't mean — step 7 of 7

Checkpoint

One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.

Final drill. Write the merge gate for a model repo: ci_verdict(run) takes a dict with tests_passed (bool), eval_score, and threshold. Rules, in order:

  • If tests_passed is False, return ("block", "tests failed") — don't even look at the eval; a broken harness makes the score meaningless.
  • If eval_score is below threshold, return ("block", f"eval {score} below {threshold}").
  • Otherwise return ("merge", f"eval {score} clears {threshold}").

The script exercises three runs and prints each verdict.

Expected output:

merge: eval 0.86 clears 0.8
block: eval 0.74 below 0.8
block: tests failed

full-screen editor opens — close anytime to keep reading.