fix: silence fan-out grandchild handler-miss noise#954
Merged
Conversation
Fan-out child jobs that don't receive the handler result (because a sibling got it) are expected behavior, not failures. Previously these logged as 'failed - required_handler_tool_not_called' (~1,328/day), creating noise in job status tables and logs. Now: if the job is a fan-out child (has parent_job_id), complete it as 'completed_no_items' with debug-level logging instead of warning-level failure. The sibling that got the handler result still processes normally. Result: ~1,300 fewer noisy failure rows per day in the jobs table.
chubes4
added a commit
that referenced
this pull request
Mar 24, 2026
…hildren When the AI step calls both a handler tool (upsert_event) and a non-handler tool (daily_memory), it produces 2+ DataPackets. The engine fanned ALL of them into child jobs, but only the ai_handler_complete packet carries data the UpdateStep needs. Non-handler packets (tool_result, ai_response) created child jobs guaranteed to fail with 'required_handler_tool_not_called'. Fix: before fan-out, filter to only ai_handler_complete packets. If filtering reduces to ≤1 packet, use inline continuation instead of fan-out. The UpdateStep bandaid (PR #954) is kept as a safety net but should no longer trigger. Result: eliminates ~1,300 dead grandchild jobs/day at the source instead of silencing them downstream.
chubes4
added a commit
that referenced
this pull request
Mar 24, 2026
…hildren (#956) When the AI step calls both a handler tool (upsert_event) and a non-handler tool (daily_memory), it produces 2+ DataPackets. The engine fanned ALL of them into child jobs, but only the ai_handler_complete packet carries data the UpdateStep needs. Non-handler packets (tool_result, ai_response) created child jobs guaranteed to fail with 'required_handler_tool_not_called'. Fix: before fan-out, filter to only ai_handler_complete packets. If filtering reduces to ≤1 packet, use inline continuation instead of fan-out. The UpdateStep bandaid (PR #954) is kept as a safety net but should no longer trigger. Result: eliminates ~1,300 dead grandchild jobs/day at the source instead of silencing them downstream.
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
Fan-out child jobs that don't receive the handler result (because a sibling got it) now complete as
completed_no_itemsinstead of failing withrequired_handler_tool_not_called.Problem
The 3-step pipeline fan-out creates N children + ~2N grandchildren. Only 1 child's output packet contains the handler result the UpdateStep needs. The rest (~1,328/day) fail with
required_handler_tool_not_called— expected behavior logged as noisy failures.Fix
In
UpdateStep::executeStep(), before building the failure packet:isFanOutChild()— looks forparent_job_idin engine_datasuccess: true+job_status = 'completed_no_items'debuglevel instead ofwarningThe sibling that got the handler result still processes normally. Parent completion roll-up (
onChildComplete) is unaffected — it already handles mixed child statuses.Impact
1.4% failed→~0.03% failed(only real failures remain)