How to Test Mycroft's Finance AI Agent: Breaking the Books on Purpose
A clean test run proves almost nothing about a finance AI agent. Adwait breaks down the adversarial harness that plants tiny defects to prove the controls actually catch errors.
A successful test run on clean data proves almost nothing about whether an AI system's controls actually work. That's the hard truth Adwait opens with in this look at how the Mycroft Finance Investigator gets tested. Last week's run went clean and produced a verified variance, but a green light on good data doesn't tell you what happens when the data is wrong. This week, the team broke the books on purpose to find out.
Why a passing run isn't proof
A finance control only means something if it catches a real error when one shows up. If the numbers don't reconcile, the system has to reject them outright, not quietly compute a wrong answer and move on as if nothing happened. And if the agent tries to overreach its authority, the gate stopping it has to actually hold. None of that can be learned from a run where everything handed to the system was already correct. You have to feed it failures to find out whether the controls are real or just theater.
Designing the adversarial harness
The evaluation harness Adwait describes works by making a fresh temporary copy of the synthetic data for every single test case, planting exactly one defect into that copy, and then observing what the system actually does: does it validate, investigate, or send the case to review? The result gets checked against an explicit, written expectation for that case. Crucially, the real books are never touched in any of this. The damage is fully sandboxed, and the outcome gets compared against the expectation rather than judged by feel.
Four reconciliation defects, each tiny on purpose
Four of the planted defects target reconciliation, the checks that confirm the books agree with themselves. They are an actuals-to-ledger mismatch, an unmapped account, a customer-to-revenue mismatch, and a headcount-to-payroll mismatch. Each one should get caught at validation and rejected before it can ever reach the deeper analysis engine. The defects are deliberately tiny, and that's the entire point of the design: a ledger mismatch is just one dollar off on the first actuals row, an unmapped account is a single row popped out of the mapping table, and the customer and headcount mismatches each shift a single number by one dollar. If a defect that small can slip through undetected, the control isn't actually functioning.
Testing behavior, not just data
Two more test cases target behavior rather than data quality. One caps the investigator agent at a single step and checks that it actually stops instead of running indefinitely. The other has an agent attempt to approve its own decision, testing whether the system correctly refuses that kind of unauthorized self-approval. Against all six of these failure cases stands a valid baseline: the same clean run from before, reproducing a variance of minus $120,000 in EBITDA, in seven steps, backed by 41 evidence references, with an open human gate at the end.
The scorecard, and its honest limits
The evaluate command runs every case in its own sandbox and produces a scorecard. Seven of seven expectations matched: four defects correctly rejected, two behavioral overreaches correctly refused, and one clean baseline reproduced exactly as specified. Combined with the rest of the project's test suite, that brings the total to 24 passing tests. Adwait is explicit about what this scorecard does and doesn't prove: a passing scorecard only proves that these specific, named synthetic cases behaved as specified. It is not model confidence, it is not production certification, and it is not a substitute for a human's judgment about whether the set of test cases is even adequate. That last judgment stays marked as pending human review.
Key takeaways
- A clean, successful test run on good data proves almost nothing about whether a finance agent's controls actually work.
- The harness makes a fresh sandboxed copy of the data per test case, plants exactly one defect, and checks the outcome against a written expectation.
- Four reconciliation defects were planted, each a single dollar off or a single row wrong, and all four should be rejected at validation.
- Two behavioral tests check that a step-limited agent actually stops and that an agent attempting to approve its own decision gets refused.
- The result was seven of seven expectations matched and 24 total passing tests, but the team is explicit that this proves the synthetic cases behaved as specified, not that the system is certified or production-ready.
Try it yourself
It's easy to demo an AI agent on data you curated yourself. It's much harder to prove it behaves correctly when the data is wrong. If your own finance agent, or any agent making consequential decisions, only works when the input data is clean, ask yourself honestly whether you've actually tested it. This kind of adversarial testing discipline runs through the Mycroft Financial AI work at Humanitarians AI.
Chapters
- 0:00The hard truth: Why successful runs aren't proof of real controls
- 0:35Designing an adversarial evaluation harness sandbox
- 1:10Planting 4 reconciliation defects ($1 mismatches and unmapped accounts)
- 1:55Testing behavioral constraints: Steps limits and unauthorized gate-clearing
- 2:35Interpreting the scorecard: Why testing synthetic cases is not certification
- 3:15The final test: Does your agent actually break when it should?
Full transcript(auto-generated, with timestamps)
The hard truth: Why successful runs aren't proof of real controls
[0:00]This is Onyx in for Humanitarians AI. This week on the Microft Finance Investigator, a hard truth about testing. Last week the agent ran clean and produced a verified variance, but a green run on good data proves almost nothing. The real question, when the books are broken, do the controls fail safely? So this week we break them on purpose. Act one, a passing run is not proof. A finance control is only real if it catches a real error. If the numbers don't reconcile, the system has to reject them, not quietly compute a wrong answer. And if the agent tries to overreach, the gate has to hold. You can't learn any of that from a run where everything was already correct. You have
Designing an adversarial evaluation harness sandbox
[0:36]To feed it failures. Act two, the evaluation harness. Here's the harness. For every case it makes a fresh temporary copy of the synthetic data, plants exactly one defect, then observes what the system does, validation, investigation, or review, and checks the result against an explicit written expectation. The real books are never touched. The damage is sandboxed and the outcome is compared, not judged. Four of the defects break reconciliation, the checks that make sure the books agree with themselves. An actuals-to-ledger mismatch, an unmapped account, a customer-to-revenue mismatch, a headcount-to-payroll mismatch. Each
Planting 4 reconciliation defects ($1 mismatches and unmapped accounts)
[1:10]One should be caught at validation and rejected before it can ever reach the engine. And the defects are tiny, that's the point. A ledger mismatch is $1 off the first actuals row. An unmapped account is a single row popped from the mapping. The customer and headcount mismatches each shift one number by a dollar. If a $1 break slips through, the control isn't real. Two more cases test behavior, not data. One caps the investigator at a single step and confirms it stops instead of running forever. The other has an agent try to approve its own decision and gets refused. Against all six failures stands the valid baseline, the same clean run reproducing minus 120,000 in EBITDA variance, seven steps, 41 evidence references, and an open human gate. Act three, the scorecard. The evaluate command runs every case in its own
Testing behavioral constraints: Steps limits and unauthorized gate-clearing
[1:56]Sandbox and writes a scorecard. Seven of seven expectations matched, classified as a synthetic adversarial evaluation. Four rejected defects, two refused behaviors, one clean baseline, all as specified. With the rest of the project, the suite now stands at 24 passing tests. Now the honest part, and the harness says it out loud. A passing scorecard proves only that these named synthetic cases behaved as specified. It is not model confidence. It is not production certification. And it is not a human's judgment that the case set is adequate that stays marked pending human review. The verdict, testing a finance agent means proving it fails safely, not just that it can succeed. This week's
Interpreting the scorecard: Why testing synthetic cases is not certification
[2:36]Harness plants four reconciliation defects and two behavioral overreaches in isolated copies of the data and confirms everyone is caught against a clean baseline that still reproduces the verified result. Seven of seven expectations matched, 24 tests passing, and it verifies only these synthetic cases, not confidence. Not certification, not adequacy. Your turn. It's easy to demo an agent on data you curated yourself. It's much harder to prove it behaves when the data is wrong. So, honestly, if your finance agent only works when the data is clean, have you really tested it? How do you test a finance agent? Break the books on purpose. This is Onyx in for Humanitarian's AI.
More from Mycroft Financial AI
3:29Building an Evidence-Driven AI Variance Engine in 3 Weeks for Mycroft
3:18Deterministic What-Ifs in Mycroft: Scenario Analysis Without AI Guessing
3:17Mycroft Update: Why Your AI Agent Ignores Your Code
3:47Fencing the AI: Why Our Finance Agent Cannot Approve Itself
3:53Refusal by Design: Implementing 15 Failure Safeguards in AI for Mycroft
2:17