Task · AIO-0001.04

Shape in-app traffic by time of day and matchday, with probes as incidents

Description

Load generator traffic is a flat Poisson stream all day and 5% of first questions carry a prompt-injection “Tool note” at a constant rate, so the dashboards show a flat line and guard warnings look mechanical. A real sports site peaks around kick-off and in the evening, and abuse arrives in bursts. The daily budget guard must keep bounding spend.

Acceptance Criteria

Definition of Done

Implementation Plan

  1. Daily rate curve (configurable) with kick-off peaks from fixture kickoff hour/weekday. 2. Injection probes as bursts from one reader with a configurable mean interval. 3. Test that the daily budget guard still caps spend under the curve.

Implementation Notes

Curve: dailyCurve (24 UTC multipliers, renormalised so requestsPerMinute stays the mean) x kick-off boost (2.5x at a fixture’s kickoff hour/weekday, 1.6x either side), chart values loadgen.dailyCurve / kickoffPeaksEnabled / injection.*; a 0 hour now waits a minute instead of forever (CodeRabbit), schema rejects an all-zero curve. Injection bursts: mean 4h, 1-3 probes from one reader. Budget test drives the peak hour at 60 rpm against a 0.02 USD cap. Live: loadgen on v0.2.0 logging loadgen_request within budget.

Final Summary

Loadgen arrivals follow a configurable UTC daily curve with recurring kick-off peaks, and injection probes come as occasional single-reader bursts; the daily budget guard is proven to hold at peak by a test.

View the source file on GitHub