Skip to content

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.

test(pipe-batch): assert the fan-out bound directly instead of re-resolving config

Louis Choquel5904e9bb22c5
diff --git a/tests/integration/pipelex/pipes/controller/pipe_batch/test_pipe_batch_compaction.py b/tests/integration/pipelex/pipes/controller/pipe_batch/test_pipe_batch_compaction.py
index 722bb9ee7..02f2edd63 100644
--- a/tests/integration/pipelex/pipes/controller/pipe_batch/test_pipe_batch_compaction.py
+++ b/tests/integration/pipelex/pipes/controller/pipe_batch/test_pipe_batch_compaction.py
@@ -10,7 +10,6 @@ from typing import Callable, cast
import pytest
-from pipelex.config import get_config
from pipelex.core.memory.working_memory import WorkingMemory
from pipelex.core.memory.working_memory_factory import WorkingMemoryFactory
from pipelex.core.stuffs.list_content import ListContent
@@ -26,7 +25,6 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactory
from pipelex.pipe_operators.func.pipe_func import PipeFunc
from pipelex.pipe_operators.func.pipe_func_blueprint import PipeFuncBlueprint
from pipelex.pipe_run.pipe_run_params import PipeRunParams
-from pipelex.pipe_run.pipe_run_params_factory import resolve_batch_max_concurrency
from pipelex.system.job_metadata import JobMetadata
from pipelex.system.pipe_run_mode import PipeRunMode
from pipelex.system.registries.func_registry import func_registry
@@ -126,7 +124,7 @@ class TestPipeBatchCompaction:
run_params = _make_live_run_params()
# Guard the fixture, not the factory: this is the suite where an accidentally-unbounded
# fan-out would change behavior without failing anything.
- assert run_params.batch_max_concurrency == resolve_batch_max_concurrency(get_config().pipelex.pipeline_execution_config.max_concurrency)
+ assert run_params.batch_max_concurrency is not None, "the batch must fan out under a bound, not unbounded"
pipe_output = await batch.run_pipe(
job_metadata=job_metadata,
diff --git a/wip/pr-1093-review-notes.md b/wip/pr-1093-review-notes.md
index 836e92e37..5062783bb 100644
--- a/wip/pr-1093-review-notes.md
+++ b/wip/pr-1093-review-notes.md
@@ -53,12 +53,14 @@ Keeps `int | None`, so authored `"unbounded"` still resolves to `None`; keeps `f
The source change is one word, but the fixtures are not: ~19 direct constructions in this repo plus one on the plugin side must supply the field. The integration fixtures should route through `PipeRunParamsFactory.make_run_params` instead — a net simplification, since they already hand-duplicate the factory's config read — but that is a ~20-file change with a cross-repo tail, landing on a release branch whose CI is green and which is about to merge to `main`. It belongs on `dev` immediately after the promotion.
+That is what happened: the follow-up landed via `fix/batch-max-concurrency-required` and ships in v0.43.1 — the Status note at the top records the outcome. The sections below are the historical record of that follow-up, with each item marked done or still open.
+
### Execution notes for the follow-up
-- **Tests:** add `pytest.raises(ValidationError)` coverage for both the constructor and `model_validate({...})` with the key absent, mirroring the required-`run_mode` coverage already in `tests/unit/pipelex/pipe_run/test_cogt_run_params_carrier.py:72-92`.
-- **Mutation-check it.** Temporarily restore `default=None` and confirm the new test goes red. A test green on first run proves nothing here.
-- **Fix the compaction fixture** to build via the factory and assert the observed bound — that is the one place where an accidentally-unbounded fan-out actually changes behavior.
-- **Cross-repo, gated on the `pipelex` pin moving:** our Temporal plugin's payload-converter test round-trips `None`, so it asserts `None == None` and would not catch the field being dropped on the wire. Make it round-trip a real int bound.
+- ✔ **Done — tests:** add `pytest.raises(ValidationError)` coverage for both the constructor and `model_validate({...})` with the key absent, mirroring the required-`run_mode` coverage already in `tests/unit/pipelex/pipe_run/test_cogt_run_params_carrier.py:72-92`.
+- ✔ **Done — mutation-check it.** Temporarily restore `default=None` and confirm the new test goes red. A test green on first run proves nothing here.
+- ✔ **Done — fix the compaction fixture** to build via the factory and assert the observed bound — that is the one place where an accidentally-unbounded fan-out actually changes behavior.
+- ⏳ **Still open — cross-repo, gated on the `pipelex` pin moving:** our Temporal plugin's payload-converter test round-trips `None`, so it asserts `None == None` and would not catch the field being dropped on the wire. Make it round-trip a real int bound.
- **Honest caveat to keep in view:** making the field required converts a legacy-history decode into a `ValidationError`, and a workflow-task converter exception retries forever — it hangs rather than fails. Both states are non-events while Temporal is pre-production, and neither is fixed by a field default. It reconfirms that deploy discipline, not this field, is the real control over version skew under live histories.
## Not deferred — the two P1s as Codex reported them