Meridian Media asks for a readable settlement calculation whose valid behavior is preserved. Write characterization checks first, extract a frozen record parser, validate malformed rows, group accounts, add credit rules, and expand the tests. Probe modes represent deliberate defects in the function under test, not real service calls.
The fictional Meridian Media team has a settlement function that mixes decoding, state rules, totals, and formatting. Its valid behavior must survive a cleanup. Start with exact characterization tests, then extract parsing into a value record before adding validation and grouped output. The project includes intentionally faulty probe modes so an empty or always-passing test runner can't satisfy the checks.
Your previous code carries into each step. Keep valid closed records separate from rejected input, preserve duplicate contributing rows, and make credit subtraction an explicit state policy. The final parser rejects blank account ids and the regression set grows to cover the new boundaries. The deliverable reports how many characterization tests passed, each account total, the grand total, and rejected rows.