fix(execution-worker): treat empty-conditions decision branch as catch-all#33
Draft
librowski wants to merge 1 commit into
Draft
fix(execution-worker): treat empty-conditions decision branch as catch-all#33librowski wants to merge 1 commit into
librowski wants to merge 1 commit into
Conversation
…h-all The no_branch_matched error message and the Sales Inquiry reference template both treat a branch with no conditions as the explicit catch-all, but branchMatches returned false for it — any input classified outside the keyword branches failed the whole run. Supersedes the empty-conditions bullet of packages/execution-core/decision-no-match.decision-log.md (the strict fail-fast core of that decision is unchanged); see apps/execution-worker/decision-catch-all.decision-log.md.
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.
Split out of #32 (found during WB-229 deployment verification) so the semantics change gets its own review.
The bug
A decision branch with an empty
conditionsarray never matched, while two shipped artifacts assume the opposite:no_branch_matchederror says "Add an explicit catch-all branch with no conditions"Any input the classifier labels outside the keyword branches fails the whole run. First reproduced when a model classified an input as "general"; local demos always happened to match
pricing/technical, so it never surfaced.The fix
branchMatchesreturnstruefor an empty conditions list. First-match order is preserved (a catch-all only fires when placed after conditional branches), and the strict fail-fast frompackages/execution-core/decision-no-match.decision-log.mdis untouched — a decision whose branches all have conditions and none match still throws.decision-no-match.decision-log.md(29.04.2026) explicitly declared empty-conditions branches non-matching, with a tautological condition as the catch-all idiom, and a test pinned that. This PR supersedes that clause (test updated); the reasoning is recorded inapps/execution-worker/decision-catch-all.decision-log.md. Review from the original decision's author would be valuable.