Cloudflare-Worker not deleting expired bans


I’ve got my cloudflare-worker-bouncer setup and working mostly fine. The issue, though, is that the majority of expired bans aren’t removed from the KV once the bouncer is told to delete them.

In 100% of cases, the LAPI communicates to the bouncer that the ban should be deleted, as evidenced by a large number of log lines like this that match each ban’s timestamp:

time="07-05-2024 14:23:22" level=info msg="Received 1 deleted decisions"

But when looking at the last 100 lines of the bouncer’s log that contain the word “delete,” of the 32 lines saying the bouncer received 1 delete decision, only 11 were followed by:

time="07-05-2024 14:23:22" level=info msg="Deleted 1 decisions" account=redacted

What’s happening here? Why are 2/3 of these deletions not being carried out by the bouncer, even though the bouncer is told about them?