evals / debt-migration
order-payments
Expected
Hidden from the reviewer, like the grading note below.
- legacy-fetch-strict
- violation
A new order_payments function in orders.py calls legacy_client.fetch. It adds a forbidden call beside the existing ones.
Change
app/orders.py
+4
6 unmodified lines789101112136 unmodified lines
def order_items(order_id: str) -> list: return legacy_client.fetch(f"/orders/{order_id}/items")["items"]
def order_payments(order_id: str) -> list: return legacy_client.fetch(f"/orders/{order_id}/payments")["payments"]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.