Feature Summary
Executor loading validates that user code defines exactly one operator with an assert. Optimized Python removes that validation, so code with multiple operators silently selects the first definition and can run unintended logic.
Before: multiple operator definitions -> first operator is silently selected
After: multiple operator definitions -> ValueError rejects ambiguous code
Reproduction evidence:
- Run the Python worker with optimization enabled.
- Load user code defining two concrete operators.
- Observe that the first operator is returned without an error.
A direct run on main produced:
optimized= True
selected_definition= FirstOperator
error_raised= False
Version and commit evidence:
1.3.0-incubating-SNAPSHOT (main)
Commit Hash
70c2114
What browsers are you seeing the problem on?
Not browser-specific.
Relevant log output
None.
Proposed Solution or Design
After: multiple operator definitions -> ValueError rejects ambiguous code
Affected Area
Workflow Engine (Amber)
Feature Summary
Executor loading validates that user code defines exactly one operator with an assert. Optimized Python removes that validation, so code with multiple operators silently selects the first definition and can run unintended logic.
Before: multiple operator definitions -> first operator is silently selected
After: multiple operator definitions -> ValueError rejects ambiguous code
Reproduction evidence:
A direct run on main produced:
Version and commit evidence:
1.3.0-incubating-SNAPSHOT (main)
Commit Hash
70c2114
What browsers are you seeing the problem on?
Not browser-specific.
Relevant log output
None.
Proposed Solution or Design
After: multiple operator definitions -> ValueError rejects ambiguous code
Affected Area
Workflow Engine (Amber)