evals / debt-migration
billing-refund
Expected
Hidden from the reviewer, like the grading note below.
- legacy-fetch-strict
- holds
billing.py gains refund(), which calls client.get. The file has no legacy_client.fetch call before or after the change, so the contract holds.
Change
app/billing.py
+4
2 unmodified lines34567892 unmodified lines
def invoice(client: Client, invoice_id: str) -> dict: return client.get(f"/invoices/{invoice_id}")
def refund(client: Client, invoice_id: str) -> dict: return client.get(f"/invoices/{invoice_id}/refund")Contracts
legacy-fetch-strict
---
name: legacy-fetch-strict
message: Use api.Client.get instead of the deprecated legacy_client.fetch.
---
## Rules
This contract governs Python source under `app/`.
Do not call `legacy_client.fetch`. Call `api.Client.get` instead.