This feature query is supposed to respect the training cutoff, but marcus comes back with a total of 40.0 — his leaky March event slipped in. The cutoff never made it into the query: 'cutoff' in quotes is the literal five-letter string, not the variable. Fix the query so the cutoff value is actually applied (use a ? placeholder). Riley shows up as None either way — her only event has a NULL amount, so SUM returns NULL. That part is honest, not a bug.
The break is on line 13 — but read the whole snippet first.