evals / debt-migration
comment-reports
Expected
Hidden from the reviewer, like the grading note below.
- legacy-fetch-strict
- holds
The change adds a comment above report_title in reports.py. The file's two legacy_client.fetch calls predate it and are unchanged. The change adds no call, so the contract holds for it.
Change
app/reports.py
+1
8 unmodified lines910111213148 unmodified lines return legacy_client.fetch(f"/reports/weekly/{week}")
# Titles appear in the dashboard header.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.