From 19e70cae929770182239702c91f98c6931d74a7c Mon Sep 17 00:00:00 2001 From: Lucas Gomide Date: Tue, 14 Jul 2026 02:29:50 -0300 Subject: [PATCH] chore: drop redundant seam comments from execution-boundary wiring Removes two inline comments narrating the OUTPUT/EXECUTION_END dispatch ordering in `crew.py` and the flow runtime, plus a stray sentence about enterprise adapters in the conformance-suite docstring. Comment-only cleanup, no behavior change. --- lib/crewai/src/crewai/crew.py | 4 ---- lib/crewai/src/crewai/flow/runtime/__init__.py | 3 --- lib/crewai/tests/hooks/test_interception_conformance.py | 3 +-- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/crewai/src/crewai/crew.py b/lib/crewai/src/crewai/crew.py index db49b3a1e..ea0272c04 100644 --- a/lib/crewai/src/crewai/crew.py +++ b/lib/crewai/src/crewai/crew.py @@ -1918,10 +1918,6 @@ class Crew(FlowTrackable, BaseModel): token_usage=self.token_usage, ) - # OUTPUT/EXECUTION_END run before the kickoff-completed event (mirroring - # the flow OUTPUT-before-FlowFinishedEvent ordering) so a HookAborted - # prevents a spurious completed signal and any payload replacement is - # honored on the returned output. output_ctx = OutputContext(crew=self, output=crew_output, payload=crew_output) dispatch(InterceptionPoint.OUTPUT, output_ctx) crew_output = output_ctx.payload diff --git a/lib/crewai/src/crewai/flow/runtime/__init__.py b/lib/crewai/src/crewai/flow/runtime/__init__.py index 812d83268..6733c4645 100644 --- a/lib/crewai/src/crewai/flow/runtime/__init__.py +++ b/lib/crewai/src/crewai/flow/runtime/__init__.py @@ -1476,9 +1476,6 @@ class Flow(BaseModel, Generic[T], metaclass=FlowMeta): else (resumed_method_output if emit else result) ) - # A resumed flow completes here rather than in kickoff_async, so the - # OUTPUT/EXECUTION_END seams must fire on this path too (before - # FlowFinishedEvent) to expose the final result to policy hooks. from crewai.hooks.contexts import ExecutionEndContext, OutputContext from crewai.hooks.dispatch import InterceptionPoint, dispatch diff --git a/lib/crewai/tests/hooks/test_interception_conformance.py b/lib/crewai/tests/hooks/test_interception_conformance.py index 3593699d5..9c2965bd2 100644 --- a/lib/crewai/tests/hooks/test_interception_conformance.py +++ b/lib/crewai/tests/hooks/test_interception_conformance.py @@ -2,8 +2,7 @@ For each wired point this suite asserts the shared contract: the probe hook sees a well-shaped payload, an in-place/returned modification is honored, and a -:class:`HookAborted` interrupts the step. Enterprise / ACS adapters build -against these guarantees. +:class:`HookAborted` interrupts the step. """ from __future__ import annotations