fix: default max_items to 1 at runtime to prevent unbounded batch fan-out#570
Merged
fix: default max_items to 1 at runtime to prevent unbounded batch fan-out#570
Conversation
…-out Existing flows lacked a persisted max_items value, causing the ?? 0 fallback (unlimited) to trigger. This led to hundreds of child jobs from a single Ticketmaster/Dice.fm fetch, flooding the Action Scheduler queue. The settings UI already defaulted to 1 but that was only a form hint, never applied at runtime.
Homeboy Results —
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
max_itemsdefaulting to0(unlimited) at runtime when flows lack a persisted value$config['max_items'] ?? 0→$config['max_items'] ?? 1inFetchHandler::get_fetch_data()Problem
The
FetchHandlerSettingsUI defines'default' => 1formax_items, but that's only a form pre-fill hint — it's never applied when the field is absent from stored config. At runtime,?? 0meant unlimited.Every Ticketmaster/Dice.fm/Reddit fetch returned ALL items, each fanning out into a child job with its own LLM call. Dice.fm Chicago alone returned 99 events → 99 child jobs. Across 46 parent batches, 309 child jobs were created with 261 stuck in processing, flooding the Action Scheduler queue with 331+ pending actions.
Fix
One-line change: runtime fallback matches the settings UI default. Flows that explicitly want batch fan-out must set
max_items> 1 in the handler settings UI.Already hotfixed on production — this PR formalizes the fix.