evals / debt-migration
monthly-report
Expected
Hidden from the reviewer, like the grading note below.
- legacy-fetch-strict
- violation
A new monthly_report function calls legacy_client.fetch, copying daily_report and weekly_report. It adds a call the contract forbids.
Change
app/reports.py
+4
8 unmodified lines910111213141516178 unmodified lines return legacy_client.fetch(f"/reports/weekly/{week}")
def monthly_report(month: str) -> dict: return legacy_client.fetch(f"/reports/monthly/{month}")
def report_title(kind: str, period: str) -> str: return f"{kind.title()} report for {period}"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.