Standard library only · runs in your browser
The shop owner sends one paragraph about refunds. A coding agent turns it into code in seconds, six times, and every version looks right. Your job is the part the agent can't do for you: decide what "right" means, precisely enough that a wrong version fails.
The owner's request, word for word:
> A customer can get a refund if they ask within 30 days of the item being delivered. Digital items can't be refunded once they've been downloaded. Orders under $5 aren't refundable. Final-sale items never are.
Write acceptance_cases(). It returns a list of cases, each shaped like this:
{"order": {"ordered": "2026-03-01", "delivered": "2026-03-05", "digital": False,
"downloaded": False, "total": 40.0, "final_sale": False},
"request_date": "2026-04-04",
"expected": True}run_suite(implementation) (provided) runs your cases against one implementation and returns "pass" when every case passes, "caught" when at least one fails.
The tests run your cases against the correct implementation, which must "pass", and against six versions the agent wrote, which must all be "caught". The agent's versions are packed below the line, like a deployed service you can only call. Write your cases from the request, not from the code.
acceptance_cases() -> list[dict] (run_suite(implementation) is provided)