One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.
Checkpoint: the brief gate. Three candidates, three AI-drafted
briefs. Each candidate dict has name, decided_by,
resume_lines (the line ids that exist on their resume), and
brief (claim dicts like the last step).
Write count_violations(candidate) — a claim is a violation if its
receipt is None while labeled "sourced", OR its receipt isn't in
resume_lines. Labeled inferences are fine.
Then brief_gate(candidate) returning one string, rules in order:
- violations > 0 →
"HOLD — {n} unverified claims"("unverified" covers both violation kinds — a missing receipt and a fake one; step four already told you which is worse) decided_byis"auto-screen"→"HOLD — decision owner is a tool, not a person"- otherwise →
"ATTACH — decision owner {decided_by}"
(A clean brief with a tool as decision owner still HOLDs — the receipts discipline never made the decision human's; rule 2 does.)
Print {name}: {result} per candidate. Expected output:
Maya Torres: ATTACH — decision owner D. Reyes
Jordan Lee: HOLD — 2 unverified claims
Sam Okafor: HOLD — decision owner is a tool, not a person
(Match it byte for byte — the dash after HOLD/ATTACH is an em-dash,
—, so copy it from the block above rather than reaching for the
hyphen key.)