Summary
Every test file that touches ad_seller.flows (dozens of them) carries this boilerplate, first introduced in 530df34 (March 2026):
# Stub broken flow modules (pre-existing @listen() bugs with CrewAI version mismatch)
_broken_flows = [
"ad_seller.flows.discovery_inquiry_flow",
"ad_seller.flows.execution_activation_flow",
]
It replaces both modules with fake empty classes before any test runs. I went looking for something else and ran into this, then actually tried running both flows for real instead of trusting the comment. The two modules aren't in the same shape — I want to report them separately rather than as one blob.
Part 1 — discovery_inquiry_flow.py: the stated reason is stale
At 530df34, crewai was pinned at >=0.86.0 (pre-1.0). It's >=1.14.4,<2.0.0 now (resolves to 1.15.2) — a major version bump, the kind that plausibly broke and later fixed a decorator API like @listen(). So I tested it directly rather than guessing:
DiscoveryInquiryFlow().kickoff_async(...) completes cleanly across all four routing branches (default/catalog, "price"→pricing, "available"→availability, "target"→targeting) — every listener finishes, state.status == COMPLETED every time.
- Verified both as a standalone script and under
pytest itself (the actual context the stub is guarding), with a minimal isolated test file — no framework error anywhere.
- Also isolated the specific
or_() combinator pattern execution_activation_flow.py uses (see Part 2) in a bare-bones Flow against this same pinned crewai version — works correctly.
None of that reproduces a @listen() bug. As a direct consequence, grep -rl "DiscoveryInquiryFlow" tests/ returns nothing — the stub means no test file has ever exercised this module's real code, so nobody would notice either way. 295 lines of production flow logic with zero coverage.
Part 2 — execution_activation_flow.py: a real bug, just not this one
This one does crash for me, but not from @listen(). Running ExecutionActivationFlow().kickoff_async(...) (deal_id path, no live ad server configured) blows up with:
Task exception was never retrieved
future: <Task finished name='Task-7' ...> exception=RuntimeError('Attempted to exit cancel scope in a different task than it was entered in')>
...originating from mcp/client/streamable_http.py's cleanup path when UnifiedClient's OpenDirect MCP session fails to connect/initialize. The interesting part: the code already knows about a related class of problem — execution_activation_flow.py:91-96 wraps the call specifically "to prevent httpcore/anyio CancelScope from leaking into the parent flow listener task" and catches Exception around it:
try:
await asyncio.create_task(self._od_create_execution_order())
except Exception as e:
self.state.warnings.append(f"Execution order creation failed: {e}")
The crash I hit is a detached task exception ("Task exception was never retrieved") that never reaches that try/except at all, so the existing defense doesn't catch it and the whole kickoff_async() blows up instead of degrading to a warning the way the code clearly intends.
I don't know yet whether this only happens when the ad server connection fails outright (my test environment has none configured) or whether it can also surface against a real, reachable FreeWheel/GAM endpoint under some error condition — I haven't had a live ad server to test the success path against. So I can't tell you yet whether this is production-relevant or a test-environment artifact, and I'd rather say that plainly than guess.
What I'm asking
- Can someone confirm whether the
@listen()/CrewAI-version story is still accurate, or whether it's safe to drop the stub for discovery_inquiry_flow at least and let it get real test coverage?
- For
execution_activation_flow, is the cancel-scope leak something you've already seen, or worth a closer look as its own thing?
@atc964 — I'd like to take this one up if that's alright: drop the stale stub for discovery_inquiry_flow across the test files, add real coverage for it, and dig into the cancel-scope leak on execution_activation_flow separately (probably as two commits/PRs given they're different problems). Happy to hold off starting until you've had a chance to weigh in on whether the @listen() story checks out on your end too.
Environment
seller-agent main @ d55896e, crewai 1.15.2, 2026-08-18.
Summary
Every test file that touches
ad_seller.flows(dozens of them) carries this boilerplate, first introduced in530df34(March 2026):It replaces both modules with fake empty classes before any test runs. I went looking for something else and ran into this, then actually tried running both flows for real instead of trusting the comment. The two modules aren't in the same shape — I want to report them separately rather than as one blob.
Part 1 —
discovery_inquiry_flow.py: the stated reason is staleAt
530df34,crewaiwas pinned at>=0.86.0(pre-1.0). It's>=1.14.4,<2.0.0now (resolves to1.15.2) — a major version bump, the kind that plausibly broke and later fixed a decorator API like@listen(). So I tested it directly rather than guessing:DiscoveryInquiryFlow().kickoff_async(...)completes cleanly across all four routing branches (default/catalog,"price"→pricing,"available"→availability,"target"→targeting) — every listener finishes,state.status == COMPLETEDevery time.pytestitself (the actual context the stub is guarding), with a minimal isolated test file — no framework error anywhere.or_()combinator patternexecution_activation_flow.pyuses (see Part 2) in a bare-bonesFlowagainst this same pinnedcrewaiversion — works correctly.None of that reproduces a
@listen()bug. As a direct consequence,grep -rl "DiscoveryInquiryFlow" tests/returns nothing — the stub means no test file has ever exercised this module's real code, so nobody would notice either way. 295 lines of production flow logic with zero coverage.Part 2 —
execution_activation_flow.py: a real bug, just not this oneThis one does crash for me, but not from
@listen(). RunningExecutionActivationFlow().kickoff_async(...)(deal_id path, no live ad server configured) blows up with:...originating from
mcp/client/streamable_http.py's cleanup path whenUnifiedClient's OpenDirect MCP session fails to connect/initialize. The interesting part: the code already knows about a related class of problem —execution_activation_flow.py:91-96wraps the call specifically "to prevent httpcore/anyio CancelScope from leaking into the parent flow listener task" and catchesExceptionaround it:The crash I hit is a detached task exception ("Task exception was never retrieved") that never reaches that
try/exceptat all, so the existing defense doesn't catch it and the wholekickoff_async()blows up instead of degrading to a warning the way the code clearly intends.I don't know yet whether this only happens when the ad server connection fails outright (my test environment has none configured) or whether it can also surface against a real, reachable FreeWheel/GAM endpoint under some error condition — I haven't had a live ad server to test the success path against. So I can't tell you yet whether this is production-relevant or a test-environment artifact, and I'd rather say that plainly than guess.
What I'm asking
@listen()/CrewAI-version story is still accurate, or whether it's safe to drop the stub fordiscovery_inquiry_flowat least and let it get real test coverage?execution_activation_flow, is the cancel-scope leak something you've already seen, or worth a closer look as its own thing?@atc964 — I'd like to take this one up if that's alright: drop the stale stub for
discovery_inquiry_flowacross the test files, add real coverage for it, and dig into the cancel-scope leak onexecution_activation_flowseparately (probably as two commits/PRs given they're different problems). Happy to hold off starting until you've had a chance to weigh in on whether the@listen()story checks out on your end too.Environment
seller-agent
main@d55896e, crewai1.15.2, 2026-08-18.