Since Phase 3 the consumption side (disjoint claiming, per-slug locks,
the inflight cap) fully supports concurrent batches, but nothing created
more than one trigger per completed batch: once uploads stopped, a KB
with a standing backlog drained at 1 batch x batch-size per cycle
regardless of ingest_max_inflight, leaving the wiki pool and the model
server idle.
followUpTriggerCount now re-arms min(batches the remaining rows still
need, slots that could be free when the triggers fire). The caller's
own slot releases right after scheduleFollowUp returns, hence the +1.
activeInflightSlots is a read-mostly Lua companion to the reserve
script (purge expired, then ZCARD); -1 means unknown (no Redis / Redis
error) and collapses to a single follow-up, as do maxInflight <= 1 and
Lite mode (liteLocks serialize per KB anyway). Fan-out is deliberately
skipped on a rate-limited exit so a 429 storm is not amplified.
Over-issued triggers are harmless: the ones that cannot get a slot are
acked and coalesced by scheduleCappedRetry's fixed TaskID. The slot
count renders as "unknown" in the log when it was not consulted.