lesson 3 of 3 · github actions for model checks — what a green check does and doesn't meangithub actions for model checks — what a green check does and doesn't meanlesson 3 of 3 · github actions for model checks — what a green check does and doesn't meangithub actions for model checks — what a green check does and doesn't meanlesson 3 of 3 · github actions for model checks — what a green check does and doesn't meangithub actions for model checks — what a green check does and doesn't meanlesson 3 of 3 · github actions for model checks — what a green check does and doesn't meangithub actions for model checks — what a green check does and doesn't meanlesson 3 of 3 · github actions for model checks — what a green check does and doesn't meangithub actions for model checks — what a green check does and doesn't meanlesson 3 of 3 · github actions for model checks — what a green check does and doesn't meangithub actions for model checks — what a green check does and doesn't meanlesson 3 of 3 · github actions for model checks — what a green check does and doesn't meangithub actions for model checks — what a green check does and doesn't meanlesson 3 of 3 · github actions for model checks — what a green check does and doesn't meangithub actions for model checks — what a green check does and doesn't meanlesson 3 of 3 · github actions for model checks — what a green check does and doesn't meangithub actions for model checks — what a green check does and doesn't meanlesson 3 of 3 · github actions for model checks — what a green check does and doesn't meangithub actions for model checks — what a green check does and doesn't meanlesson 3 of 3 · github actions for model checks — what a green check does and doesn't meangithub actions for model checks — what a green check does and doesn't mean
Checkpoint
One last thing before we move on. pass this to mark the lesson done, or skip and keep moving.
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_passedis False, return("block", "tests failed")— don't even look at the eval; a broken harness makes the score meaningless. - If
eval_scoreis belowthreshold, 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