lesson 2 of 6 · the ratchet — every mistake becomes a rulethe ratchet — every mistake becomes a rulelesson 2 of 6 · the ratchet — every mistake becomes a rulethe ratchet — every mistake becomes a rulelesson 2 of 6 · the ratchet — every mistake becomes a rulethe ratchet — every mistake becomes a rulelesson 2 of 6 · the ratchet — every mistake becomes a rulethe ratchet — every mistake becomes a rulelesson 2 of 6 · the ratchet — every mistake becomes a rulethe ratchet — every mistake becomes a rulelesson 2 of 6 · the ratchet — every mistake becomes a rulethe ratchet — every mistake becomes a rulelesson 2 of 6 · the ratchet — every mistake becomes a rulethe ratchet — every mistake becomes a rulelesson 2 of 6 · the ratchet — every mistake becomes a rulethe ratchet — every mistake becomes a rulelesson 2 of 6 · the ratchet — every mistake becomes a rulethe ratchet — every mistake becomes a rulelesson 2 of 6 · the ratchet — every mistake becomes a rulethe ratchet — every mistake becomes a rulelesson 2 of 6 · the ratchet — every mistake becomes a rulethe ratchet — every mistake becomes a rule
Checkpoint
One last thing before we move on. pass this to mark the lesson done, or skip and keep moving. hop to the next when you're ready.
Final ratchet drill. Combine the audit + the leverage assessment
into one function: triage_ratchet(rules).
Each rule is a dict with date (YYYY-MM-DD), rule (string), and
model_native_in_year (int, 9999 if never).
Return a dict with three fields:
kept_count: int, rules still earning their place (model_native_in_year > 2025)remove_count: int, rules to retire (model_native_in_year <= 2025)highest_leverage: string, the rule with the MOST RECENTdateamong the kept rules (the rule that most recently earned its place is the highest-leverage rule still in the harness)
On a tie for the most recent date, return the LAST one in input
order (Python's max is stable).
Five rules run. Expected output:
{'kept_count': 3, 'remove_count': 2, 'highest_leverage': 'use structlog, not stdlib logging'}