37c9fc615c
Marty reported banner impressions never moving while text ads did. They were
serving the whole time — we were reading the counter backwards.
Measured against the live network, because none of this is documented:
TEXT `remaining` counts DOWN from the purchase to zero.
ad 2689: 1,111 left mid-flight, 0 once complete.
BANNER `remaining` counts UP as impressions deliver, straight past the
amount bought. ad 2707: 3,521 one day, 6,129 the next, on a 2,500
buy. Every live banner sits above its purchase and rising.
Reading both as count-down made every banner report "0 served" while quietly
delivering thousands — and made stop() treat delivered impressions as
unserved, so stopping a finished banner refunded the lot. That was giving
back inventory that had already been spent on the network.
interpret(kind, bought, stat) now resolves both directions in one place, used
by stop() and by the table. served + left always reconciles to what was
bought and neither can exceed it.
This also supersedes the earlier "counter drift" note: the drift WAS the
count-up, seen through a count-down lens.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>