Weekly report performance and accuracy
The public read-only /report?from=YYYY-MM-DD&to=YYYY-MM-DD projection executes
three queries, independent of the number of pending recurring tests. It loads
the period's results and displayed relations once, the language catalog once,
and distinct performed predecessors of pending recurrences once. Historical
predecessor logs are not selected. No queue work is executed or modified.
Both dates are inclusive in the configured Django timezone. Invalid dates return HTTP 400; a reversed range collapses to the end day. Recurring summaries are explicitly independent of the date range and select the newest performed timestamp, then highest ID, separately for OTD and monthly results.
No-data periods are neutral. Null results remain unresolved, not failures. Success rate remains successful / all performed results; unresolved results are disclosed rather than silently removed from the denominator. Failure-only types are visible and failed OTD predecessors no longer display a success.
Evidence and release
The regression suite reproduced 3,005 queries for 1,000 pending rows before the fix and asserts three afterward, including both report templates. Eight new report tests and the existing suite passed: 821 total offline tests. No database migration, retention change, email or schedule change is needed.
Spec 035 extends the budget regression to failed recurring clones, eagerly loads predecessor/form relations without historical logs, and prevents empty or unresolved periods from showing the all-passed email footer. Both review findings were reproduced before the fix; 13 focused report tests pass after it.
After green CI, deploy the exact merge SHA through normal workflows. Verify the serving revision, HTTP 200, inclusive date inputs and representative weekly counts; record cold/warm latency, aiming for under five seconds. Confirm paused production triggers remain paused and queues are unchanged. Rollback uses the prior serving revision; never replay history to populate a report or send an email merely to validate template rendering.