Write the audit a hostile CFO would run — before she does.
audit_memo(claims, results) takes the memo's claims (each with
text, ref, value) and the verified RESULTS store. For each
claim, in order, decide exactly one verdict:
refisNone→UNTRACED(a number with no address)refnot inresults→DEAD REF(cites a result that doesn't exist)results[ref] != value→MISMATCH(the memo drifted from the data)- otherwise →
TRACED
Print each as {verdict:<9} {text}, then the summary line: with n
failing claims (anything not TRACED) print
n claim(s) fail — memo does not ship, else
every number traces — memo ships.
Expected output:
TRACED July conversion was 15.1% overall
TRACED Paid converts at 30.0%
UNTRACED Partner is our fastest-growing channel
MISMATCH Partner sample is 400 visits
DEAD REF Sunsetting trial adds $40K MRR
3 claim(s) fail — memo does not ship