Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.
Refactor orchestrator methods: rename 'run' to 'execute' for consistency Update tests badge message to reflect the latest test count
Louis Choquel2f6749ba6d55
diff --git a/.badges/tests.json b/.badges/tests.jsonindex 3633fe3e2..952e007e3 100644--- a/.badges/tests.json+++ b/.badges/tests.json@@ -1,7 +1,7 @@{"schemaVersion": 1,"label": "tests",- "message": "7820",+ "message": "7826","color": "blue","cacheSeconds": 300}\ No newline at end of filediff --git a/pipelex/pipeline/bundle_validator.py b/pipelex/pipeline/bundle_validator.pyindex 07f214e28..6cbf09746 100644--- a/pipelex/pipeline/bundle_validator.py+++ b/pipelex/pipeline/bundle_validator.py@@ -107,7 +107,7 @@ class BundleValidator:# Keep the router instance (don't discard it inside PipeRun): the sweep installs it as the active# router via scoped_pipe_router (see validate_pipes) so nested controller sub-pipes — which# dispatch through get_pipe_router() — resolve THIS in-process router instead of the hub default.- # Mirrors runtime_bridge.direct_orchestrator.DirectOrchestrator.run.+ # Mirrors runtime_bridge.direct_orchestrator.DirectOrchestrator.execute.self._pipe_router = PipeRouter(observer=ObserverNoOp())self._pipe_run: PipeRunProtocol = PipeRun(pipe_router=self._pipe_router)@@ -244,7 +244,7 @@ class BundleValidator:# back to the hub default. Under a Temporal-enabled hub the default is the Temporal router, so# without the scope a controller (a PipeBatch/PipeParallel fan-out, or any PipeSequence step)# would leak its nested pipes to Temporal — turning a no-cost in-process dry run into real- # top-level workflow dispatches (HTTP 422). Mirrors runtime_bridge.direct_orchestrator.DirectOrchestrator.run. The+ # top-level workflow dispatches (HTTP 422). Mirrors runtime_bridge.direct_orchestrator.DirectOrchestrator.execute. The# scope is contextvar-based, so concurrent /validate sweeps don't cross-contaminate, and the# asyncio tasks a batch fan-out spawns copy the context at creation (inside this scope) so they# inherit the override too.diff --git a/pipelex/plugins/orchestrator_registry.py b/pipelex/plugins/orchestrator_registry.pyindex 466d16cca..52d905107 100644--- a/pipelex/plugins/orchestrator_registry.py+++ b/pipelex/plugins/orchestrator_registry.py@@ -21,7 +21,7 @@ class OrchestratorProtocol(Protocol):The wait-semantics axis (``DeliveryMode`` on the wire input) is expressed here aswhich method the endpoint calls, so each return type is truthful on its own:- - ``run`` is the BLOCKING arm — it awaits completion and returns the completed-run+ - ``execute`` is the BLOCKING arm — it awaits completion and returns the completed-run``PipelexPipeRunOutput`` (which therefore always carries a main stuff).- ``start`` is the FIRE_AND_FORGET arm — it genuinely enqueues the job and returnsa ``PipelexPipeDispatchAck`` (ids only; nothing has run yet).@@ -35,7 +35,7 @@ class OrchestratorProtocol(Protocol):supports_fire_and_forget: bool- async def run(+ async def execute(self,*,pipe_job: "PipeJob",diff --git a/pipelex/runtime_bridge/direct_orchestrator.py b/pipelex/runtime_bridge/direct_orchestrator.pyindex 7206769ed..fc43f915c 100644--- a/pipelex/runtime_bridge/direct_orchestrator.py+++ b/pipelex/runtime_bridge/direct_orchestrator.py@@ -31,7 +31,7 @@ class DirectOrchestrator:# rather than running blocking and falsely acking.supports_fire_and_forget = False- async def run(self, *, pipe_job: PipeJob, delivery_assignment: DeliveryAssignment | None) -> PipelexPipeRunOutput:+ async def execute(self, *, pipe_job: PipeJob, delivery_assignment: DeliveryAssignment | None) -> PipelexPipeRunOutput:# DIRECT mode forces in-process execution even inside a Temporal-enabled# worker. Scope the in-process router as the active router for the WHOLE# run so nested controller sub-pipes — which dispatch throughdiff --git a/pipelex/runtime_bridge/payloads.py b/pipelex/runtime_bridge/payloads.pyindex fa2a4056d..ec46fbd1e 100644--- a/pipelex/runtime_bridge/payloads.py+++ b/pipelex/runtime_bridge/payloads.py@@ -39,7 +39,7 @@ class PipelexPipeRunInput(BaseModel):class PipelexPipeRunOutput(BaseModel):"""JSON-safe output of a COMPLETED run crossing the host-runtime / Temporal boundary.- This is the return shape of a blocking dispatch (``OrchestratorProtocol.run``); a+ This is the return shape of a blocking dispatch (``OrchestratorProtocol.execute``); afire-and-forget dispatch returns a ``PipelexPipeDispatchAck`` instead — which is whya completed-run field like ``main_stuff_name`` can be required here with no"not finished yet" escape hatch.