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.
fix(hub): complete the layer boundary — placement, so the predicate can say what it means (#1071)
Louis Choqueled7435a7c690
diff --git a/.drift/acks/cli-docs.toml b/.drift/acks/cli-docs.tomlindex 3e6909e0f..6d4c84800 100644--- a/.drift/acks/cli-docs.toml+++ b/.drift/acks/cli-docs.toml@@ -1,8 +1,8 @@contract = "cli-docs"-digest = "sha256:31a113f803c7dc57bc5254534627de1539237c78bef1a55cb5d88e7c9469830c"-reviewed_by = "Claude (Opus 5 1M context)"-reviewed_at = "2026-07-29T01:41:51Z"-rationale = "Merge-induced reopening: merging dev into refactor/Hub-2 reset this contract's baseline to dev's 2026-07-28 ack, so the whole modularity-track sweep across pipelex/cli/** re-presents as unreviewed even though three prior acks on this branch already covered it. Reviewed anyway rather than rubber-stamping. Mechanical check first: diffing all 26 triggers against dev and filtering out every changed import line leaves exactly three non-import changes, all already-reviewed branch work — the PipelexInterpreter to MthdsParser class rename, the matching PipelexInterpreterError to MthdsParserError rename (which also re-keys one AGENT_ERROR_HINTS entry), and build_registrar gaining builtin_plugins/core_unconditional_plugin_names. Both review targets carry zero references to any of those symbols or to any Python import path, so the sweep is structurally invisible to them; agent_cli/CLAUDE.md points at the AGENT_ERROR_HINTS dict by name instead of copying its keys, which is why an error-class rename cannot make it stale. Verified both sides live rather than by reading. Dev's side: 'pipelex build output --help' and the build group listing both now read 'JSON, Python, or JSON Schema', matching the docs/tools/cli/build/index.md line dev fixed in the same change. Branch side: 'pipelex-agent validate bundle <broken>.mthds --format json --error-format json' still emits error_type ValidateBundleError with MthdsParserError appearing only in error_source, exactly as agent_cli/CLAUDE.md line 24 describes that array — so the renamed class stays off the documented wire field on this channel. Nothing stale on either target."+digest = "sha256:09f94e6d035a51c81826253418a309516615845ba1a07445932313d7f8b18bfd"+reviewed_by = "Claude (Opus 5)"+reviewed_at = "2026-07-29T12:21:19Z"+rationale = "Fourth consecutive import-line-only opening. Triggers are three files: agent_cli/commands/run/_run_core.py and cli/commands/run/_run_core.py each change one from-line (PipeRunMode moved from pipelex.pipe_run.pipe_run_mode to pipelex.system.pipe_run_mode when the leaf models left the interpreter packages), and dev_cli/commands/hub_layering_guard.py changes a five-line comment to a three-line one — a declaration rationale, not code. No option, default, choice list, output shape or error class moved. Opened both targets and grepped them for PipeRunMode, pipe_run_mode, PipeRunParamKey, PipeRunError and pipeline_models: zero hits, structurally so, since neither target cites a Python import path. Verified the affected surface live: 'pipelex-agent run pipe --help' still lists --dry-run ('Run pipeline in dry mode') and --mock-inputs ('requires --dry-run'), matching docs/tools/cli/agent-cli.md lines 37-38 verbatim. The dev CLI has no doc target here at all. Nothing stale."[trigger_files]"pipelex/cli/__init__.py" = "blob:8b137891791fe96927ad78e64b0aad7bded08bdc"@@ -38,7 +38,7 @@ rationale = "Merge-induced reopening: merging dev into refactor/Hub-2 reset this"pipelex/cli/agent_cli/commands/plxt_passthrough.py" = "blob:22a4666dbd179a68b86cb340cdb9dbe207c8c1e1""pipelex/cli/agent_cli/commands/run/__init__.py" = "blob:e69de29bb2d1d6434b8b29ae775ad8c2e48c5391""pipelex/cli/agent_cli/commands/run/_output_helpers.py" = "blob:40ed1700e0d5e86d7696eadd7f9887baeb8059f6"-"pipelex/cli/agent_cli/commands/run/_run_core.py" = "blob:0e211c802005719777dd08a439e83521dead57c4"+"pipelex/cli/agent_cli/commands/run/_run_core.py" = "blob:cf54e9147a433c0da8b19ef2ab9f5bd2d67a2570""pipelex/cli/agent_cli/commands/run/_run_core_api.py" = "blob:78a27e0ba91e6bbf99c11caedb29ad4cf20ac78b""pipelex/cli/agent_cli/commands/run/app.py" = "blob:64b2ecc02007cda11b526d8d3fc139593875dd9d""pipelex/cli/agent_cli/commands/run/bundle_cmd.py" = "blob:78edc9a2fb9a27f4449d51a0a4f7012fde43ce1f"@@ -48,7 +48,7 @@ rationale = "Merge-induced reopening: merging dev into refactor/Hub-2 reset this"pipelex/cli/agent_cli/commands/validate/__init__.py" = "blob:e69de29bb2d1d6434b8b29ae775ad8c2e48c5391""pipelex/cli/agent_cli/commands/validate/_validate_core.py" = "blob:c07252202265806ebe3512370152d2ebce8a7e78""pipelex/cli/agent_cli/commands/validate/app.py" = "blob:d2d0ed19288c2d1c25be1650dd962189fcdb3b86"-"pipelex/cli/agent_cli/commands/validate/bundle_cmd.py" = "blob:e6a85eb8920188c3eda4a9d8781d8f4194a9ec63"+"pipelex/cli/agent_cli/commands/validate/bundle_cmd.py" = "blob:fd751a2176bc9d62f164b293ec83006d22947d89""pipelex/cli/agent_cli/commands/validate/method_cmd.py" = "blob:24ddeef224fa2d88781141467ef80c414d34f77a""pipelex/cli/agent_cli/commands/validate/pipe_cmd.py" = "blob:8f9aa91cdfa9a1688ce500c07dc00801737ea626""pipelex/cli/bundle_target_resolution.py" = "blob:8dccc50b700b877968ed1b2c1c3652ab1c32e956"@@ -109,7 +109,7 @@ rationale = "Merge-induced reopening: merging dev into refactor/Hub-2 reset this"pipelex/cli/commands/run/__init__.py" = "blob:e69de29bb2d1d6434b8b29ae775ad8c2e48c5391""pipelex/cli/commands/run/_inputs_file_loader.py" = "blob:dde781f846968b667a0acfb4b3e3cea01cef7049""pipelex/cli/commands/run/_inputs_path_resolver.py" = "blob:c8ec89d98718e18af7aaaded44c9f545be60adab"-"pipelex/cli/commands/run/_run_core.py" = "blob:5f13d990bfa7219fa35b7ce1e5872d1b9693531c"+"pipelex/cli/commands/run/_run_core.py" = "blob:0960c339ebfdbdb086af3dee220451e8b9ad28e4""pipelex/cli/commands/run/app.py" = "blob:a7090b0ff6bf2f1d47827fa27d2a138096a2e148""pipelex/cli/commands/run/bundle_cmd.py" = "blob:cb420bf4879c863d64c5e20ed535c42732b720a2""pipelex/cli/commands/run/exceptions.py" = "blob:e9552226e597922b6ac0757f7b52eb880a2e1472"diff --git a/.drift/acks/hub-layering-convention.toml b/.drift/acks/hub-layering-convention.tomlindex 6ca8e688f..7eebd3ffd 100644--- a/.drift/acks/hub-layering-convention.toml+++ b/.drift/acks/hub-layering-convention.toml@@ -1,10 +1,10 @@contract = "hub-layering-convention"-digest = "sha256:19d8b6737dc50fdc11f754b6077ae0b41d0c3365a85b3407ab4326708b8efab4"-reviewed_by = "Louis Choquel"-reviewed_at = "2026-07-27T17:01:19Z"-rationale = "M2: pipelex/plugins/ split into the plugin mechanism (stays) and the seventeen built-in vendor adapters (now pipelex/providers/). Trigger diff on hub_layering_guard.py is the new 'pipelex.providers' entry plus a rewritten note above the tuple. Reviewed the target for real and edited five places. (1) The layer-rule enumeration under Enforcement listed seven declared packages; it now lists eight. This is the doc-enumeration rot M1 flagged, and it was in a section the diff did not otherwise touch. (2) 'Where the built-in plugins split' claimed pipelex/plugins/ is where the runtime-port adapters live — the exact sentence M2 falsifies. Rewritten to name the two splits separately, because they are routinely conflated: mechanism-vs-adapters does NOT cross a layer (both packages are runtime-layer, the split makes the one-way dependency legible), while runtime-vs-interpreter does. Added the sentence third-party plugin authors need: pipelex.plugins.contract and pipelex.plugins.registrar did not move, and the 'pipelex.plugins' entry-point group is a group identifier, not a module path. (3) The import-closure section named plugins.builtins as the entry point and justified it by history; the module is now providers.builtins, so the paragraph was rewritten to keep the history true under the old name and to state why one entry point still covers both packages. (4) Known inversions gained two bullets recording the cogt -> vendor edges as deliberate: the four config imports are accepted permanently (making vendor config sections plugin-contributed would trade the statically-typed configs.py/pipelex.toml sync for a dynamic registry), while the two img-gen factory imports are slated to move inward to a neutral cogt/img_gen/ mapping module — no registry, because dispatch is keyed on the cogt-owned AspectRatioTaxonomy and the gateway worker is one SDK spanning both taxonomies, so no provider key exists to dispatch on. (5) The fixed worked example still pointed at plugins/builtins.py; annotated with its current path. Verified the remaining claims rather than assuming: 'plugins -> runtime_bridge' still names only mechanism modules (bundle_validator_registry, orchestrator_registry, registrar — all three stayed), and the 'Why the boundary exists' must-not-name list plus the verification snippet enumerate the INTERPRETER packages, which M2 does not touch, so both are correct unchanged. Ran the three prescribed mechanical checks by script: all 8 declared packages named under Enforcement, all 27 runtime_hub and 22 interpreter_hub get_* accessors covered by the partition tables, and the matched triple (guard tuple / closure INTERPRETER_PACKAGES / doc INTERPRETER snippet) agrees. As in every prior entry the mechanical checks passed while blind to all five findings above. One defect they were also blind to, found only by reading the generated output: _SUBSYSTEM_SECTIONS in error_pages_generator.py keys on the module's SECOND segment, so every vendor error class silently reclassified from 'Inference & providers' to the fallback 'Platform & tooling' macro — the identical shape to M1's mthds_parsing regression, three weeks later, caught this time because M1's lesson was to read the gep diff rather than its exit code."+digest = "sha256:0d8be8d6f8ac57708dcda08ec0b835ed0dc507e321d9be071de4ffff96177f68"+reviewed_by = "Claude (Opus 5)"+reviewed_at = "2026-07-29T13:22:19Z"+rationale = "Re-recorded after the final review round found a live counter-example to this page's central claim. Trigger is the guard's tuple and note again: pipelex.test_extras is added to RUNTIME_LAYER_PACKAGES, and the exclusion sentence is rewritten. Reviewed the target and edited three places. (1) The layer-rule enumeration under Enforcement gains pipelex.test_extras — sixth consecutive opening where an enumeration on this page was the rot, and it is the same enumeration as last time. (2) The exclusion sentence said only that kit is data files and language has interpreter edges, which reads exhaustive and was not: enumerating every top-level package and running measurement command 3 over each shows test_extras measures zero, ships, and is imported by pipelex.py at boot, while runtime_bridge and cli measure dirty and were simply never mentioned. The sentence now accounts for every top-level package rather than naming two. Considered and rejected declaring config, base_exceptions and urls, which are also clean and undeclared: the transitive rule already covers them through their 30, 32 and 5 declared runtime-layer importers, so declaring them buys nothing. test_extras had no such cover. (3) Known inversions gains the finding this round produced, which is a genuinely new shape for this page. Five built-in vendor adapters imported MissingDependencyError from pipelex.exceptions, the public all-errors aggregate, instead of from its definition site pipelex.system.exceptions. That aggregate re-exports every interpreter package's errors, so each of those five declared runtime-layer modules loaded 15 interpreter modules — inside pipelex.providers, a package this very tuple already declared clean. Both gates were structurally blind: the guard only chases interpreter_hub and the aggregate never reaches it, and the closure test's providers.builtins entry point does not cover them because the vendor plugins import the list modules inside a function, hiding them from the static graph and from the aggregator's closure at once. Fixed at the import site per the repo's direct-full-path-imports rule; providers.anthropic.anthropic_list added to RUNTIME_LAYER_ENTRY_POINTS, with a negative control run — reverting one import fails that entry point. The lesson recorded on the page is that a module re-exporting across layers is a layer boundary with the sign filed off. Ran the two prescribed mechanical checks: all thirteen declared packages named under The rule, 32 + 31 hub accessors covered. Both passed and both were blind to all three findings, eleventh consecutive time."[trigger_files]-"pipelex/cli/dev_cli/commands/hub_layering_guard.py" = "blob:47fef9ff0a052216b7925c6d372226aa47319fa2"+"pipelex/cli/dev_cli/commands/hub_layering_guard.py" = "blob:755c74c5919486992961c36e7c2925c9425aebc2""pipelex/interpreter_hub.py" = "blob:b7ac885d348d32f1aa4b1e660da5b03533fb305b"-"pipelex/runtime_hub.py" = "blob:33fc3099cc4ab0c741fefb899bb93ee6b91c7cf7"+"pipelex/runtime_hub.py" = "blob:8fffa04a52fb04ea89202fb4a24cf3d67793d83e"diff --git a/.test_durations b/.test_durationsindex 61d5c6e3b..4f8cc3f67 100644--- a/.test_durations+++ b/.test_durations@@ -2111,13 +2111,13 @@"tests/unit/pipelex/cli/test_format_run_markdown.py::TestFormatRunMarkdown::test_no_main_output_message": 0.0008296669693663716,"tests/unit/pipelex/cli/test_format_run_markdown.py::TestFormatRunMarkdown::test_no_main_stuff_falls_back_to_body": 0.00043483299668878317,"tests/unit/pipelex/cli/test_format_run_markdown.py::TestFormatRunMarkdown::test_rendered_markdown_is_used": 0.6997992079705,- "tests/unit/pipelex/cli/test_graph_rendering.py::TestRenderGraphFromSpec::test_format_selection_sets_correct_inclusion[False-True]": 0.012555666966363788,- "tests/unit/pipelex/cli/test_graph_rendering.py::TestRenderGraphFromSpec::test_format_selection_sets_correct_inclusion[True-False]": 0.6714342490304261,- "tests/unit/pipelex/cli/test_graph_rendering.py::TestRenderGraphFromSpec::test_format_selection_sets_correct_inclusion[True-True]": 0.005132416961714625,- "tests/unit/pipelex/cli/test_graph_rendering.py::TestRenderGraphFromSpec::test_passes_optional_params_to_generate": 0.09401216602418572,- "tests/unit/pipelex/cli/test_graph_rendering.py::TestRenderGraphFromSpec::test_passes_pipe_code_to_generate": 0.0037202510284259915,- "tests/unit/pipelex/cli/test_graph_rendering.py::TestRenderGraphFromSpec::test_returns_saved_files": 0.00421037501655519,- "tests/unit/pipelex/cli/test_graph_rendering.py::TestRenderGraphFromSpec::test_saves_to_correct_output_dir": 0.0036397489602677524,+ "tests/unit/pipelex/graph/test_graph_rendering.py::TestRenderGraphFromSpec::test_format_selection_sets_correct_inclusion[False-True]": 0.012555666966363788,+ "tests/unit/pipelex/graph/test_graph_rendering.py::TestRenderGraphFromSpec::test_format_selection_sets_correct_inclusion[True-False]": 0.6714342490304261,+ "tests/unit/pipelex/graph/test_graph_rendering.py::TestRenderGraphFromSpec::test_format_selection_sets_correct_inclusion[True-True]": 0.005132416961714625,+ "tests/unit/pipelex/graph/test_graph_rendering.py::TestRenderGraphFromSpec::test_passes_optional_params_to_generate": 0.09401216602418572,+ "tests/unit/pipelex/graph/test_graph_rendering.py::TestRenderGraphFromSpec::test_passes_pipe_code_to_generate": 0.0037202510284259915,+ "tests/unit/pipelex/graph/test_graph_rendering.py::TestRenderGraphFromSpec::test_returns_saved_files": 0.00421037501655519,+ "tests/unit/pipelex/graph/test_graph_rendering.py::TestRenderGraphFromSpec::test_saves_to_correct_output_dir": 0.0036397489602677524,"tests/unit/pipelex/cli/test_init_cmd.py::TestInitCmd::test_do_init_config_copies_all_files": 0.7964962500263937,"tests/unit/pipelex/cli/test_init_cmd.py::TestInitCmd::test_do_init_config_creates_target_directory": 0.0025989579735323787,"tests/unit/pipelex/cli/test_init_cmd.py::TestInitCmd::test_do_init_config_does_not_call_customize_backends": 0.0036041660350747406,@@ -5375,27 +5375,27 @@"tests/unit/pipelex/graph/test_graph_output_generation.py::TestGraphOutputGeneration::test_graphspec_json_only": 0.001358416979201138,"tests/unit/pipelex/graph/test_graph_output_generation.py::TestGraphOutputGeneration::test_mermaid_mmd_contains_node_labels": 0.10307808296056464,"tests/unit/pipelex/graph/test_graph_output_generation.py::TestGraphOutputGeneration::test_save_outputs_to_dir": 0.20236087497323751,- "tests/unit/pipelex/graph/test_graph_rendering.py::TestSanitizeGraphName::test_absolute_path_stripped": 0.0003222499508410692,- "tests/unit/pipelex/graph/test_graph_rendering.py::TestSanitizeGraphName::test_empty_string_returns_default": 0.10526837495854124,- "tests/unit/pipelex/graph/test_graph_rendering.py::TestSanitizeGraphName::test_plain_filename": 0.6342477919533849,- "tests/unit/pipelex/graph/test_graph_rendering.py::TestSanitizeGraphName::test_subdirectory_stripped": 0.00038129196036607027,- "tests/unit/pipelex/graph/test_graph_rendering.py::TestSanitizeGraphName::test_traversal_stripped": 0.0008395420154556632,- "tests/unit/pipelex/graph/test_graph_rendering_dry_run_bundle.py::TestDryRunBundle::test_library_dirs_already_containing_parent_passed_through": 0.13030874996911734,- "tests/unit/pipelex/graph/test_graph_rendering_dry_run_bundle.py::TestDryRunBundle::test_library_dirs_missing_parent_gets_parent_appended": 0.003694749961141497,- "tests/unit/pipelex/graph/test_graph_rendering_dry_run_bundle.py::TestDryRunBundle::test_library_dirs_none_uses_bundle_parent": 0.7825109590194188,- "tests/unit/pipelex/graph/test_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_format_dispatch_sets_inclusion_flags[both-True-True]": 0.004739499068818986,- "tests/unit/pipelex/graph/test_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_format_dispatch_sets_inclusion_flags[mermaidflow-True-False]": 0.6434229169390164,- "tests/unit/pipelex/graph/test_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_format_dispatch_sets_inclusion_flags[reactflow-False-True]": 0.004137623938731849,- "tests/unit/pipelex/graph/test_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_no_reactflow_key_skips_rename": 0.003765708999708295,- "tests/unit/pipelex/graph/test_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_pipe_code_override_passed_to_dry_run": 0.10611520800739527,- "tests/unit/pipelex/graph/test_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_rename_branch_sanitizes_traversal_name": 0.009999041038099676,- "tests/unit/pipelex/graph/test_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_return_shape[None-None]": 0.002806125965435058,- "tests/unit/pipelex/graph/test_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_return_shape[left_to_right-left_to_right]": 0.005475000070873648,- "tests/unit/pipelex/graph/test_graph_rendering_generate_view.py::TestGenerateViewForBundle::test_direction_precedence[None-None-None]": 0.009650916967075318,- "tests/unit/pipelex/graph/test_graph_rendering_generate_view.py::TestGenerateViewForBundle::test_direction_precedence[None-left_to_right-left_to_right]": 0.002383332990575582,- "tests/unit/pipelex/graph/test_graph_rendering_generate_view.py::TestGenerateViewForBundle::test_direction_precedence[top_down-left_to_right-top_down]": 0.004665207932703197,- "tests/unit/pipelex/graph/test_graph_rendering_generate_view.py::TestGenerateViewForBundle::test_pipe_code_override_passed_to_dry_run": 0.09118433308321983,- "tests/unit/pipelex/graph/test_graph_rendering_generate_view.py::TestGenerateViewForBundle::test_returns_graphspec_json_dump": 0.6526148329721764,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_sanitize.py::TestSanitizeGraphName::test_absolute_path_stripped": 0.0003222499508410692,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_sanitize.py::TestSanitizeGraphName::test_empty_string_returns_default": 0.10526837495854124,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_sanitize.py::TestSanitizeGraphName::test_plain_filename": 0.6342477919533849,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_sanitize.py::TestSanitizeGraphName::test_subdirectory_stripped": 0.00038129196036607027,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_sanitize.py::TestSanitizeGraphName::test_traversal_stripped": 0.0008395420154556632,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_dry_run.py::TestDryRunBundle::test_library_dirs_already_containing_parent_passed_through": 0.13030874996911734,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_dry_run.py::TestDryRunBundle::test_library_dirs_missing_parent_gets_parent_appended": 0.003694749961141497,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_dry_run.py::TestDryRunBundle::test_library_dirs_none_uses_bundle_parent": 0.7825109590194188,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_format_dispatch_sets_inclusion_flags[both-True-True]": 0.004739499068818986,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_format_dispatch_sets_inclusion_flags[mermaidflow-True-False]": 0.6434229169390164,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_format_dispatch_sets_inclusion_flags[reactflow-False-True]": 0.004137623938731849,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_no_reactflow_key_skips_rename": 0.003765708999708295,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_pipe_code_override_passed_to_dry_run": 0.10611520800739527,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_rename_branch_sanitizes_traversal_name": 0.009999041038099676,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_return_shape[None-None]": 0.002806125965435058,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_graph.py::TestGenerateGraphForBundle::test_return_shape[left_to_right-left_to_right]": 0.005475000070873648,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_view.py::TestGenerateViewForBundle::test_direction_precedence[None-None-None]": 0.009650916967075318,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_view.py::TestGenerateViewForBundle::test_direction_precedence[None-left_to_right-left_to_right]": 0.002383332990575582,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_view.py::TestGenerateViewForBundle::test_direction_precedence[top_down-left_to_right-top_down]": 0.004665207932703197,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_view.py::TestGenerateViewForBundle::test_pipe_code_override_passed_to_dry_run": 0.09118433308321983,+ "tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_view.py::TestGenerateViewForBundle::test_returns_graphspec_json_dump": 0.6526148329721764,"tests/unit/pipelex/graph/test_graph_tracer.py::TestGraphTracer::test_batch_aggregate_edge_generation": 0.0006920419982634485,"tests/unit/pipelex/graph/test_graph_tracer.py::TestGraphTracer::test_batch_aggregate_edges_contain_stuff_digests": 0.0007943760138005018,"tests/unit/pipelex/graph/test_graph_tracer.py::TestGraphTracer::test_batch_edges_combined": 0.000335583055857569,diff --git a/CHANGELOG.md b/CHANGELOG.mdindex a40fe0227..f3ee47994 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -14,6 +14,19 @@### Changed+- **Fixed: five built-in vendor adapters were pulling the whole interpreter into the runtime layer, through the public exceptions aggregate.** `providers/{anthropic,bedrock,google,mistral}/*_list.py` imported `MissingDependencyError` from `pipelex.exceptions` — the all-errors aggregate, which re-exports every interpreter package's errors — instead of from its definition site, `pipelex.system.exceptions`. Each one therefore loaded 15 interpreter modules, inside a package (`pipelex.providers`) the layer declaration already claimed was clean. Both gates were blind to it: the hub-layering guard only tracks `interpreter_hub` reachability, and the aggregate never reaches it; the closure test's `providers.builtins` entry point does not cover these modules because the vendor plugins import them *inside a function*, hiding them from the static graph and from the aggregator's own closure alike. The imports now point at the definition site, per this repo's "direct full-path imports everywhere" rule, and `providers.anthropic.anthropic_list` joins `RUNTIME_LAYER_ENTRY_POINTS` so the fix cannot silently regress. `pipelex.test_extras` — measured clean, shipped, and imported at boot — is declared runtime-layer in the same change, leaving every top-level package accounted for.+- **Breaking: the four leaf models that kept `pipeline` and `pipe_run` out of the layer predicate moved to runtime-layer homes.** With them gone, the import-closure test names **every** interpreter package, and the property it pins loses its last qualification: *importing the Pipelex runtime loads zero interpreter modules* — previously "zero modules from the packages the predicate could name", because two documented interpreter homes had to be left out. Naming them was never blocked by a broken hub arrow; it was blocked by an address, and the remedy is the one `mthds_parsing` used — move the leaf, then widen the predicate. Excluding it would only have recorded the problem.++ | symbol | was | is now |+ | --- | --- | --- |+ | `SpecialPipelineId` | `pipelex.pipeline.pipeline_models` (module deleted) | `pipelex.system.job_metadata` |+ | `PipeRunMode` | `pipelex.pipe_run.pipe_run_mode` | `pipelex.system.pipe_run_mode` |+ | `PipeRunParamKey` | `pipelex.pipe_run.pipe_run_params` | `pipelex.system.pipe_run_param_key` |+ | `PipeRunError` | `pipelex.pipe_run.exceptions` | `pipelex.core.pipes.exceptions` |++ Each destination is decided by what the symbol *is*, not by a wish for one tidy address. `SpecialPipelineId` is the vocabulary of `pipeline_run_id`, which is `JobMetadata`'s field, so it lands beside it. `PipeRunMode` and `PipeRunParamKey` are run-scope directives rather than one of a method's values, which is what puts them in `system/` and not `core/`. `PipeRunError` deliberately breaks that pattern: the runtime layer *subclasses* it — `PipeRunInputsError` and `OptionalValueAbsentError` derive from it in `core.pipes.inputs` — so it joins the pipe-error family whose base it is, and lands in the error reference beside those two subclasses rather than one section away from them. `AsyncExecutionNotEnabledError`'s docstring, which claimed the module "lives in core" when it never did, is corrected in passing.++- **Breaking: the bundle-driven half of `graph_rendering` moved to `pipelex.pipeline`, and four measured-clean packages joined the declared runtime layer.** `pipelex.graph.graph_rendering.generate_graph_for_bundle` / `generate_view_for_bundle` are now `pipelex.pipeline.bundle_graph_rendering.*`; `GraphFormat` and `render_graph_from_spec` stay put. The split is along "do I need a loaded method?", which is the hub boundary's own question — producing a graph *spec* from a bundle requires dry-running it, rendering an existing spec does not. It matters because the old module reached `interpreter_hub` (and ~76 interpreter modules) through `pipeline.dry_run_pipeline` while every gate stayed green: the layer rule and the transitive rule both filter their candidates through `is_runtime_layer`, and `pipelex.graph` was undeclared, so the module sat outside the rules' domain entirely. `pipelex.graph`, `pipelex.tracing`, `pipelex.observer` and `pipelex.errors` are now in `RUNTIME_LAYER_PACKAGES` — each measured to load zero interpreter modules — which is what puts the evicted module's successor in the guard's domain. The generalized lesson, now recorded in [Known inversions](contribute/hub-layering.md#known-inversions): **an undeclared package is not neutral, it is unpoliced.** `pipelex.kit` (data files) and `pipelex.language` (has interpreter edges) stay out.- **Breaking: `pipelex.hub` is gone, split into `pipelex.runtime_hub` and `pipelex.interpreter_hub`.** The split names the two layers it separates, on the textbook language-implementation division: the **runtime** is the machinery present at execution time whatever is loaded, the **interpreter** reads a method and executes it. There is no alias shim — a stale import fails loudly at import time rather than silently resolving to the wrong layer. `runtime_hub` holds process-scoped infrastructure (config, console, secrets, storage, telemetry, models, inference, content generation, reporting, run mode, tracing, the plugin registries, `get_class_registry`); `interpreter_hub` holds the loaded method's machinery (library manager and lookups, the current-library contextvar, library dirs, pipe router, pipe run and pipeline manager, the PipeFunc executor). `get_pipelex_hub` splits into `get_runtime_hub` / `get_interpreter_hub`, so every external call site must pick the container it actually meant. The rule is one-way and mechanically enforced (`make check-hub-layering`, alias `chl`, in `make agent-check` and CI): `interpreter_hub` may import `runtime_hub`, never the reverse, and no module anywhere may reference `pipelex.hub` — in an import *or* a string literal (dynamic import, mock patch target, config path). The payoff is measurable and pinned by a subprocess import-closure test: importing the Pipelex runtime now loads **zero** interpreter modules, down from 50 — you can embed the inference engine without loading a line of the MTHDS interpreter. See [Hub layering convention](contribute/hub-layering.md).- **Breaking: misplaced types moved to the package that actually owns them.** `JobMetadata` / `JobCategory` / `UnitJobId` → `pipelex.system.job_metadata`, `JobMetadataError` → `pipelex.system.exceptions`, `TraceContext` → `pipelex.system.trace_context`, `DataInclusionConfig` → `pipelex.system.data_inclusion_config`, `TextFormat` → `pipelex.tools.templating.text_format`, `TemplatingStyle` / `TagStyle` → `pipelex.tools.templating.templating_style`, `TemplateCategory` → `pipelex.tools.jinja2.template_category`, and the neutral resolved-field layer → `pipelex.core.concepts.resolved_fields`. The TOML config shape is unchanged throughout (`[...graph_config.data_inclusion]` still parses); only the Python homes moved. The two pipe renderers regrouped into one `rendering/` package (`input_renderer` from `core.pipes.inputs`, `output_renderer` from `core.pipes.output`); they ship at `pipelex.pipe_machinery.rendering`, having left `core/` with the rest of the Pipe machinery — see the entry below.- **Breaking: `core/`'s data model resolves concepts and pipes through injected providers instead of reaching into the hub.** `StuffFactory.make_stuff_from_stuff_content_or_data` / `make_from_blueprint` / `make_from_concept_ref`, `InputShaper.shape` / `resolve_input_kind`, `WorkingMemoryFactory.make_from_pipeline_inputs`, `InputStuffSpecsFactory.make_from_blueprint` / `make_from_string`, and `StuffSpecFactory.make_from_blueprint` all take a required `concept_provider`. A new read-side contract owns that surface — `ConceptProviderAbstract` (`pipelex.core.concepts.concept_provider_abstract`), which `ConceptLibraryAbstract` now extends, keeping library management in the interpreter layer. There is no pipe counterpart: nothing in core's runtime half resolves a pipe, so `get_required_pipe` stays on `PipeLibraryAbstract`. `pipelex.core`'s data-model packages join the enforced runtime layer as a result; the half that names a `Pipe` stays in the interpreter layer by construction.diff --git a/docs/building-methods/pipes/run-modes-and-backends.md b/docs/building-methods/pipes/run-modes-and-backends.mdindex 038dfce97..6404f5c84 100644--- a/docs/building-methods/pipes/run-modes-and-backends.md+++ b/docs/building-methods/pipes/run-modes-and-backends.md@@ -59,7 +59,7 @@ From Python, the same knobs live on the runner — the backend comes from config```pythonfrom pathlib import Path-from pipelex.pipe_run.pipe_run_mode import PipeRunMode+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocolrunner = PipelexMTHDSProtocol(pipe_run_mode=PipeRunMode.DRY)diff --git a/docs/contribute/hub-layering.md b/docs/contribute/hub-layering.mdindex fab259e4d..5731e9a16 100644--- a/docs/contribute/hub-layering.md+++ b/docs/contribute/hub-layering.md@@ -77,9 +77,7 @@ Placement is decided by *kind*, not by who currently imports it. Several accesso## Why the boundary exists-`runtime_hub` must not name anything from `libraries`, `pipe_operators`, `pipe_controllers`, `codegen`, `builder`, `interpreter_plugins`, `pipe_machinery`, `pipe_signature` or `mthds_parsing` at module level. That list is now stated in whole top-level packages, which is the point of the modularity moves: it used to have to trail "…or the Pipe-touching modules of `core.pipes`", because some of what it forbids lived under a runtime-named package. Those module-level imports exist only to type the getters, but they are what made a single hub drag the entire method interpreter into every consumer that just wanted `get_console()`.--Two interpreter-named packages are deliberately **not** on the list — `pipeline` and `pipe_run` — because leaf models of theirs already land in every runtime closure. That is a placement wart, not a broken arrow, and it is the one qualification the property below carries; see [The property — the import-closure test](#the-property-the-import-closure-test) for the remedy.+`runtime_hub` must not name anything from `libraries`, `pipe_operators`, `pipe_controllers`, `codegen`, `builder`, `interpreter_plugins`, `pipe_machinery`, `pipe_signature`, `mthds_parsing`, `pipeline` or `pipe_run` at module level. That list is now stated in whole top-level packages, which is the point of the modularity moves: it used to have to trail "…or the Pipe-touching modules of `core.pipes`", because some of what it forbids lived under a runtime-named package. Those module-level imports exist only to type the getters, but they are what made a single hub drag the entire method interpreter into every consumer that just wanted `get_console()`.The property that matters is measurable: **importing the Pipelex runtime loads zero modules from any of the packages named above.** That is both the assertion the closure test pins and the outward-facing claim — the inference engine does not know the MTHDS language exists, so you can embed it without loading a line of the parser, the pipe machinery, or a single pipe kind. Verify it from the repo root on a synced venv:@@ -90,7 +88,7 @@ from pathlib import Pathimport pipelex.cogt.content_generation.content_generator # noqa: F401-INTERPRETER = {"libraries", "pipe_operators", "pipe_controllers", "codegen", "builder", "interpreter_plugins", "pipe_machinery", "pipe_signature", "mthds_parsing"}+INTERPRETER = {"libraries", "pipe_operators", "pipe_controllers", "codegen", "builder", "interpreter_plugins", "pipe_machinery", "pipe_signature", "mthds_parsing", "pipeline", "pipe_run"}loaded = {name: mod for name, mod in sys.modules.items() if name.startswith("pipelex.")}interpreter = sorted(n for n in loaded if n.split(".")[1] in INTERPRETER)sloc = 0@@ -118,7 +116,7 @@ For a long time `core/` held two different kinds of thing:One model stayed behind on purpose, and it is the interesting case. `PipelexBundleBlueprintValidationErrorData` is raised by the parser but imported by `pipeline/` and `libraries/`, which carry it into every runtime-layer import closure. Filing it with the parser would have made the boundary unenforceable for `mthds_parsing` — the closure predicate would have needed a permanent exclusion for it. It lives in `core.exceptions` instead, beside the two sibling structured error-data models it shares `PipeValidationErrorType` with. **Moving the leaf is what buys the clean predicate**; excluding it would only have recorded the problem.-So the declaration names `pipelex.core` wholesale, which is a claim the measurement now supports: every `pipelex.core.*` module loads zero modules from the interpreter packages the predicate names, and none reaches `interpreter_hub`. (`core.pipes.pipe_output` still pulls in `pipeline.pipeline_models` for one leaf constant — the `pipeline` / `pipe_run` wart, unchanged by this and tracked below.) It once listed core's data-model packages one by one, and that enumeration was the shape of the problem — a package-granular declaration is only honest when the packages match the layers.+So the declaration names `pipelex.core` wholesale, which is a claim the measurement now supports: every `pipelex.core.*` module loads zero modules from the interpreter packages the predicate names, and none reaches `interpreter_hub`. It once listed core's data-model packages one by one, and that enumeration was the shape of the problem — a package-granular declaration is only honest when the packages match the layers.The dividing line is worth stating as a rule of thumb: **if it names a `Pipe`, it belongs to the interpreter layer.**@@ -206,7 +204,9 @@ make check-hub-layering # alias: make chlAn AST guard (`pipelex-dev check-hub-layering`, core in `pipelex/cli/dev_cli/commands/hub_layering_guard.py`) that runs in `make agent-check`, in the `make check` aggregate, and in CI. It checks three rules over `pipelex/` and `tests/`:-1. **The layer rule.** A module in the declared runtime layer — `pipelex.cogt`, `pipelex.core`, `pipelex.plugins`, `pipelex.providers`, `pipelex.reporting`, `pipelex.system`, `pipelex.tools`, plus the `pipelex.runtime_hub` module itself — may not import `pipelex.interpreter_hub`. The declaration is compliant with an empty exception list, so the guard hard-blocks on **any** violation. Entries are matched exact-or-dotted-prefix, which is why a bare *module* is a legal entry beside the packages: without `pipelex.runtime_hub` spelled out, the module at the centre of the rule would be exempt from it. `pipelex.core` was six entries until its interpreter tenants moved out — see [Where core splits](#where-core-splits) for what that enumeration was working around.+1. **The layer rule.** A module in the declared runtime layer — `pipelex.cogt`, `pipelex.core`, `pipelex.errors`, `pipelex.graph`, `pipelex.observer`, `pipelex.plugins`, `pipelex.providers`, `pipelex.reporting`, `pipelex.system`, `pipelex.test_extras`, `pipelex.tools`, `pipelex.tracing`, plus the `pipelex.runtime_hub` module itself — may not import `pipelex.interpreter_hub`. The declaration is compliant with an empty exception list, so the guard hard-blocks on **any** violation. Entries are matched exact-or-dotted-prefix, which is why a bare *module* is a legal entry beside the packages: without `pipelex.runtime_hub` spelled out, the module at the centre of the rule would be exempt from it. `pipelex.core` was six entries until its interpreter tenants moved out — see [Where core splits](#where-core-splits) for what that enumeration was working around.++ `graph`, `tracing`, `observer` and `errors` joined the list late, and the delay cost something — see [Known inversions](#known-inversions). They are the run-graph data model with its tracer and renderers, the trace-event assembler feeding it, the run-observation hooks, and the error taxonomy: machinery present at execution time whatever is loaded, which is the runtime layer's own definition. `pipelex.test_extras` is on the list for the same reason: it ships, `pipelex.py` imports it at boot, and it measures clean. `pipelex.kit` is data files with no module to police; `pipelex.language`, `pipelex.runtime_bridge` and `pipelex.cli` all measure dirty and are interpreter-side by construction. That is every top-level package accounted for — which is the point, because the rule of thumb is that a measured-clean package should be *declared*, not left undeclared: **an undeclared package is not neutral, it is unpoliced.**2. **The dead-module rule.** *No* scanned module may reference `pipelex.hub`. It was deleted rather than aliased so a stale import fails loudly; this closes the one hole in that guarantee.3. **The transitive rule.** No runtime-layer module may *reach* `pipelex.interpreter_hub` either, through any chain of module-level imports. Rules 1 and 2 are per-file and see one hop; this one resolves the whole module-level import graph of `pipelex/` and does reachability over it, reporting the shortest chain and the line of its first hop. It exists because the one-hop rules missed a live breach for a whole release: four modules of the declared runtime-layer `pipelex.plugins` package reached the interpreter hub through `runtime_bridge`, `pipeline` and `pipe_operators`, and both gates stayed green (see [Known inversions](#known-inversions)). A *direct* import is left to rule 1, which names the more specific remedy, rather than reported twice.@@ -233,7 +233,16 @@ The entry points are the inference layer, `runtime_hub` itself, `providers.builtIts predicate is now a single membership test over whole top-level packages — no per-module list and no exclusions. It used to need both: core's Pipe-machinery modules had to be named one by one (most were caught only *transitively*, through the `pipe_operators` / `libraries` they pull in, and `pipe_blueprint` pulled in none of it, so a runtime-layer import of it would have passed a package-only predicate), and `core.bundles.exceptions` had to be excluded by exact match because its validation-error data landed in every runtime closure. Both disappeared when the modules moved: the machinery to `pipe_machinery`, the parser to `mthds_parsing`, and the one leaf model to `core.exceptions`. **A package-granular predicate is honest only once the packages match the layers** — that is the whole argument for the moves, stated as a check.-What the predicate still cannot name is `pipeline` and `pipe_run`: interpreter-named homes whose leaf models already land in every runtime closure — `core.pipes.pipe_output` reaches `pipeline.pipeline_models` for a single leaf constant, for instance. Naming them today would fail every entry point on a placement wart rather than a broken arrow. The remedy is the one `mthds_parsing` used: move the leaves to a runtime-layer home first, then widen the predicate.+The predicate now names **every** interpreter package. `pipeline` and `pipe_run` were the last two absent, and the reason was placement, not a broken arrow: four leaf models of theirs landed in every runtime closure, so naming them would have failed every entry point over an address. The remedy was the one `mthds_parsing` used — move the leaves first, then widen the predicate — and where each leaf went is decided by what it *is*, not by which package used to hold it:++| leaf | was | is now | why there |+| --- | --- | --- | --- |+| `SpecialPipelineId` | `pipeline.pipeline_models` | `system.job_metadata` | it is the vocabulary of `pipeline_run_id`, and that is `JobMetadata`'s field |+| `PipeRunMode` | `pipe_run.pipe_run_mode` | `system.pipe_run_mode` | a run-scope directive, not one of a method's values |+| `PipeRunParamKey` | inside `pipe_run.pipe_run_params` | `system.pipe_run_param_key` | same, and `core.concepts` needs it as its reserved-names list |+| `PipeRunError` | `pipe_run.exceptions` | `core.pipes.exceptions` | the runtime layer *subclasses* it — `PipeRunInputsError` and `OptionalValueAbsentError` derive from it in `core.pipes.inputs` |++Note the last row does not follow the first three into `system/`. Consistency of destination is not the criterion — what the symbol *is* decides. Three are run-scope directives and enums; the fourth is the base of a pipe-error family whose other members already live in `core/pipes/`, and filing it with them also lands it in the same error-reference section as the two subclasses that derive from it.The detector runs in a subprocess, so its logic lives in a `textwrap.dedent` string that no linter or type checker sees — and a predicate that has quietly stopped detecting would make every entry point pass *vacuously*. Three guards close that, each covering what the others cannot:@@ -260,6 +269,10 @@ Named so this document stays honest.**The one that was fixed, kept as the worked example.** Four modules of the declared runtime-layer `pipelex.plugins` package used to reach `interpreter_hub` — `direct/direct_plugin.py` and `pipe_func/pipe_func_plugin.py` as the leaves (their job is to *construct* interpreter-layer objects), `builtins.py` and `discovery.py` purely as aggregators over them. (That `builtins.py` is today `pipelex/providers/builtins.py`; it moved with the vendor adapters it aggregates when the mechanism and the adapters were split.) None imported the hub *directly*, so the guard did not flag them, and the closure test had no entry point for the package, so nothing else did either: from the moment the declaration landed it claimed a property the measurement contradicted, with both gates green. The remedy was placement, not indirection — the two leaves moved to `pipelex/interpreter_plugins/` and the composition moved to the layer allowed to weld (see [Where the built-in plugins split](#where-the-built-in-plugins-split)) — and the guard grew the [transitive rule](#the-rule-make-check-hub-layering) so the next one cannot hide the same way. Three lessons generalize: a package-granular declaration is a claim about the whole package, an aggregator inherits every breach it aggregates, and a rule that stops at one hop will eventually be walked around.+**The one the worked example predicted, found by declaring the package.** `graph/graph_rendering.py` imported `pipeline.dry_run_pipeline` at module level, and importing it pulled in `interpreter_hub` plus ~76 interpreter modules. Every gate stayed green, for a reason worth stating plainly: rules 1 and 3 both filter their candidates through `is_runtime_layer`, and `pipelex.graph` was not declared — so the module had been outside the rules' domain the whole time. This is the `pipelex.plugins` breach again, one level up: not a package whose declaration overreached, but a package with **no** declaration at all. The remedy was placement, as before. The module split along "do I need a loaded method?", which is this boundary's own question: the pure renderer (`GraphFormat`, `render_graph_from_spec`) stayed in `pipelex.graph`, and the bundle-driven half that has to dry-run a method first (`generate_graph_for_bundle`, `generate_view_for_bundle`) became `pipelex.pipeline.bundle_graph_rendering`, next to the `dry_run_pipeline` it exists to wrap. The lesson is the one this page now states under [The rule](#the-rule-make-check-hub-layering): **an undeclared package is not neutral, it is unpoliced** — omitting an entry makes the guard quieter, never louder.++**The one an aggregate module hid.** Five built-in vendor adapters — `providers/{anthropic,bedrock,google,mistral}/*_list.py` — imported `MissingDependencyError` from `pipelex.exceptions` rather than from its definition site in `pipelex.system.exceptions`. `pipelex/exceptions.py` is the *public all-errors aggregate*: it re-exports every interpreter package's exceptions, so importing anything from it loads `pipeline.exceptions` → `validation_errors` → `fixes.planner` and more. Each of those five declared runtime-layer modules therefore loaded 15 interpreter modules. Neither gate could see it: the guard's rules only chase `interpreter_hub`, and the aggregate never reaches it; the closure test's `providers.builtins` entry point does not cover these modules either, because the vendor plugins import them *inside a function*, which hides them from the static import graph and from the aggregator's own closure at once. The fix is the repo's existing rule — *direct full-path imports everywhere*, i.e. import from where the symbol is defined, never from a convenience aggregate — plus one new entry point (`providers.anthropic.anthropic_list`) so the runtime-truth check now covers the shape. The generalizable lesson: **a module that re-exports across layers is a layer boundary with the sign filed off**, and a deferred import will hide it from every static gate you have.+- **`cogt` names four specific vendors, deliberately.** `cogt/config_cogt.py` imports `AnthropicConfig`, `GoogleConfig`, `MistralConfig` and `OpenAIConfig` from their `pipelex/providers/` packages. Both sides are runtime-layer, so this breaches no hub rule — it is a placement inversion: the vendor-neutral engine names four vendors. It is accepted rather than fixed, because the alternative is worse. The main config model is statically typed end-to-end (`system/configuration/configs.py` and the `pipelex.toml` files are structurally synced, and boot fails loud when they disagree), so making vendor config sections plugin-contributed would trade compile-time typing for a dynamic registry — a real loss to buy a cosmetic win. The edge is one-way and shallow: a config class, not a worker.- **The img-gen one that stopped being an inversion.** `cogt/img_gen/img_gen_args_factory.py` used to import two vendor img-gen factories at module level, for taxonomy and geometry helpers. It was never a registry problem: dispatch is keyed on `AspectRatioTaxonomy`, a `cogt`-owned enum that names model families and no providers, and no family is served by a single adapter — the `openai` and `azure_openai` decks both ship GPT Image models, and the gateway worker resolves Gemini geometry through the same mapping the native Google worker uses — so there was no provider key to dispatch on, and a registrar slot would have bought a plugin-API bump for two import sites. Fixed by placement instead: the helpers are now `cogt/img_gen/img_gen_gemini_mapping.py` and `cogt/img_gen/img_gen_gpt_mapping.py`, and the Google worker and the gateway factory import *inward* to them. One `cogt → specific vendor` edge of this kind remains — `model_backends/backend_factory.py` reaching for `VertexAIFactory` — already deferred inside a function, and it self-resolves when VertexAI support is removed.- **What pins the two bullets above.** The complete `cogt → pipelex.providers` list — the four config imports plus that one deferred factory import — is a golden set in `tests/unit/pipelex/cogt/test_cogt_dependency_boundaries.py`, together with the stronger fact that `pipelex/cogt/**` imports no vendor SDK at all. A sixth edge fails it, and nothing else in the repo would notice: both packages are runtime-layer, so the guard and the closure test are blind to an edge between them by construction. Golden sets rather than a rule, because these are *accepted* inversions — there is no predicate separating the sanctioned edges from a new one, and the point is to make the next one a diff a reviewer reads. Note the tempting generalization — *no vendor SDK anywhere in `pipelex/` outside `providers/`* — is **false**, and a test asserting it would be red on day one: `tools/pdf/pypdfium2_renderer.py`, `tools/storage/`, `tracing/` and `reporting/` import pypdfium2 and the AWS/GCP SDKs on purpose, because `providers/storage/` is a registration shim whose implementations live under `pipelex/tools/`. The scope that holds is `cogt`.diff --git a/docs/errors/authoring-and-language.md b/docs/errors/authoring-and-language.mdindex 1e0287003..95b6a7c25 100644--- a/docs/errors/authoring-and-language.md+++ b/docs/errors/authoring-and-language.md@@ -42,6 +42,7 @@ own page. Classes are grouped by subsystem.- [`PipeInputError`](pipe-input-error.md) — Pipe input- [`PipeInputsFactoryError`](pipe-inputs-factory-error.md) — Pipe inputs factory- [`PipeOperatorModelChoiceError`](pipe-operator-model-choice-error.md) — Pipe operator model choice+- [`PipeRunError`](pipe-run-error.md) — Pipe run- [`PipeRunInputsError`](pipe-run-inputs-error.md) — Pipe run inputs- [`StructureClassError`](structure-class-error.md) — Structure class- [`StructureValidationError`](structure-validation-error.md) — Structure validationdiff --git a/docs/errors/execution-and-runtime.md b/docs/errors/execution-and-runtime.mdindex 349ff7bea..3d3f74f67 100644--- a/docs/errors/execution-and-runtime.md+++ b/docs/errors/execution-and-runtime.md@@ -19,7 +19,6 @@ own page. Classes are grouped by subsystem.- [`DryRunGraphNotProducedError`](dry-run-graph-not-produced-error.md) — Dry run graph not produced- [`PipeJobError`](pipe-job-error.md) — Pipe job- [`PipeRouterError`](pipe-router-error.md) — Pipe router-- [`PipeRunError`](pipe-run-error.md) — Pipe run- [`PipeRunParamsError`](pipe-run-params-error.md) — Pipe run params- [`StorageDeliveryError`](storage-delivery-error.md) — Storage delivery- [`WebhookDeliveryError`](webhook-delivery-error.md) — Webhook deliverydiff --git a/docs/errors/pipe-run-error.md b/docs/errors/pipe-run-error.mdindex 29098f32c..424e7dc7a 100644--- a/docs/errors/pipe-run-error.md+++ b/docs/errors/pipe-run-error.md@@ -7,13 +7,15 @@ description: "Reference for the `PipeRunError` Pipelex error class."# Pipe run+A pipe failed while running, with the run mode and the pipe it failed in.+| Field | Value ||---|---|| `error_type` | `PipeRunError` || `title` | Pipe run || `type_uri` | `https://docs.pipelex.com/latest/errors/pipe-run-error/` || `error_domain` | _(inherited from parent)_ |-| Defined in | `pipelex.pipe_run.exceptions` |+| Defined in | `pipelex.core.pipes.exceptions` || Parent class | [`PipelexError`](pipelex-error.md) |[Back to Error Reference](index.md)diff --git a/docs/under-the-hood/execution-graph-tracing.md b/docs/under-the-hood/execution-graph-tracing.mdindex 86afd6f20..74fa52334 100644--- a/docs/under-the-hood/execution-graph-tracing.md+++ b/docs/under-the-hood/execution-graph-tracing.md@@ -62,7 +62,7 @@ pipelex run pipe my_pipe --dry-run --graph --mock-inputs```pythonfrom pipelex.pipeline.runner import PipelexMTHDSProtocol-from pipelex.pipe_run.pipe_run_mode import PipeRunMode+from pipelex.system.pipe_run_mode import PipeRunMode# Execute with graph tracing via configrunner = PipelexMTHDSProtocol(diff --git a/pipelex/cli/agent_cli/commands/run/_run_core.py b/pipelex/cli/agent_cli/commands/run/_run_core.pyindex 0e211c802..cf54e9147 100644--- a/pipelex/cli/agent_cli/commands/run/_run_core.py+++ b/pipelex/cli/agent_cli/commands/run/_run_core.py@@ -15,8 +15,8 @@ from pipelex.config import get_configfrom pipelex.core.memory.absence import AbsenceRecordfrom pipelex.core.memory.absence_render import build_absence_html, build_absence_json, build_absence_markdown, build_absence_payloadfrom pipelex.graph.graph_factory import generate_graph_outputs, save_graph_outputs_to_dir-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.tools.misc.json_utils import clean_json_dumpsdiff --git a/pipelex/cli/agent_cli/commands/validate/bundle_cmd.py b/pipelex/cli/agent_cli/commands/validate/bundle_cmd.pyindex e6a85eb89..fd751a217 100644--- a/pipelex/cli/agent_cli/commands/validate/bundle_cmd.py+++ b/pipelex/cli/agent_cli/commands/validate/bundle_cmd.py@@ -20,11 +20,12 @@ from pipelex.cli.agent_cli.commands.validate._validate_core import (validate_pipe_in_bundle_core,)from pipelex.core.pipes.exceptions import PipeOperatorModelChoiceError-from pipelex.graph.graph_rendering import GraphFormat, generate_graph_for_bundle, generate_view_for_bundle+from pipelex.graph.graph_rendering import GraphFormatfrom pipelex.libraries.pipe.exceptions import PipeNotFoundErrorfrom pipelex.mthds_parsing.exceptions import MthdsParserErrorfrom pipelex.pipe_operators.exceptions import PipeOperatorModelAvailabilityErrorfrom pipelex.pipelex import Pipelex+from pipelex.pipeline.bundle_graph_rendering import generate_graph_for_bundle, generate_view_for_bundlefrom pipelex.pipeline.exceptions import PipelineExecutionError, ValidateBundleErrorfrom pipelex.pipeline.validation_render import format_validate_markdownfrom pipelex.tools.misc.chart_utils import FlowchartDirectiondiff --git a/pipelex/cli/commands/run/_run_core.py b/pipelex/cli/commands/run/_run_core.pyindex 5f13d990b..0960c339e 100644--- a/pipelex/cli/commands/run/_run_core.py+++ b/pipelex/cli/commands/run/_run_core.py@@ -30,12 +30,12 @@ from pipelex.graph.graph_factory import generate_graph_outputs, save_graph_outpufrom pipelex.mthds_parsing.exceptions import MthdsParserErrorfrom pipelex.mthds_parsing.parser import MthdsParserfrom pipelex.pipe_operators.exceptions import PipeOperatorModelAvailabilityError-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipelex import Pipelexfrom pipelex.pipeline.exceptions import PipelineExecutionErrorfrom pipelex.pipeline.runner import PipelexMTHDSProtocolfrom pipelex.reporting.cost_report_renderer import render_cost_report_for_outputfrom pipelex.runtime_hub import get_console, get_telemetry_manager+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.runtime import IntegrationModefrom pipelex.system.telemetry.events import EventPropertyfrom pipelex.tools.misc.exceptions import JsonTypeError, TomlErrordiff --git a/pipelex/cli/dev_cli/commands/hub_layering_guard.py b/pipelex/cli/dev_cli/commands/hub_layering_guard.pyindex 47fef9ff0..755c74c59 100644--- a/pipelex/cli/dev_cli/commands/hub_layering_guard.py+++ b/pipelex/cli/dev_cli/commands/hub_layering_guard.py@@ -103,29 +103,46 @@ SCAN_ROOTS: tuple[Path, ...] = (SOURCE_ROOT, TESTS_ROOT)#: `pipe_blueprint`, `pipe_factory`, `validation`, `template_guard_lint`, `rendering/`) is#: `pipelex.pipe_machinery`. What is left in `core/` describes what a method's *values* are, and#: nothing in it needs a loaded method — measured: no `pipelex.core.*` module reaches `interpreter_hub`-#: or loads a module from any of the packages above. (`core.pipes.pipe_output` does still pull in-#: `pipeline.pipeline_models` for one leaf constant — the known `pipeline` / `pipe_run` placement wart,-#: which is why the claim is scoped to those packages rather than to "zero interpreter modules".)-#: A package-granular declaration is only honest when the packages match the layers; naming-#: `pipelex.core` wholesale is now a claim the measurement supports rather than contradicts.+#: or loads a single interpreter module. A package-granular declaration is only honest when the+#: packages match the layers; naming `pipelex.core` wholesale is now a claim the measurement supports+#: rather than contradicts.#:#: `pipelex.plugins` and `pipelex.providers` are two entries for what used to be one package, and#: both are runtime-layer: `plugins` is the plugin *mechanism* (the contract, the registrar, the#: capability registries), `providers` the built-in vendor *adapters* that register through it.#: Splitting them did not move the boundary — it made the one-way dependency legible — so leaving-#: `pipelex.providers` undeclared would silently un-declare the largest runtime-layer package. Note-#: that omitting an entry makes this guard **quieter**, not louder: the transitive rule below filters-#: its candidates through :func:`is_runtime_layer`, so an undeclared package is excluded from the-#: rule's domain rather than reported by it. That is why the declaration is asserted by a test.+#: `pipelex.providers` undeclared would silently un-declare the largest runtime-layer package.+#:+#: `pipelex.graph`, `pipelex.tracing`, `pipelex.observer` and `pipelex.errors` are the four packages+#: that were measured clean and left undeclared anyway, and the omission cost something: **an+#: undeclared package is not neutral, it is unpoliced.** Omitting an entry makes this guard+#: **quieter**, not louder — the transitive rule below filters its candidates through+#: :func:`is_runtime_layer`, so an undeclared package is excluded from the rule's domain rather than+#: reported by it. That is exactly how `graph.graph_rendering` came to reach `interpreter_hub`+#: through `pipeline.dry_run_pipeline` with every gate green; the bundle-driven half of that module+#: is now `pipelex.pipeline.bundle_graph_rendering`, and `graph` is declared. What each entry is:+#: `graph` is the run-graph data model, tracer and renderers, `tracing` the trace-event assembler+#: feeding them, `observer` the run-observation hooks, `errors` the error taxonomy — all machinery+#: present at execution time whatever is loaded, which is the runtime layer's own definition.+#: `pipelex.test_extras` is here for the same reason: it ships, `pipelex.py` imports it at boot, and it+#: measures clean — leaving it out would repeat the omission this entry documents. `pipelex.kit` is data+#: files with no module to police; `pipelex.language`, `pipelex.runtime_bridge` and `pipelex.cli` all+#: measure dirty and are interpreter-side by construction. That is every top-level package accounted for.+#: That the declaration is a claim rather than a hope is why it is asserted by a test.#: See the "Where core splits" section of ``docs/contribute/hub-layering.md``.RUNTIME_LAYER_PACKAGES: tuple[str, ...] = ("pipelex.cogt","pipelex.core",+ "pipelex.errors",+ "pipelex.graph",+ "pipelex.observer","pipelex.plugins","pipelex.providers","pipelex.reporting","pipelex.system",+ "pipelex.test_extras","pipelex.tools",+ "pipelex.tracing",# the runtime layer's own hub — a module, not a package; see the note above"pipelex.runtime_hub",)diff --git a/pipelex/cogt/content_generation/cogt_run_params.py b/pipelex/cogt/content_generation/cogt_run_params.pyindex b60b495c5..4f8894bd8 100644--- a/pipelex/cogt/content_generation/cogt_run_params.py+++ b/pipelex/cogt/content_generation/cogt_run_params.py@@ -23,7 +23,7 @@ from typing import Selffrom pydantic import BaseModel, ConfigDict, model_validator-from pipelex.pipe_run.pipe_run_mode import PipeRunMode+from pipelex.system.pipe_run_mode import PipeRunModedef check_mock_usage_requires_dry(*, run_mode: PipeRunMode, is_mock_usage: bool) -> None:diff --git a/pipelex/core/concepts/concept_structure_blueprint.py b/pipelex/core/concepts/concept_structure_blueprint.pyindex bfa9aebd7..be634f5cd 100644--- a/pipelex/core/concepts/concept_structure_blueprint.py+++ b/pipelex/core/concepts/concept_structure_blueprint.py@@ -5,7 +5,7 @@ from typing import Any, Selffrom pydantic import BaseModel, Field, field_validator, model_validatorfrom pipelex.core.concepts.validation import is_concept_ref_or_code_valid-from pipelex.pipe_run.pipe_run_params import PipeRunParamKey+from pipelex.system.pipe_run_param_key import PipeRunParamKey# Reserved field names that cannot be used in concept structures# These are either Pydantic BaseModel reserved attributes or internal metadata fieldsdiff --git a/pipelex/core/pipes/exceptions.py b/pipelex/core/pipes/exceptions.pyindex 7f6dbf6b9..cc291d661 100644--- a/pipelex/core/pipes/exceptions.py+++ b/pipelex/core/pipes/exceptions.py@@ -8,6 +8,7 @@ from pipelex.cogt.img_gen.img_gen_setting import ImgGenModelChoicefrom pipelex.cogt.llm.llm_setting import LLMModelChoicefrom pipelex.cogt.model_backends.model_type import ModelTypefrom pipelex.cogt.models.model_reference import ModelReference+from pipelex.system.pipe_run_mode import PipeRunModeclass PipeFactoryErrorType(StrEnum):@@ -57,6 +58,21 @@ class PipeVariableMultiplicityError(ValueError):pass+class PipeRunError(PipelexError):+ """A pipe failed while running, with the run mode and the pipe it failed in.++ Base of the run-failure family, and it sits here rather than with the pipe-run machinery because+ the runtime layer subclasses it: `PipeRunInputsError` and `OptionalValueAbsentError` in+ `core.pipes.inputs.exceptions` derive from it, so filing the base with the machinery put a+ module of `pipe_run` — and its whole import chain — inside every runtime import closure.+ """++ def __init__(self, message: str, run_mode: PipeRunMode, pipe_code: str):+ self.run_mode = run_mode+ self.pipe_code = pipe_code+ super().__init__(message)++class PipeOperatorModelChoiceError(PipelexError):def __init__(self,diff --git a/pipelex/core/pipes/inputs/exceptions.py b/pipelex/core/pipes/inputs/exceptions.pyindex 4649aa66f..17c5ca44f 100644--- a/pipelex/core/pipes/inputs/exceptions.py+++ b/pipelex/core/pipes/inputs/exceptions.py@@ -1,8 +1,8 @@from pipelex.base_exceptions import ErrorDomain, PipelexErrorfrom pipelex.cogt.inference.error_classification import UserAction, UserActionKindfrom pipelex.core.memory.absence import AbsenceRecord-from pipelex.pipe_run.exceptions import PipeRunError-from pipelex.pipe_run.pipe_run_mode import PipeRunMode+from pipelex.core.pipes.exceptions import PipeRunError+from pipelex.system.pipe_run_mode import PipeRunModeclass InputStuffSpecsError(PipelexError):diff --git a/pipelex/core/pipes/pipe_output.py b/pipelex/core/pipes/pipe_output.pyindex 4fd4275d3..e04dddaf2 100644--- a/pipelex/core/pipes/pipe_output.py+++ b/pipelex/core/pipes/pipe_output.py@@ -16,8 +16,8 @@ from pipelex.core.stuffs.text_and_images_content import TextAndImagesContentfrom pipelex.core.stuffs.text_content import TextContentfrom pipelex.core.stuffs.yes_no_content import YesNoContentfrom pipelex.graph.graphspec import GraphSpec-from pipelex.pipeline.pipeline_models import SpecialPipelineIdfrom pipelex.reporting.reporting_types import AnyTokensUsage+from pipelex.system.job_metadata import SpecialPipelineIdclass PipeOutput(PipeOutputAbstract[WorkingMemory]):diff --git a/pipelex/exceptions.py b/pipelex/exceptions.pyindex e53ac15e6..7cb2c92e8 100644--- a/pipelex/exceptions.py+++ b/pipelex/exceptions.py@@ -19,6 +19,7 @@ from pipelex.core.memory.exceptions import (from pipelex.core.pipes.exceptions import (PipeFactoryError,PipeOperatorModelChoiceError,+ PipeRunError,PipeValidationError,)from pipelex.core.pipes.inputs.exceptions import InputStuffSpecNotFoundError@@ -39,7 +40,7 @@ from pipelex.libraries.exceptions import (from pipelex.libraries.pipe.exceptions import PipeNotFoundErrorfrom pipelex.pipe_controllers.exceptions import PipeControllerError, PipeControllerOutputConceptMismatchErrorfrom pipelex.pipe_operators.exceptions import PipeOperatorModelAvailabilityError-from pipelex.pipe_run.exceptions import BatchParamsError, PipeRouterError, PipeRunError, PipeRunParamsError+from pipelex.pipe_run.exceptions import BatchParamsError, PipeRouterError, PipeRunParamsErrorfrom pipelex.pipeline.exceptions import (PipeExecutionError,PipelineExecutionError,@@ -86,8 +87,8 @@ __all__ = ["PipeRunParamsError","BatchParamsError","PipeRouterError",- "PipeRunError",# from pipelex.core.pipes.exceptions+ "PipeRunError","InputStuffSpecNotFoundError","PipeFactoryError","PipeOperatorModelChoiceError",diff --git a/pipelex/graph/graph_rendering.py b/pipelex/graph/graph_rendering.pyindex c31c0c9e2..a406bc394 100644--- a/pipelex/graph/graph_rendering.py+++ b/pipelex/graph/graph_rendering.py@@ -1,34 +1,19 @@-"""Shared graph rendering utilities for CLI commands.+"""Rendering a run graph to disk, from a spec that already exists.-Builds a render-specific GraphConfig, generates graph outputs, and saves them to disk.-Used by both the regular CLI and the agent CLI.+Runtime-layer: everything here takes a :class:`GraphSpec` and turns it into files. Producing that+spec from a *bundle* needs a loaded method, so those helpers live one layer up, in+``pipelex.pipeline.bundle_graph_rendering``."""from enum import StrEnumfrom pathlib import Path-from typing import Any-from pipelex.config import get_configfrom pipelex.graph.graph_config import GraphConfigfrom pipelex.graph.graph_factory import GraphOutputs, generate_graph_outputs, save_graph_outputs_to_dirfrom pipelex.graph.graphspec import GraphSpec-from pipelex.pipeline.dry_run_pipeline import dry_run_pipelinefrom pipelex.tools.misc.chart_utils import FlowchartDirection-def _sanitize_graph_name(graph_name: str) -> str:- """Sanitize graph_name to prevent path traversal.-- Args:- graph_name: The requested filename for the graph output.-- Returns:- A safe filename with no directory components.- """- sanitized = Path(graph_name).name- return sanitized or "graph.html"--class GraphFormat(StrEnum):"""Selectable graph output formats."""@@ -98,162 +83,3 @@ async def render_graph_from_spec()return save_graph_outputs_to_dir(graph_outputs=graph_outputs, output_dir=output_dir)---async def _dry_run_bundle(- bundle_path: Path,- *,- library_dirs: list[str] | None = None,- pipe_code: str | None = None,-) -> tuple[GraphSpec, str]:- """Dry-run a bundle file to produce a GraphSpec.-- Reads the file, ensures its parent directory is in library_dirs,- then delegates to ``dry_run_pipeline``.-- Args:- bundle_path: Path to the .mthds bundle file.- library_dirs: Optional library directories for pipe resolution.- pipe_code: Optional explicit pipe target for graph generation.-- Returns:- Tuple of (GraphSpec, pipe_code).- """- mthds_content = bundle_path.read_text(encoding="utf-8")-- # Ensure the bundle's parent directory is included in library_dirs- # so PipelexMTHDSProtocol can resolve sibling dependencies- bundle_parent_dir = str(bundle_path.parent.resolve())- effective_library_dirs: list[str]- if library_dirs:- effective_library_dirs = list(library_dirs)- if bundle_parent_dir not in effective_library_dirs:- effective_library_dirs.append(bundle_parent_dir)- else:- effective_library_dirs = [bundle_parent_dir]-- return await dry_run_pipeline(- mthds_contents=[mthds_content],- bundle_uris=[str(bundle_path)],- library_dirs=effective_library_dirs,- pipe_code=pipe_code,- )---async def generate_graph_for_bundle(- bundle_path: Path,- *,- graph_format: GraphFormat,- library_dirs: list[str] | None = None,- pipe_code: str | None = None,- direction: FlowchartDirection | None = None,- graph_name: str = "dry_run.html",-) -> dict[str, Any]:- """Generate graph visualization for a bundle via dry-run pipeline execution.-- Reads the bundle, parses main_pipe, performs a dry-run with graph tracing,- then renders and saves graph HTML files alongside the bundle.-- Args:- bundle_path: Path to the .mthds bundle file.- graph_format: Which graph format(s) to generate.- library_dirs: Optional library directories for pipe resolution.- pipe_code: Optional explicit pipe target for graph generation.- direction: Flowchart layout direction (default: None, uses TB).- graph_name: Filename for the generated HTML graph (default: "dry_run.html").-- Returns:- Dictionary with graph_files, graph_output_dir, and direction.-- Raises:- MthdsParserError: If bundle parsing fails or main_pipe is missing.- PipelexError: If pipeline execution does not produce a graph spec.- PipelineExecutionError: If dry-run execution fails.- """- graph_spec, resolved_pipe_code = await _dry_run_bundle(bundle_path, library_dirs=library_dirs, pipe_code=pipe_code)-- execution_config = get_config().pipelex.pipeline_execution_config.with_execution_overrides(- generate_graph=True,- mock_inputs=True,- )-- include_mermaidflow: bool- include_reactflow: bool- match graph_format:- case GraphFormat.MERMAIDFLOW:- include_mermaidflow = True- include_reactflow = False- case GraphFormat.REACTFLOW:- include_mermaidflow = False- include_reactflow = True- case GraphFormat.BOTH:- include_mermaidflow = True- include_reactflow = True-- output_dir = bundle_path.parent- saved_files = await render_graph_from_spec(- graph_spec=graph_spec,- graph_config=execution_config.graph_config,- include_mermaidflow=include_mermaidflow,- include_reactflow=include_reactflow,- output_dir=output_dir,- pipe_code=resolved_pipe_code,- direction=direction,- )-- # Rename reactflow.html to the requested filename- reactflow_path = saved_files.get("reactflow_html")- safe_name = _sanitize_graph_name(graph_name)- if reactflow_path and safe_name:- final_path = reactflow_path.parent / safe_name- reactflow_path.rename(final_path)- saved_files["reactflow_html"] = final_path-- return {- "graph_files": {key: str(path) for key, path in saved_files.items()},- "graph_output_dir": str(output_dir),- "pipe_code": resolved_pipe_code,- "direction": str(direction) if direction else None,- }---async def generate_view_for_bundle(- bundle_path: Path,- *,- library_dirs: list[str] | None = None,- pipe_code: str | None = None,- direction: FlowchartDirection | None = None,-) -> dict[str, Any]:- """Generate a GraphSpec for a bundle via dry-run pipeline execution.-- Returns structured JSON data (GraphSpec) suitable for client-side rendering,- without writing any files to disk.-- Args:- bundle_path: Path to the .mthds bundle file.- library_dirs: Optional library directories for pipe resolution.- pipe_code: Optional explicit pipe target for graph generation.- direction: Flowchart layout direction (default: None, uses config default).-- Returns:- Dictionary with graphspec (JSON-serializable dict), pipe_code, and direction.-- Raises:- MthdsParserError: If bundle parsing fails or main_pipe is missing.- PipelexError: If pipeline execution does not produce a graph spec.- PipelineExecutionError: If dry-run execution fails.- """- graph_spec, resolved_pipe_code = await _dry_run_bundle(bundle_path, library_dirs=library_dirs, pipe_code=pipe_code)-- execution_config = get_config().pipelex.pipeline_execution_config.with_execution_overrides(- generate_graph=True,- mock_inputs=True,- )- rf_config = execution_config.graph_config.reactflow_config- effective_direction = direction or rf_config.layout_direction-- return {- "graphspec": graph_spec.model_dump(mode="json", by_alias=True),- "pipe_code": resolved_pipe_code,- "direction": str(effective_direction) if effective_direction else None,- }diff --git a/pipelex/pipe_controllers/batch/pipe_batch.py b/pipelex/pipe_controllers/batch/pipe_batch.pyindex d23bd695c..2e9d9773f 100644--- a/pipelex/pipe_controllers/batch/pipe_batch.py+++ b/pipelex/pipe_controllers/batch/pipe_batch.py@@ -8,6 +8,7 @@ from pipelex.cogt.content_generation.dry_mock import stamp_mock_main_coordinatiofrom pipelex.config import get_configfrom pipelex.core.memory.absence import AbsenceRecordfrom pipelex.core.memory.working_memory import WorkingMemory+from pipelex.core.pipes.exceptions import PipeRunErrorfrom pipelex.core.pipes.inputs.input_stuff_specs import InputStuffSpecsfrom pipelex.core.pipes.pipe_output import PipeOutputfrom pipelex.core.stuffs.list_content import ListContent@@ -16,7 +17,6 @@ from pipelex.core.stuffs.stuff_factory import StuffFactoryfrom pipelex.graph.graph_tracer_manager import GraphTracerManagerfrom pipelex.interpreter_hub import get_pipe_router, get_required_pipefrom pipelex.pipe_controllers.pipe_controller import PipeController-from pipelex.pipe_run.exceptions import PipeRunErrorfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactoryfrom pipelex.pipe_run.pipe_run_params import BatchParams, PipeRunParamsfrom pipelex.system.job_metadata import JobMetadatadiff --git a/pipelex/pipe_controllers/condition/pipe_condition.py b/pipelex/pipe_controllers/condition/pipe_condition.pyindex f42f4379a..54f83aeee 100644--- a/pipelex/pipe_controllers/condition/pipe_condition.py+++ b/pipelex/pipe_controllers/condition/pipe_condition.py@@ -7,7 +7,7 @@ from pipelex.cogt.templating.template_rendering import render_templatefrom pipelex.core.concepts.native.concept_native import NativeConceptCodefrom pipelex.core.memory.absence import AbsenceKind, AbsenceRecordfrom pipelex.core.memory.working_memory import MAIN_STUFF_NAME, WorkingMemory-from pipelex.core.pipes.exceptions import PipeValidationError, PipeValidationErrorType+from pipelex.core.pipes.exceptions import PipeRunError, PipeValidationError, PipeValidationErrorTypefrom pipelex.core.pipes.inputs.input_stuff_specs import InputStuffSpecsfrom pipelex.core.pipes.inputs.input_stuff_specs_factory import InputStuffSpecsFactoryfrom pipelex.core.pipes.pipe_output import PipeOutput@@ -15,7 +15,6 @@ from pipelex.interpreter_hub import get_optional_pipe, get_pipe_router, get_requfrom pipelex.pipe_controllers.condition.special_outcome import SpecialOutcomefrom pipelex.pipe_controllers.pipe_controller import PipeControllerfrom pipelex.pipe_machinery.template_guard_lint import lint_optional_input_guards-from pipelex.pipe_run.exceptions import PipeRunErrorfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactoryfrom pipelex.pipe_run.pipe_run_params import PipeRunParamsfrom pipelex.system.job_metadata import JobMetadatadiff --git a/pipelex/pipe_controllers/parallel/pipe_parallel.py b/pipelex/pipe_controllers/parallel/pipe_parallel.pyindex 8b14e2f2b..96e91db3d 100644--- a/pipelex/pipe_controllers/parallel/pipe_parallel.py+++ b/pipelex/pipe_controllers/parallel/pipe_parallel.py@@ -11,7 +11,7 @@ from pipelex.core.concepts.exceptions import ConceptValueErrorfrom pipelex.core.concepts.native.concept_native import NativeConceptCodefrom pipelex.core.memory.absence import AbsenceRecordfrom pipelex.core.memory.working_memory import WorkingMemory-from pipelex.core.pipes.exceptions import PipeValidationError, PipeValidationErrorType+from pipelex.core.pipes.exceptions import PipeRunError, PipeValidationError, PipeValidationErrorTypefrom pipelex.core.pipes.inputs.exceptions import InputStuffSpecNotFoundErrorfrom pipelex.core.pipes.inputs.input_stuff_specs import InputStuffSpecsfrom pipelex.core.pipes.inputs.input_stuff_specs_factory import InputStuffSpecsFactory@@ -34,7 +34,6 @@ from pipelex.pipe_controllers.absence_taint import (from pipelex.pipe_controllers.pipe_controller import PipeControllerfrom pipelex.pipe_controllers.sub_pipe import SubPipefrom pipelex.pipe_machinery.pipe_abstract import CompanionSlot-from pipelex.pipe_run.exceptions import PipeRunErrorfrom pipelex.pipe_run.pipe_run_params import PipeRunParamsfrom pipelex.system.job_metadata import JobMetadatafrom pipelex.tools.misc.string_utils import get_root_from_dotted_pathdiff --git a/pipelex/pipe_machinery/pipe_abstract.py b/pipelex/pipe_machinery/pipe_abstract.pyindex 59479851f..e12949d60 100644--- a/pipelex/pipe_machinery/pipe_abstract.py+++ b/pipelex/pipe_machinery/pipe_abstract.py@@ -26,11 +26,11 @@ from pipelex.graph.graph_tracer_manager import GraphTracerManager, IOSpec, NodeKfrom pipelex.libraries.library_crate import LibraryCratefrom pipelex.pipe_machinery.pipe_blueprint import PipeCategory, PipeType, valid_pipe_type_tagsfrom pipelex.pipe_machinery.validation import is_variable_satisfied_by_inputs-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import PipeRunParams, output_multiplicity_to_applyfrom pipelex.pipe_signature.exceptions import PipeSignatureNotExecutableErrorfrom pipelex.pipeline.pipeline_factory import PipelineFactoryfrom pipelex.system.job_metadata import JobMetadata, OtelContext+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.telemetry.otel_constants import (LangfuseSpanAttr,OTelConstants,diff --git a/pipelex/pipe_operators/exceptions.py b/pipelex/pipe_operators/exceptions.pyindex aa4c412a3..a96b98ae8 100644--- a/pipelex/pipe_operators/exceptions.py+++ b/pipelex/pipe_operators/exceptions.py@@ -1,5 +1,5 @@from pipelex.base_exceptions import PipelexError-from pipelex.pipe_run.pipe_run_mode import PipeRunMode+from pipelex.system.pipe_run_mode import PipeRunModeclass PipeOperatorModelAvailabilityError(PipelexError):diff --git a/pipelex/pipe_operators/func/pipe_func.py b/pipelex/pipe_operators/func/pipe_func.pyindex b39d199bf..709492db8 100644--- a/pipelex/pipe_operators/func/pipe_func.py+++ b/pipelex/pipe_operators/func/pipe_func.py@@ -9,6 +9,7 @@ from pipelex.core.concepts.concept_factory import ConceptFactoryfrom pipelex.core.memory.exceptions import WorkingMemoryStuffNotFoundErrorfrom pipelex.core.memory.working_memory import WorkingMemoryfrom pipelex.core.memory.working_memory_factory import WorkingMemoryFactory+from pipelex.core.pipes.exceptions import PipeRunErrorfrom pipelex.core.pipes.inputs.input_stuff_specs import InputStuffSpecs, TypedNamedStuffSpecfrom pipelex.core.pipes.pipe_output import PipeOutputfrom pipelex.core.stuffs.list_content import ListContent@@ -16,7 +17,6 @@ from pipelex.core.stuffs.stuff_content import StuffContentfrom pipelex.core.stuffs.stuff_factory import StuffFactoryfrom pipelex.interpreter_hub import get_pipe_func_executorfrom pipelex.pipe_operators.pipe_operator import PipeOperator-from pipelex.pipe_run.exceptions import PipeRunErrorfrom pipelex.pipe_run.pipe_run_params import PipeRunParamsfrom pipelex.runtime_hub import get_class_registryfrom pipelex.system.job_metadata import JobMetadatadiff --git a/pipelex/pipe_operators/llm/pipe_llm.py b/pipelex/pipe_operators/llm/pipe_llm.pyindex f85d459e5..9836c7c05 100644--- a/pipelex/pipe_operators/llm/pipe_llm.py+++ b/pipelex/pipe_operators/llm/pipe_llm.py@@ -17,7 +17,7 @@ from pipelex.core.concepts.concept_factory import ConceptFactoryfrom pipelex.core.concepts.native.concept_native import NativeConceptCodefrom pipelex.core.domains.domain import SpecialDomainfrom pipelex.core.memory.working_memory import WorkingMemory-from pipelex.core.pipes.exceptions import PipeValidationError, PipeValidationErrorType+from pipelex.core.pipes.exceptions import PipeRunError, PipeValidationError, PipeValidationErrorTypefrom pipelex.core.pipes.inputs.input_stuff_specs import InputStuffSpecsfrom pipelex.core.pipes.inputs.input_stuff_specs_factory import InputStuffSpecsFactoryfrom pipelex.core.pipes.pipe_output import PipeOutput@@ -32,14 +32,13 @@ from pipelex.pipe_machinery.validation import is_input_used_by_variables, is_varfrom pipelex.pipe_operators.llm.helpers import get_output_structure_promptfrom pipelex.pipe_operators.llm.llm_prompt_blueprint import LLMPromptBlueprintfrom pipelex.pipe_operators.pipe_operator import PipeOperator-from pipelex.pipe_run.exceptions import PipeRunErrorfrom pipelex.pipe_run.pipe_run_params import (- PipeRunParamKey,PipeRunParams,output_multiplicity_to_apply,)from pipelex.runtime_hub import get_class_registry, get_content_generator, get_model_deckfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_param_key import PipeRunParamKeyfrom pipelex.tools.typing.pydantic_utils import format_pydantic_validation_errordiff --git a/pipelex/pipe_operators/structure/pipe_structure.py b/pipelex/pipe_operators/structure/pipe_structure.pyindex 5657525ad..e8541b99e 100644--- a/pipelex/pipe_operators/structure/pipe_structure.py+++ b/pipelex/pipe_operators/structure/pipe_structure.py@@ -11,7 +11,7 @@ from pipelex.cogt.templating.template_rendering import render_templatefrom pipelex.config import get_configfrom pipelex.core.concepts.native.concept_native import NativeConceptCodefrom pipelex.core.memory.working_memory import WorkingMemory-from pipelex.core.pipes.exceptions import PipeValidationError, PipeValidationErrorType+from pipelex.core.pipes.exceptions import PipeRunError, PipeValidationError, PipeValidationErrorTypefrom pipelex.core.pipes.inputs.input_stuff_specs import InputStuffSpecsfrom pipelex.core.pipes.inputs.input_stuff_specs_factory import InputStuffSpecsFactoryfrom pipelex.core.pipes.pipe_output import PipeOutput@@ -22,7 +22,6 @@ from pipelex.core.stuffs.stuff_factory import StuffFactoryfrom pipelex.interpreter_hub import get_concept_library, get_native_conceptfrom pipelex.pipe_operators.llm.helpers import get_output_structure_promptfrom pipelex.pipe_operators.pipe_operator import PipeOperator-from pipelex.pipe_run.exceptions import PipeRunErrorfrom pipelex.pipe_run.pipe_run_params import PipeRunParams, output_multiplicity_to_applyfrom pipelex.runtime_hub import get_class_registry, get_content_generator, get_model_deckfrom pipelex.system.job_metadata import JobMetadatadiff --git a/pipelex/pipe_run/dry_run_in_process.py b/pipelex/pipe_run/dry_run_in_process.pyindex 912566e2e..4de720a69 100644--- a/pipelex/pipe_run/dry_run_in_process.py+++ b/pipelex/pipe_run/dry_run_in_process.py@@ -23,10 +23,10 @@ from pipelex.pipe_machinery.pipe_abstract import PipeAbstractfrom pipelex.pipe_run.exceptions import DryRunGraphNotProducedErrorfrom pipelex.pipe_run.pipe_router import PipeRouterfrom pipelex.pipe_run.pipe_run import PipeRun-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.execution_seams import prepare_pipe_jobfrom pipelex.pipeline.pipeline_factory import PipelineFactoryfrom pipelex.runtime_hub import scoped_content_generator, scoped_event_log+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.telemetry.otel_constants import OTelConstantsfrom pipelex.tracing.in_memory_event_log import InMemoryEventLogdiff --git a/pipelex/pipe_run/exceptions.py b/pipelex/pipe_run/exceptions.pyindex 7d987aa8e..9090d9e0f 100644--- a/pipelex/pipe_run/exceptions.py+++ b/pipelex/pipe_run/exceptions.py@@ -1,18 +1,17 @@from pipelex.base_exceptions import ErrorDomain, PipelexError-from pipelex.pipe_run.pipe_run_mode import PipeRunMode+from pipelex.system.pipe_run_mode import PipeRunModeclass AsyncExecutionNotEnabledError(PipelexError):"""Raised when a route that depends on asynchronous execution is hit on adeployment that does not have an async execution backend enabled.- Backend-neutral on purpose, and it lives in core precisely because it is the- shared contract between the runner API — which maps it to an HTTP status (501)- — and any async-execution backend plugin that raises it: the Temporal plugin- today, other async backends (e.g. Mistral Workflows) as support lands. Core- itself never raises it. The class name, title, and detail therefore talk about- *async execution* as a capability of the deployment, not about any specific- backend brand.+ Backend-neutral on purpose, because it is the shared contract between the+ runner API — which maps it to an HTTP status (501) — and any async-execution+ backend plugin that raises it: the Temporal plugin today, other async backends+ (e.g. Mistral Workflows) as support lands. Nothing in this repo raises it. The+ class name, title, and detail therefore talk about *async execution* as a+ capability of the deployment, not about any specific backend brand.``error_domain = CONFIG`` because the caller's request is well-formed; whatis missing is server-side configuration. The pipelex-api layer maps this@@ -50,13 +49,6 @@ class BatchParamsError(PipelexError):pass-class PipeRunError(PipelexError):- def __init__(self, message: str, run_mode: PipeRunMode, pipe_code: str):- self.run_mode = run_mode- self.pipe_code = pipe_code- super().__init__(message)--class PipeJobError(PipelexError):passdiff --git a/pipelex/pipe_run/pipe_router_protocol.py b/pipelex/pipe_run/pipe_router_protocol.pyindex 7e2793eb6..91512feee 100644--- a/pipelex/pipe_run/pipe_router_protocol.py+++ b/pipelex/pipe_run/pipe_router_protocol.py@@ -2,9 +2,10 @@ from abc import abstractmethodfrom typing import Protocolfrom pipelex.cogt.exceptions import CogtError+from pipelex.core.pipes.exceptions import PipeRunErrorfrom pipelex.core.pipes.pipe_output import PipeOutputfrom pipelex.observer.observer_protocol import ObserverProtocol, PayloadKey, PayloadType-from pipelex.pipe_run.exceptions import PipeRouterError, PipeRunError+from pipelex.pipe_run.exceptions import PipeRouterErrorfrom pipelex.pipe_run.pipe_job import PipeJobdiff --git a/pipelex/pipe_run/pipe_run_params.py b/pipelex/pipe_run/pipe_run_params.pyindex ae47d9149..f29c2fc19 100644--- a/pipelex/pipe_run/pipe_run_params.py+++ b/pipelex/pipe_run/pipe_run_params.py@@ -1,6 +1,5 @@from __future__ import annotations-from enum import StrEnumfrom typing import Any, Selffrom pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator@@ -9,18 +8,9 @@ from pipelex import logfrom pipelex.cogt.content_generation.cogt_run_params import CogtRunParams, check_mock_usage_requires_dryfrom pipelex.core.memory.working_memory import BATCH_ITEM_STUFF_NAME, MAIN_STUFF_NAMEfrom pipelex.core.pipes.variable_multiplicity import VariableMultiplicity, VariableMultiplicityResolution-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.exceptions import PipeStackOverflowError---class PipeRunParamKey(StrEnum):- DYNAMIC_OUTPUT_CONCEPT = "_dynamic_output_concept"- NB_OUTPUT = "_nb_output"-- @classmethod- def value_list(cls) -> list[str]:- return [member.value for member in cls]-+from pipelex.system.pipe_run_mode import PipeRunMode+from pipelex.system.pipe_run_param_key import PipeRunParamKeyFORCE_DRY_RUN_MODE_ENV_KEY = "PIPELEX_FORCE_DRY_RUN_MODE"diff --git a/pipelex/pipe_run/pipe_run_params_factory.py b/pipelex/pipe_run/pipe_run_params_factory.pyindex 2d160e3bc..cee98a65f 100644--- a/pipelex/pipe_run/pipe_run_params_factory.py+++ b/pipelex/pipe_run/pipe_run_params_factory.py@@ -4,9 +4,9 @@ from pipelex import logfrom pipelex.cogt.content_generation.cogt_run_params import check_mock_usage_requires_dryfrom pipelex.config import get_configfrom pipelex.core.pipes.variable_multiplicity import VariableMultiplicity-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import BatchParams, PipeRunParamsfrom pipelex.runtime_hub import is_dry_run_forced+from pipelex.system.pipe_run_mode import PipeRunModeclass PipeRunParamsFactory:diff --git a/pipelex/pipe_run/tracing_assembly.py b/pipelex/pipe_run/tracing_assembly.pyindex 78da7de26..b4d29adee 100644--- a/pipelex/pipe_run/tracing_assembly.py+++ b/pipelex/pipe_run/tracing_assembly.py@@ -19,10 +19,10 @@ from pipelex.base_exceptions import PipelexConfigErrorfrom pipelex.config import get_configfrom pipelex.core.pipes.pipe_output import PipeOutputfrom pipelex.graph.graphspec import GraphSpec, PipelineRef-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.reporting.reporting_types import AnyTokensUsagefrom pipelex.runtime_hub import get_event_log_overridefrom pipelex.system.exceptions import MissingDependencyError+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.tracing.event_log_factory import make_event_logfrom pipelex.tracing.exceptions import EventLogErrorfrom pipelex.tracing.graphspec_assembler import GraphSpecAssemblerdiff --git a/pipelex/pipeline/bundle_graph_rendering.py b/pipelex/pipeline/bundle_graph_rendering.pynew file mode 100644index 000000000..e0d838bbb--- /dev/null+++ b/pipelex/pipeline/bundle_graph_rendering.py@@ -0,0 +1,188 @@+"""Producing a run graph for a *bundle*, by dry-running it.++Interpreter-layer counterpart of ``pipelex.graph.graph_rendering``: these helpers take a bundle path,+load and dry-run the method to obtain a :class:`GraphSpec`, then hand it to the runtime-layer renderer.+The split is along "do I need a loaded method?", which is the hub layering boundary's own question —+see ``docs/contribute/hub-layering.md``.+"""++from pathlib import Path+from typing import Any++from pipelex.config import get_config+from pipelex.graph.graph_rendering import GraphFormat, render_graph_from_spec+from pipelex.graph.graphspec import GraphSpec+from pipelex.pipeline.dry_run_pipeline import dry_run_pipeline+from pipelex.tools.misc.chart_utils import FlowchartDirection+++def _sanitize_graph_name(graph_name: str) -> str:+ """Sanitize graph_name to prevent path traversal.++ Args:+ graph_name: The requested filename for the graph output.++ Returns:+ A safe filename with no directory components.+ """+ sanitized = Path(graph_name).name+ return sanitized or "graph.html"+++async def _dry_run_bundle(+ bundle_path: Path,+ *,+ library_dirs: list[str] | None = None,+ pipe_code: str | None = None,+) -> tuple[GraphSpec, str]:+ """Dry-run a bundle file to produce a GraphSpec.++ Reads the file, ensures its parent directory is in library_dirs,+ then delegates to ``dry_run_pipeline``.++ Args:+ bundle_path: Path to the .mthds bundle file.+ library_dirs: Optional library directories for pipe resolution.+ pipe_code: Optional explicit pipe target for graph generation.++ Returns:+ Tuple of (GraphSpec, pipe_code).+ """+ mthds_content = bundle_path.read_text(encoding="utf-8")++ # Ensure the bundle's parent directory is included in library_dirs+ # so PipelexMTHDSProtocol can resolve sibling dependencies+ bundle_parent_dir = str(bundle_path.parent.resolve())+ effective_library_dirs: list[str]+ if library_dirs:+ effective_library_dirs = list(library_dirs)+ if bundle_parent_dir not in effective_library_dirs:+ effective_library_dirs.append(bundle_parent_dir)+ else:+ effective_library_dirs = [bundle_parent_dir]++ return await dry_run_pipeline(+ mthds_contents=[mthds_content],+ bundle_uris=[str(bundle_path)],+ library_dirs=effective_library_dirs,+ pipe_code=pipe_code,+ )+++async def generate_graph_for_bundle(+ bundle_path: Path,+ *,+ graph_format: GraphFormat,+ library_dirs: list[str] | None = None,+ pipe_code: str | None = None,+ direction: FlowchartDirection | None = None,+ graph_name: str = "dry_run.html",+) -> dict[str, Any]:+ """Generate graph visualization for a bundle via dry-run pipeline execution.++ Reads the bundle, parses main_pipe, performs a dry-run with graph tracing,+ then renders and saves graph HTML files alongside the bundle.++ Args:+ bundle_path: Path to the .mthds bundle file.+ graph_format: Which graph format(s) to generate.+ library_dirs: Optional library directories for pipe resolution.+ pipe_code: Optional explicit pipe target for graph generation.+ direction: Flowchart layout direction (default: None, uses TB).+ graph_name: Filename for the generated HTML graph (default: "dry_run.html").++ Returns:+ Dictionary with graph_files, graph_output_dir, and direction.++ Raises:+ MthdsParserError: If bundle parsing fails or main_pipe is missing.+ PipelexError: If pipeline execution does not produce a graph spec.+ PipelineExecutionError: If dry-run execution fails.+ """+ graph_spec, resolved_pipe_code = await _dry_run_bundle(bundle_path, library_dirs=library_dirs, pipe_code=pipe_code)++ execution_config = get_config().pipelex.pipeline_execution_config.with_execution_overrides(+ generate_graph=True,+ mock_inputs=True,+ )++ include_mermaidflow: bool+ include_reactflow: bool+ match graph_format:+ case GraphFormat.MERMAIDFLOW:+ include_mermaidflow = True+ include_reactflow = False+ case GraphFormat.REACTFLOW:+ include_mermaidflow = False+ include_reactflow = True+ case GraphFormat.BOTH:+ include_mermaidflow = True+ include_reactflow = True++ output_dir = bundle_path.parent+ saved_files = await render_graph_from_spec(+ graph_spec=graph_spec,+ graph_config=execution_config.graph_config,+ include_mermaidflow=include_mermaidflow,+ include_reactflow=include_reactflow,+ output_dir=output_dir,+ pipe_code=resolved_pipe_code,+ direction=direction,+ )++ # Rename reactflow.html to the requested filename+ reactflow_path = saved_files.get("reactflow_html")+ safe_name = _sanitize_graph_name(graph_name)+ if reactflow_path and safe_name:+ final_path = reactflow_path.parent / safe_name+ reactflow_path.rename(final_path)+ saved_files["reactflow_html"] = final_path++ return {+ "graph_files": {key: str(path) for key, path in saved_files.items()},+ "graph_output_dir": str(output_dir),+ "pipe_code": resolved_pipe_code,+ "direction": str(direction) if direction else None,+ }+++async def generate_view_for_bundle(+ bundle_path: Path,+ *,+ library_dirs: list[str] | None = None,+ pipe_code: str | None = None,+ direction: FlowchartDirection | None = None,+) -> dict[str, Any]:+ """Generate a GraphSpec for a bundle via dry-run pipeline execution.++ Returns structured JSON data (GraphSpec) suitable for client-side rendering,+ without writing any files to disk.++ Args:+ bundle_path: Path to the .mthds bundle file.+ library_dirs: Optional library directories for pipe resolution.+ pipe_code: Optional explicit pipe target for graph generation.+ direction: Flowchart layout direction (default: None, uses config default).++ Returns:+ Dictionary with graphspec (JSON-serializable dict), pipe_code, and direction.++ Raises:+ MthdsParserError: If bundle parsing fails or main_pipe is missing.+ PipelexError: If pipeline execution does not produce a graph spec.+ PipelineExecutionError: If dry-run execution fails.+ """+ graph_spec, resolved_pipe_code = await _dry_run_bundle(bundle_path, library_dirs=library_dirs, pipe_code=pipe_code)++ execution_config = get_config().pipelex.pipeline_execution_config.with_execution_overrides(+ generate_graph=True,+ mock_inputs=True,+ )+ rf_config = execution_config.graph_config.reactflow_config+ effective_direction = direction or rf_config.layout_direction++ return {+ "graphspec": graph_spec.model_dump(mode="json", by_alias=True),+ "pipe_code": resolved_pipe_code,+ "direction": str(effective_direction) if effective_direction else None,+ }diff --git a/pipelex/pipeline/bundle_validator.py b/pipelex/pipeline/bundle_validator.pyindex 5f60ff0be..1becd5c7b 100644--- a/pipelex/pipeline/bundle_validator.py+++ b/pipelex/pipeline/bundle_validator.py@@ -52,11 +52,11 @@ from pipelex.pipe_machinery.pipe_abstract import PipeAbstractfrom pipelex.pipe_run.exceptions import DryRunErrorfrom pipelex.pipe_run.pipe_router import PipeRouterfrom pipelex.pipe_run.pipe_run import PipeRun-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.execution_seams import acquire_library, prepare_pipe_jobfrom pipelex.pipeline.pipeline_factory import PipelineFactoryfrom pipelex.runtime_hub import get_telemetry_manager, scoped_content_generatorfrom pipelex.system.configuration.configs import PipelineExecutionConfig+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.telemetry.events import EventName, EventPropertyfrom pipelex.system.telemetry.otel_constants import OTelConstantsfrom pipelex.tools.typing.pydantic_utils import format_pydantic_validation_errordiff --git a/pipelex/pipeline/dry_run_pipeline.py b/pipelex/pipeline/dry_run_pipeline.pyindex e4af05029..6808a56c9 100644--- a/pipelex/pipeline/dry_run_pipeline.py+++ b/pipelex/pipeline/dry_run_pipeline.py@@ -16,10 +16,10 @@ from pipelex.graph.graphspec import GraphSpecfrom pipelex.mthds_parsing.exceptions import MthdsParserErrorfrom pipelex.mthds_parsing.parser import MthdsParserfrom pipelex.pipe_run.exceptions import DryRunGraphNotProducedError-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.blueprint_selection import select_primary_blueprintfrom pipelex.pipeline.runner import PipelexMTHDSProtocolfrom pipelex.runtime_hub import scoped_event_log+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.tracing.in_memory_event_log import InMemoryEventLogdiff --git a/pipelex/pipeline/exceptions.py b/pipelex/pipeline/exceptions.pyindex 0f6315a08..4f9a6535f 100644--- a/pipelex/pipeline/exceptions.py+++ b/pipelex/pipeline/exceptions.py@@ -3,8 +3,8 @@ from typing_extensions import overridefrom pipelex.base_exceptions import ErrorDomain, ErrorReport, PipelexError, PipelexUnexpectedErrorfrom pipelex.cogt.inference.error_classification import UserAction, UserActionKindfrom pipelex.core.exceptions import PipeFactoryErrorData, PipelexBundleBlueprintValidationErrorData, PipesAndConceptValidationErrorData-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.validation_errors import build_validation_error_items+from pipelex.system.pipe_run_mode import PipeRunModeclass PipeExecutionError(PipelexError):diff --git a/pipelex/pipeline/execution_seams.py b/pipelex/pipeline/execution_seams.pyindex b9062023b..54728b180 100644--- a/pipelex/pipeline/execution_seams.py+++ b/pipelex/pipeline/execution_seams.py@@ -40,13 +40,13 @@ from pipelex.mthds_parsing.parser import MthdsParserfrom pipelex.pipe_machinery.pipe_abstract import PipeAbstractfrom pipelex.pipe_run.pipe_job import PipeJobfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import VariableMultiplicityfrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.pipeline.blueprint_selection import select_primary_blueprintfrom pipelex.pipeline.input_normalizer import normalize_data_urls_to_storagefrom pipelex.system.configuration.configs import PipelineExecutionConfigfrom pipelex.system.job_metadata import JobMetadata, OtelContext+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.tools.misc.file_utils import reject_bare_str_or_pathif TYPE_CHECKING:diff --git a/pipelex/pipeline/pipeline_models.py b/pipelex/pipeline/pipeline_models.pydeleted file mode 100644index 402e29aa5..000000000--- a/pipelex/pipeline/pipeline_models.py+++ /dev/null@@ -1,6 +0,0 @@-from enum import StrEnum---class SpecialPipelineId(StrEnum):- UNTITLED = "untitled"- DRY_RUN_UNTITLED = "dry_run_untitled"diff --git a/pipelex/pipeline/pipeline_run_setup.py b/pipelex/pipeline/pipeline_run_setup.pyindex c11d2c524..0ae55b939 100644--- a/pipelex/pipeline/pipeline_run_setup.py+++ b/pipelex/pipeline/pipeline_run_setup.py@@ -16,7 +16,6 @@ from pipelex.interpreter_hub import (set_current_library,)from pipelex.pipe_run.pipe_job import PipeJob-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import (FORCE_DRY_RUN_MODE_ENV_KEY,VariableMultiplicity,@@ -27,6 +26,7 @@ from pipelex.runtime_hub import get_event_log_override, get_otel_tracer, get_repfrom pipelex.system.configuration.configs import PipelineExecutionConfigfrom pipelex.system.environment import get_optional_envfrom pipelex.system.job_metadata import OtelContext+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.telemetry.events import EventName, EventPropertyfrom pipelex.system.telemetry.otel_constants import OTelConstantsfrom pipelex.system.telemetry.otel_factory import OtelFactorydiff --git a/pipelex/pipeline/runner.py b/pipelex/pipeline/runner.pyindex 4da3cc5ed..1550bdda1 100644--- a/pipelex/pipeline/runner.py+++ b/pipelex/pipeline/runner.py@@ -46,10 +46,10 @@ if TYPE_CHECKING:from pipelex.core.pipes.pipe_output import PipeOutputfrom pipelex.pipe_run.delivery_assignment import DeliveryAssignmentfrom pipelex.pipe_run.pipe_job import PipeJob- from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_protocol import PipeRunProtocolfrom pipelex.pipeline.validation_report import PipelexValidationReportfrom pipelex.system.configuration.configs import PipelineExecutionConfig+ from pipelex.system.pipe_run_mode import PipeRunModeclass PipelexModelDeck(MthdsModelDeck):diff --git a/pipelex/pipeline/validate_bundle.py b/pipelex/pipeline/validate_bundle.pyindex 811928ddf..2b106dfc2 100644--- a/pipelex/pipeline/validate_bundle.py+++ b/pipelex/pipeline/validate_bundle.py@@ -12,7 +12,7 @@ from typing_extensions import TypedDictfrom pipelex import logfrom pipelex.base_exceptions import PipelexUnexpectedError-from pipelex.core.pipes.exceptions import PipeFactoryError, PipeValidationError+from pipelex.core.pipes.exceptions import PipeFactoryError, PipeRunError, PipeValidationErrorfrom pipelex.core.qualified_ref import QualifiedReffrom pipelex.core.validation import report_validation_errorfrom pipelex.interpreter_hub import (@@ -34,7 +34,7 @@ from pipelex.mthds_parsing.handle_pipe_errors import (from pipelex.mthds_parsing.parser import MthdsParserfrom pipelex.mthds_parsing.pipelex_bundle_blueprint import PipelexBundleBlueprintfrom pipelex.pipe_machinery.pipe_abstract import PipeAbstract-from pipelex.pipe_run.exceptions import DryRunError, PipeRunError+from pipelex.pipe_run.exceptions import DryRunErrorfrom pipelex.pipeline.bundle_validator import BundleValidator, DryRunOutput, DryRunStatusfrom pipelex.pipeline.exceptions import ValidateBundleErrordiff --git a/pipelex/providers/anthropic/anthropic_list.py b/pipelex/providers/anthropic/anthropic_list.pyindex ee7f95be0..4c2c91a45 100644--- a/pipelex/providers/anthropic/anthropic_list.py+++ b/pipelex/providers/anthropic/anthropic_list.py@@ -7,9 +7,9 @@ from rich import boxfrom rich.table import Tablefrom pipelex.cli.exceptions import PipelexCLIError-from pipelex.exceptions import MissingDependencyErrorfrom pipelex.plugins.model_handle import ModelHandlefrom pipelex.runtime_hub import get_console+from pipelex.system.exceptions import MissingDependencyErrorif TYPE_CHECKING:from anthropic.types import ModelInfodiff --git a/pipelex/providers/bedrock/bedrock_list.py b/pipelex/providers/bedrock/bedrock_list.pyindex 5c66da028..0805dc3aa 100644--- a/pipelex/providers/bedrock/bedrock_list.py+++ b/pipelex/providers/bedrock/bedrock_list.py@@ -8,9 +8,9 @@ from rich.table import Tablefrom pipelex.cli.exceptions import PipelexCLIErrorfrom pipelex.config import get_config-from pipelex.exceptions import MissingDependencyErrorfrom pipelex.plugins.model_handle import ModelHandlefrom pipelex.runtime_hub import get_console+from pipelex.system.exceptions import MissingDependencyErrorfrom pipelex.tools.aws.exceptions import AwsCredentialsErrorif TYPE_CHECKING:diff --git a/pipelex/providers/bedrock/bedrock_llms.py b/pipelex/providers/bedrock/bedrock_llms.pyindex 0b3d36b7e..0d0c9278c 100644--- a/pipelex/providers/bedrock/bedrock_llms.py+++ b/pipelex/providers/bedrock/bedrock_llms.py@@ -2,8 +2,8 @@ from typing import Any, castfrom pipelex.cogt.model_backends.backend import InferenceBackendfrom pipelex.config import get_config-from pipelex.exceptions import MissingDependencyErrorfrom pipelex.plugins.model_handle import ModelHandle+from pipelex.system.exceptions import MissingDependencyErrorfrom pipelex.tools.aws.exceptions import AwsCredentialsErrordiff --git a/pipelex/providers/google/google_list.py b/pipelex/providers/google/google_list.pyindex d11e8f24f..425c81623 100644--- a/pipelex/providers/google/google_list.py+++ b/pipelex/providers/google/google_list.py@@ -6,8 +6,8 @@ from typing import TYPE_CHECKING, Anyfrom rich import boxfrom rich.table import Table-from pipelex.exceptions import MissingDependencyErrorfrom pipelex.runtime_hub import get_console+from pipelex.system.exceptions import MissingDependencyErrorif TYPE_CHECKING:from pipelex.cogt.model_backends.backend import InferenceBackenddiff --git a/pipelex/providers/mistral/mistral_list.py b/pipelex/providers/mistral/mistral_list.pyindex 3b1014605..f66354076 100644--- a/pipelex/providers/mistral/mistral_list.py+++ b/pipelex/providers/mistral/mistral_list.py@@ -6,8 +6,8 @@ from typing import Anyfrom rich import boxfrom rich.table import Table-from pipelex.exceptions import MissingDependencyErrorfrom pipelex.runtime_hub import get_console+from pipelex.system.exceptions import MissingDependencyErrordef list_mistral_models(diff --git a/pipelex/runtime_bridge/serialization.py b/pipelex/runtime_bridge/serialization.pyindex cf92d750f..fa0952044 100644--- a/pipelex/runtime_bridge/serialization.py+++ b/pipelex/runtime_bridge/serialization.py@@ -14,7 +14,8 @@ from __future__ import annotationsfrom typing import TYPE_CHECKING, Anyfrom pipelex.core.memory.working_memory import MAIN_STUFF_NAME-from pipelex.pipe_run.exceptions import PipeJobError, PipeRouterError, PipeRunError+from pipelex.core.pipes.exceptions import PipeRunError+from pipelex.pipe_run.exceptions import PipeJobError, PipeRouterErrorfrom pipelex.pipeline.exceptions import PipeExecutionError, PipelineExecutionErrorfrom pipelex.runtime_bridge.payloads import PipelexPipeRunOutputdiff --git a/pipelex/runtime_hub.py b/pipelex/runtime_hub.pyindex 33fc3099c..8fffa04a5 100644--- a/pipelex/runtime_hub.py+++ b/pipelex/runtime_hub.py@@ -7,18 +7,16 @@ execution time whatever is loaded — hence *runtime*, in the language-implement**The one rule:** ``interpreter_hub`` imports ``runtime_hub``; ``runtime_hub`` must never import``interpreter_hub``. Nothing here may name ``libraries``, ``pipe_operators``, ``pipe_controllers``,-``codegen``, ``builder``, ``interpreter_plugins``, ``pipe_machinery``, ``pipe_signature`` or-``mthds_parsing`` at module level — that is what makes importing the Pipelex runtime load zero-modules from any of them. That list is the interpreter's top-level packages; it used to have to-trail "…or the Pipe-touching modules of ``core.pipes``", because some of what it forbids lived under-a runtime-named package. ``pipelex.core`` is *not* on it at all any more — the whole package is-declared runtime-layer, and this module's own closure runs straight through it.--Two interpreter-named packages are deliberately absent, and their absence is a known wart: leaf-models from ``pipeline`` and ``pipe_run`` (``SpecialPipelineId``, ``PipeRunMode``) already land in-this module's closure. So the property is "zero modules from the packages named above", not "zero-interpreter modules" outright — the remedy is to move those leaves to a runtime-layer home, then-widen the list. See ``docs/contribute/hub-layering.md``.+``codegen``, ``builder``, ``interpreter_plugins``, ``pipe_machinery``, ``pipe_signature``,+``mthds_parsing``, ``pipeline`` or ``pipe_run`` at module level. That list is the interpreter's+top-level packages — all of them, with no qualification — so the property it buys is stated+outright: **importing the Pipelex runtime loads zero interpreter modules.** It used to have to trail+"…or the Pipe-touching modules of ``core.pipes``", because some of what it forbids lived under a+runtime-named package, and it had to leave out ``pipeline`` and ``pipe_run``, because four leaf+models of theirs landed in this module's closure. Both qualifications are gone the same way — the+misfiled code moved. ``pipelex.core`` is *not* on the list at all: the whole package is declared+runtime-layer, and this module's own closure runs straight through it. See+``docs/contribute/hub-layering.md``."""import sysdiff --git a/pipelex/system/job_metadata.py b/pipelex/system/job_metadata.pyindex 2aa10f92f..4a444302c 100644--- a/pipelex/system/job_metadata.py+++ b/pipelex/system/job_metadata.py@@ -8,6 +8,17 @@ from pipelex.system.telemetry.otel_context import OtelContextfrom pipelex.system.trace_context import TraceContext+class SpecialPipelineId(StrEnum):+ """The reserved `pipeline_run_id` values, for runs that have no id of their own.++ Lives beside `JobMetadata` because `pipeline_run_id` is its field: this enum is that field's+ vocabulary, and `PipeOutput.pipeline_run_id` defaults to `UNTITLED` from here.+ """++ UNTITLED = "untitled"+ DRY_RUN_UNTITLED = "dry_run_untitled"++class JobCategory(StrEnum):MOCK_JOB = "mock_job"LLM_JOB = "llm_job"diff --git a/pipelex/pipe_run/pipe_run_mode.py b/pipelex/system/pipe_run_mode.pysimilarity index 100%rename from pipelex/pipe_run/pipe_run_mode.pyrename to pipelex/system/pipe_run_mode.pydiff --git a/pipelex/system/pipe_run_param_key.py b/pipelex/system/pipe_run_param_key.pynew file mode 100644index 000000000..f5db45b0c--- /dev/null+++ b/pipelex/system/pipe_run_param_key.py@@ -0,0 +1,17 @@+from enum import StrEnum+++class PipeRunParamKey(StrEnum):+ """The reserved keys of a pipe run's free-form `params` mapping.++ Every member starts with an underscore, which is what `PipeRunParams` validates on and what makes+ the set safely enumerable as reserved names: `ConceptStructureBlueprint` excludes them from the+ field names a method may declare.+ """++ DYNAMIC_OUTPUT_CONCEPT = "_dynamic_output_concept"+ NB_OUTPUT = "_nb_output"++ @classmethod+ def value_list(cls) -> list[str]:+ return [member.value for member in cls]diff --git a/pipelex/test_extras/shared_pytest_plugins.py b/pipelex/test_extras/shared_pytest_plugins.pyindex a0727c241..dfbee621f 100644--- a/pipelex/test_extras/shared_pytest_plugins.py+++ b/pipelex/test_extras/shared_pytest_plugins.py@@ -6,9 +6,9 @@ from pytest import Config, FixtureRequest, Parserfrom rich.console import Consolefrom rich.panel import Panel-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.runtime_hub import get_consolefrom pipelex.system.environment import is_env_var_set, is_env_var_truthy, set_env+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.runtime import CODEX_CLOUD_ENV_VAR_KEY, RunMode, runtime_managerfrom pipelex.tools.misc.placeholder import make_placeholder_value, value_is_placeholderdiff --git a/subject_grants.toml b/subject_grants.tomlindex 6ad9c908f..ecab41556 100644--- a/subject_grants.toml+++ b/subject_grants.toml@@ -3172,22 +3172,6 @@ rationale = "Verb-object: generates outputs from the graph spec; rendering optioparam = "graph_outputs"rationale = "Verb-object: saves the graph outputs; destination stays keyword."-["pipelex/graph/graph_rendering.py::_dry_run_bundle"]-param = "bundle_path"-rationale = "Verb-object: dry-runs the bundle at the path; options stay keyword."--["pipelex/graph/graph_rendering.py::_sanitize_graph_name"]-param = "graph_name"-rationale = "Transforms the graph name; single operand."--["pipelex/graph/graph_rendering.py::generate_graph_for_bundle"]-param = "bundle_path"-rationale = "Verb-object: generates the graph for the bundle at the path; options stay keyword."--["pipelex/graph/graph_rendering.py::generate_view_for_bundle"]-param = "bundle_path"-rationale = "Verb-object: generates the view for the bundle at the path; options stay keyword."-["pipelex/graph/graph_rendering.py::render_graph_from_spec"]param = "graph_spec"rationale = "Verb-object: renders from the graph spec; options stay keyword."@@ -4380,6 +4364,22 @@ rationale = "Verb-object: walks from the root pipe; visited set stays keyword."param = "blueprints"rationale = "Verb-object: selects among the blueprints; single operand."+["pipelex/pipeline/bundle_graph_rendering.py::_dry_run_bundle"]+param = "bundle_path"+rationale = "Verb-object: dry-runs the bundle at the path; options stay keyword."++["pipelex/pipeline/bundle_graph_rendering.py::_sanitize_graph_name"]+param = "graph_name"+rationale = "Transforms the graph name; single operand."++["pipelex/pipeline/bundle_graph_rendering.py::generate_graph_for_bundle"]+param = "bundle_path"+rationale = "Verb-object: generates the graph for the bundle at the path; options stay keyword."++["pipelex/pipeline/bundle_graph_rendering.py::generate_view_for_bundle"]+param = "bundle_path"+rationale = "Verb-object: generates the view for the bundle at the path; options stay keyword."+["pipelex/pipeline/bundle_validator.py::BundleValidator.validate_pipes"]param = "pipes"rationale = "Verb-object: validates the pipes; single operand."diff --git a/tests/CLAUDE.md b/tests/CLAUDE.mdindex dbe469fa5..0047c10fe 100644--- a/tests/CLAUDE.md+++ b/tests/CLAUDE.md@@ -32,7 +32,7 @@ Replace `<paths>` with the test directories from the mapping below. Concatenate| `pipelex/pipe_operators/` | `tests/unit/pipelex/pipe_operators/ tests/integration/pipelex/pipes/` || `pipelex/pipe_run/` | `tests/unit/pipelex/pipe_run/ tests/integration/pipelex/pipes/` || `pipelex/pipe_signature/` | `tests/unit/pipelex/pipe_signature/ tests/integration/pipelex/pipe_signature/` |-| `pipelex/pipeline/` | `tests/integration/pipelex/pipeline/` |+| `pipelex/pipeline/` | `tests/unit/pipelex/pipeline/ tests/integration/pipelex/pipeline/` || `pipelex/plugins/` | `tests/unit/pipelex/plugins/ tests/integration/pipelex/plugins/` || `pipelex/providers/` | `tests/unit/pipelex/providers/ tests/integration/pipelex/providers/` || `pipelex/system/` | `tests/unit/pipelex/system/ tests/integration/pipelex/system/` |diff --git a/tests/e2e/pipelex/concepts/nested_concepts/test_nested_concepts_pipe.py b/tests/e2e/pipelex/concepts/nested_concepts/test_nested_concepts_pipe.pyindex f7f1b0b8a..f9390d088 100644--- a/tests/e2e/pipelex/concepts/nested_concepts/test_nested_concepts_pipe.py+++ b/tests/e2e/pipelex/concepts/nested_concepts/test_nested_concepts_pipe.py@@ -13,8 +13,8 @@ import pytestfrom pipelex import pretty_printfrom pipelex.core.stuffs.text_content import TextContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.e2e.pipelex.concepts.nested_concepts.generated_models.nested_concepts_test__customer import Customerfrom tests.e2e.pipelex.concepts.nested_concepts.generated_models.nested_concepts_test__invoice import Invoicefrom tests.e2e.pipelex.concepts.nested_concepts.generated_models.nested_concepts_test__line_item import LineItemdiff --git a/tests/e2e/pipelex/cv_batch_screening/test_cv_batch_screening.py b/tests/e2e/pipelex/cv_batch_screening/test_cv_batch_screening.pyindex bb9d9c889..300f58028 100644--- a/tests/e2e/pipelex/cv_batch_screening/test_cv_batch_screening.py+++ b/tests/e2e/pipelex/cv_batch_screening/test_cv_batch_screening.py@@ -14,8 +14,8 @@ import pytestfrom pipelex import logfrom pipelex.core.stuffs.document_content import DocumentContentfrom pipelex.core.stuffs.list_content import ListContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.cases.documents import DocumentTestCasesfrom tests.e2e.pipelex.cv_batch_screening.test_data import CvBatchScreeningTemporalTestDatadiff --git a/tests/e2e/pipelex/graph/test_graph_with_full_data.py b/tests/e2e/pipelex/graph/test_graph_with_full_data.pyindex a60f50c40..bded7d1f1 100644--- a/tests/e2e/pipelex/graph/test_graph_with_full_data.py+++ b/tests/e2e/pipelex/graph/test_graph_with_full_data.py@@ -19,8 +19,8 @@ from pipelex.graph.mermaidflow.mermaid_html import ()from pipelex.graph.mermaidflow.mermaidflow_factory import MermaidflowFactoryfrom pipelex.graph.reactflow.reactflow_html import generate_reactflow_html_async-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.tools.misc.chart_utils import FlowchartDirectionfrom pipelex.tools.misc.file_utils import get_incremental_directory_path, save_text_to_pathfrom tests.cases import DocumentTestCasesdiff --git a/tests/e2e/pipelex/pipes/date/test_date_dry_run.py b/tests/e2e/pipelex/pipes/date/test_date_dry_run.pyindex c54e21430..773fd074d 100644--- a/tests/e2e/pipelex/pipes/date/test_date_dry_run.py+++ b/tests/e2e/pipelex/pipes/date/test_date_dry_run.py@@ -12,9 +12,9 @@ from pathlib import Pathimport pytestfrom pipelex.core.stuffs.date_content import DateContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.pipeline_response import RunStatefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunMode_FIXTURE_DIR = Path(__file__).parent / "date_departure"diff --git a/tests/e2e/pipelex/pipes/optionals/test_lift_parity_dry_live.py b/tests/e2e/pipelex/pipes/optionals/test_lift_parity_dry_live.pyindex 55a94f828..8725ed7ed 100644--- a/tests/e2e/pipelex/pipes/optionals/test_lift_parity_dry_live.py+++ b/tests/e2e/pipelex/pipes/optionals/test_lift_parity_dry_live.py@@ -11,9 +11,9 @@ from pipelex.config import get_configfrom pipelex.core.memory.absence import AbsenceRecordfrom pipelex.core.memory.working_memory import MAIN_STUFF_NAMEfrom pipelex.graph.graphspec import GraphSpec, GraphSpecMode, NodeStatus-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.pipeline_response import RunStatefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunMode_FIXTURE_DIR = Path(__file__).parent / "lift_parity"diff --git a/tests/e2e/pipelex/pipes/optionals/test_prompt_guard_dry_run.py b/tests/e2e/pipelex/pipes/optionals/test_prompt_guard_dry_run.pyindex 30c9d2497..74557cc57 100644--- a/tests/e2e/pipelex/pipes/optionals/test_prompt_guard_dry_run.py+++ b/tests/e2e/pipelex/pipes/optionals/test_prompt_guard_dry_run.py@@ -8,9 +8,9 @@ from pathlib import Pathimport pytestfrom pipelex.core.memory.absence import AbsenceKind-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.pipeline_response import RunStatefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunMode_FIXTURE_DIR = Path(__file__).parent / "prompt_guard"diff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_batch/test_pipe_batch_graph.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_batch/test_pipe_batch_graph.pyindex 0b3f7391c..91cda50c8 100644--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_batch/test_pipe_batch_graph.py+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_batch/test_pipe_batch_graph.py@@ -10,8 +10,8 @@ from pipelex.config import get_configfrom pipelex.core.stuffs.document_content import DocumentContentfrom pipelex.graph.graph_factory import generate_graph_outputsfrom pipelex.graph.graphspec import EdgeKind, GraphSpec, NodeSpec-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.tools.misc.file_utils import get_incremental_directory_path, save_text_to_pathfrom tests.cases import DocumentTestCasesfrom tests.conftest import TEST_OUTPUTS_DIRdiff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_1.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_1.pyindex f04cd9cd6..4e6ec4513 100644--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_1.py+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_1.py@@ -9,9 +9,9 @@ from pipelex.core.memory.working_memory_factory import WorkingMemoryFactoryfrom pipelex.core.stuffs.stuff_factory import StuffFactoryfrom pipelex.interpreter_hub import get_pipe_router, get_required_pipefrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.controller.pipe_condition.pipe_condition import CategoryInputdiff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_2.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_2.pyindex 684df3e22..997984929 100644--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_2.py+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_2.py@@ -9,9 +9,9 @@ from pipelex.core.memory.working_memory_factory import WorkingMemoryFactoryfrom pipelex.core.stuffs.stuff_factory import StuffFactoryfrom pipelex.interpreter_hub import get_pipe_router, get_required_pipefrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.controller.pipe_condition.pipe_condition import CategoryInputdiff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_simple.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_simple.pyindex 3b2c8c0ba..19d480dda 100644--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_simple.py+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_simple.py@@ -8,15 +8,15 @@ from pipelex.core.concepts.concept_factory import ConceptFactoryfrom pipelex.core.concepts.native.concept_native import NativeConceptCodefrom pipelex.core.domains.domain import SpecialDomainfrom pipelex.core.memory.working_memory_factory import WorkingMemoryFactory+from pipelex.core.pipes.exceptions import PipeRunErrorfrom pipelex.core.pipes.inputs.exceptions import PipeRunInputsErrorfrom pipelex.core.pipes.inputs.input_stuff_specs import TypedNamedStuffSpecfrom pipelex.pipe_controllers.condition.pipe_condition import PipeConditionfrom pipelex.pipe_controllers.condition.pipe_condition_blueprint import PipeConditionBlueprintfrom pipelex.pipe_machinery.pipe_factory import PipeFactory-from pipelex.pipe_run.exceptions import PipeRunError-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.controller.pipe_condition.pipe_condition import CategoryInputdiff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_parallel/test_pipe_parallel_1.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_parallel/test_pipe_parallel_1.pyindex 28073008c..ea72f539b 100644--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_parallel/test_pipe_parallel_1.py+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_parallel/test_pipe_parallel_1.py@@ -9,9 +9,9 @@ from pipelex.core.memory.working_memory_factory import WorkingMemoryFactoryfrom pipelex.core.stuffs.stuff_factory import StuffFactoryfrom pipelex.interpreter_hub import get_pipe_router, get_required_pipefrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.controller.pipe_parallel.pipe_parallel import ContentAnalysis, DocumentInput, LengthAnalysisdiff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_parallel/test_pipe_parallel_graph.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_parallel/test_pipe_parallel_graph.pyindex 1c0ca19eb..da5a7c728 100644--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_parallel/test_pipe_parallel_graph.py+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_parallel/test_pipe_parallel_graph.py@@ -10,8 +10,8 @@ from pipelex.config import get_configfrom pipelex.core.stuffs.text_content import TextContentfrom pipelex.graph.graph_factory import generate_graph_outputsfrom pipelex.graph.graphspec import GraphSpec, NodeSpec-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.tools.misc.file_utils import get_incremental_directory_path, save_text_to_pathfrom tests.conftest import TEST_OUTPUTS_DIRfrom tests.e2e.pipelex.pipes.pipe_controller.pipe_parallel.test_data import (diff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_batching.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_batching.pyindex 6a6019241..005f54846 100644--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_batching.py+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_batching.py@@ -11,10 +11,10 @@ from pipelex.core.memory.working_memory_factory import WorkingMemoryFactoryfrom pipelex.core.pipes.inputs.input_stuff_specs import TypedNamedStuffSpecfrom pipelex.core.stuffs.stuff_factory import StuffFactoryfrom pipelex.interpreter_hub import get_required_pipe-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.pipeline.runner import PipelexMTHDSProtocolfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.controller.pipe_sequence.pipe_sequence import Document, ProductRatingdiff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_multiplicity.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_multiplicity.pyindex b4a18f2bf..b2ae7f847 100644--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_multiplicity.py+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_multiplicity.py@@ -6,8 +6,8 @@ from pipelex.core.concepts.concept_factory import ConceptFactoryfrom pipelex.core.memory.working_memory_factory import WorkingMemoryFactoryfrom pipelex.core.stuffs.stuff_factory import StuffFactoryfrom pipelex.core.stuffs.text_content import TextContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.dry_runnablediff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_simple.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_simple.pyindex bc2149408..69e937a6b 100644--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_simple.py+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_simple.py@@ -11,9 +11,9 @@ from pipelex.core.memory.working_memory_factory import WorkingMemoryFactoryfrom pipelex.core.stuffs.stuff_factory import StuffFactoryfrom pipelex.core.stuffs.text_content import TextContentfrom pipelex.interpreter_hub import get_required_pipe-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.dry_runnablediff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_with_input_memory.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_with_input_memory.pyindex 9314fe4f9..b33de1c83 100644--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_with_input_memory.py+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_with_input_memory.py@@ -3,8 +3,8 @@import pytestfrom pipelex import pretty_print-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.e2e.pipelex.pipes.pipe_controller.pipe_sequence.test_tweet import OptimizedTweetSAMPLE_DRAFT_TWEET = """diff --git a/tests/e2e/pipelex/pipes/pipe_operators/pipe_compose/test_pipe_compose_after_inference.py b/tests/e2e/pipelex/pipes/pipe_operators/pipe_compose/test_pipe_compose_after_inference.pyindex 99df9692d..92c75adc0 100644--- a/tests/e2e/pipelex/pipes/pipe_operators/pipe_compose/test_pipe_compose_after_inference.py+++ b/tests/e2e/pipelex/pipes/pipe_operators/pipe_compose/test_pipe_compose_after_inference.py@@ -4,8 +4,8 @@ import pytestfrom pipelex import pretty_printfrom pipelex.core.stuffs.document_content import DocumentContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.cases import DocumentTestCasesfrom tests.e2e.pipelex.pipes.pipe_operators.pipe_compose.cv_job_matching_itvw_sheet import InterviewSheetdiff --git a/tests/e2e/pipelex/pipes/pipe_operators/pipe_extract/test_pipe_extract.py b/tests/e2e/pipelex/pipes/pipe_operators/pipe_extract/test_pipe_extract.pyindex c71b98a0c..fd14393b2 100644--- a/tests/e2e/pipelex/pipes/pipe_operators/pipe_extract/test_pipe_extract.py+++ b/tests/e2e/pipelex/pipes/pipe_operators/pipe_extract/test_pipe_extract.py@@ -5,8 +5,8 @@ import pytestfrom pipelex import pretty_printfrom pipelex.core.stuffs.document_content import DocumentContentfrom pipelex.core.stuffs.page_content import PageContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.e2e.pipelex.pipes.pipe_operators.pipe_extract.test_data import PipeExtractTestCasesLIBRARY_DIRS = ["tests/e2e/pipelex/pipes/pipe_operators/pipe_extract"]diff --git a/tests/e2e/pipelex/pipes/pipe_operators/pipe_img_gen/test_pipe_img_gen.py b/tests/e2e/pipelex/pipes/pipe_operators/pipe_img_gen/test_pipe_img_gen.pyindex 02886a97f..672d3fbad 100644--- a/tests/e2e/pipelex/pipes/pipe_operators/pipe_img_gen/test_pipe_img_gen.py+++ b/tests/e2e/pipelex/pipes/pipe_operators/pipe_img_gen/test_pipe_img_gen.py@@ -10,8 +10,8 @@ from PIL import Imagefrom pipelex import pretty_printfrom pipelex.core.stuffs.image_content import ImageContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.tools.misc.file_fetch_utils import fetch_file_from_url_httpxfrom tests.cases import ImageTestCasesdiff --git a/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_document_inputs.py b/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_document_inputs.pyindex fa48b1dcb..cb76dbe68 100644--- a/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_document_inputs.py+++ b/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_document_inputs.py@@ -6,8 +6,8 @@ from pipelex import pretty_printfrom pipelex.core.stuffs.document_content import DocumentContentfrom pipelex.core.stuffs.image_content import ImageContentfrom pipelex.core.stuffs.list_content import ListContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.cases.documents import DocumentTestCasesfrom tests.e2e.pipelex.pipes.pipe_operators.pipe_llm.pipe_llm_document_inputs import (DocumentListAnalysisE2E,diff --git a/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_filename_html.py b/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_filename_html.pyindex 514d389c2..5efda538f 100644--- a/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_filename_html.py+++ b/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_filename_html.py@@ -4,8 +4,8 @@ import pytestfrom pipelex.core.stuffs.document_content import DocumentContentfrom pipelex.core.stuffs.image_content import ImageContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.urls import URLsfrom tests.cases.documents import DocumentTestCasesfrom tests.cases.images import ImageTestCasesdiff --git a/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_image_inputs.py b/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_image_inputs.pyindex a17d1c30d..ed039e2c9 100644--- a/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_image_inputs.py+++ b/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_image_inputs.py@@ -8,8 +8,8 @@ from pipelex.core.stuffs.list_content import ListContentfrom pipelex.core.stuffs.page_content import PageContentfrom pipelex.core.stuffs.text_and_images_content import TextAndImagesContentfrom pipelex.core.stuffs.text_content import TextContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.cases import ImageTestCasesfrom tests.e2e.pipelex.pipes.pipe_operators.pipe_llm.pipe_llm_image_inputs import (ImageDescriptionE2E,diff --git a/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_json_concept.py b/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_json_concept.pyindex 69f5322be..b3f00ec3c 100644--- a/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_json_concept.py+++ b/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_json_concept.py@@ -13,8 +13,8 @@ import pytestfrom pipelex import pretty_printfrom pipelex.core.stuffs.json_content import JSONContentfrom pipelex.core.stuffs.text_content import TextContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.llmdiff --git a/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_object_list.py b/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_object_list.pyindex a12c28db5..e126ba666 100644--- a/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_object_list.py+++ b/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_object_list.py@@ -4,8 +4,8 @@ import pytestfrom pipelex import pretty_printfrom pipelex.core.stuffs.text_content import TextContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.llmdiff --git a/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_text_simple.py b/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_text_simple.pyindex 4af14f23d..db1365604 100644--- a/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_text_simple.py+++ b/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_text_simple.py@@ -4,8 +4,8 @@ import pytestfrom pipelex import pretty_printfrom pipelex.core.stuffs.text_content import TextContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.llmdiff --git a/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_vision.py b/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_vision.pyindex 3fe3178e7..9d85bf0e9 100644--- a/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_vision.py+++ b/tests/e2e/pipelex/pipes/pipe_operators/pipe_llm/test_pipe_llm_vision.py@@ -4,8 +4,8 @@ import pytestfrom pipelex import pretty_print, pretty_print_mdfrom pipelex.core.stuffs.image_content import ImageContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.e2e.pipelex.pipes.pipe_operators.pipe_llm.pipe_llm_vision import VisionAnalysisE2Efrom tests.integration.pipelex.cogt.test_data import LLMVisionTestCasesfrom tests.integration.pipelex.test_data import PipeTestCasesdiff --git a/tests/e2e/pipelex/pipes/pipe_operators/pipe_search/test_pipe_search.py b/tests/e2e/pipelex/pipes/pipe_operators/pipe_search/test_pipe_search.pyindex 52c9da044..b45724f44 100644--- a/tests/e2e/pipelex/pipes/pipe_operators/pipe_search/test_pipe_search.py+++ b/tests/e2e/pipelex/pipes/pipe_operators/pipe_search/test_pipe_search.py@@ -5,8 +5,8 @@ import pytestfrom pipelex import pretty_printfrom pipelex.core.stuffs.search_result_content import SearchResultContentfrom pipelex.core.stuffs.text_content import TextContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.e2e.pipelex.pipes.pipe_operators.pipe_search.test_data import PipeSearchTestCasesLIBRARY_DIRS = ["tests/e2e/pipelex/pipes/pipe_operators/pipe_search"]diff --git a/tests/e2e/pipelex/pipes/smart_inputs/test_smart_inputs_dry_run.py b/tests/e2e/pipelex/pipes/smart_inputs/test_smart_inputs_dry_run.pyindex 8b414fabc..8754891f6 100644--- a/tests/e2e/pipelex/pipes/smart_inputs/test_smart_inputs_dry_run.py+++ b/tests/e2e/pipelex/pipes/smart_inputs/test_smart_inputs_dry_run.py@@ -22,9 +22,9 @@ from pipelex.core.stuffs.list_content import ListContentfrom pipelex.core.stuffs.number_content import NumberContentfrom pipelex.core.stuffs.structured_content import StructuredContentfrom pipelex.core.stuffs.text_content import TextContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.pipeline_response import RunStatefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModeif TYPE_CHECKING:from pipelex.core.stuffs.stuff_content import StuffContentdiff --git a/tests/e2e/pipelex/pipes/smart_inputs/test_smart_inputs_files_dry_run.py b/tests/e2e/pipelex/pipes/smart_inputs/test_smart_inputs_files_dry_run.pyindex 7dd5a1d97..4ba6a2f8f 100644--- a/tests/e2e/pipelex/pipes/smart_inputs/test_smart_inputs_files_dry_run.py+++ b/tests/e2e/pipelex/pipes/smart_inputs/test_smart_inputs_files_dry_run.py@@ -18,9 +18,9 @@ from pipelex.core.stuffs.document_content import DocumentContentfrom pipelex.core.stuffs.image_content import ImageContentfrom pipelex.core.stuffs.list_content import ListContentfrom pipelex.core.stuffs.structured_content import StructuredContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.pipeline_response import RunStatefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModeif TYPE_CHECKING:from pipelex.core.stuffs.stuff_content import StuffContentdiff --git a/tests/e2e/pipelex/pipes/smart_inputs/test_smart_inputs_light_roundtrip.py b/tests/e2e/pipelex/pipes/smart_inputs/test_smart_inputs_light_roundtrip.pyindex b8f16b8a4..536e2a6cb 100644--- a/tests/e2e/pipelex/pipes/smart_inputs/test_smart_inputs_light_roundtrip.py+++ b/tests/e2e/pipelex/pipes/smart_inputs/test_smart_inputs_light_roundtrip.py@@ -20,10 +20,10 @@ import pytestfrom pipelex.interpreter_hub import clear_current_library, get_current_library_id_or_none, get_library_manager, get_required_pipe, set_current_libraryfrom pipelex.pipe_machinery.rendering.input_renderer import render_inputs-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.pipeline_response import RunStatefrom pipelex.pipeline.runner import PipelexMTHDSProtocolfrom pipelex.pipeline.validate_bundle import validate_bundle+from pipelex.system.pipe_run_mode import PipeRunModeif TYPE_CHECKING:from collections.abc import Callablediff --git a/tests/e2e/pipelex/pipes/yes_no/test_yes_no_dry_run.py b/tests/e2e/pipelex/pipes/yes_no/test_yes_no_dry_run.pyindex 4850a184a..a06dcdb71 100644--- a/tests/e2e/pipelex/pipes/yes_no/test_yes_no_dry_run.py+++ b/tests/e2e/pipelex/pipes/yes_no/test_yes_no_dry_run.py@@ -10,9 +10,9 @@ from pathlib import Pathimport pytest-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.pipeline_response import RunStatefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunMode_FIXTURE_DIR = Path(__file__).parent / "yes_no_judgment"diff --git a/tests/e2e/test_pipe_compose_whole_stuff_mthds.py b/tests/e2e/test_pipe_compose_whole_stuff_mthds.pyindex 8f6da545a..b28fdad55 100644--- a/tests/e2e/test_pipe_compose_whole_stuff_mthds.py+++ b/tests/e2e/test_pipe_compose_whole_stuff_mthds.py@@ -8,10 +8,10 @@ import pytestfrom pipelex import pretty_printfrom pipelex.core.stuffs.number_content import NumberContentfrom pipelex.core.stuffs.text_content import TextContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.bundle_validator import DryRunStatusfrom pipelex.pipeline.runner import PipelexMTHDSProtocolfrom pipelex.pipeline.validate_bundle import validate_bundle+from pipelex.system.pipe_run_mode import PipeRunMode_FIXTURE_DIR = Path(__file__).parent / "fixtures" / "compose_whole_stuff"_BUNDLE = _FIXTURE_DIR / "compose_whole_stuff.mthds"diff --git a/tests/e2e/test_signature_validation_mthds.py b/tests/e2e/test_signature_validation_mthds.pyindex 698470e18..007a9efc9 100644--- a/tests/e2e/test_signature_validation_mthds.py+++ b/tests/e2e/test_signature_validation_mthds.py@@ -5,12 +5,12 @@ from pathlib import Pathimport pytestfrom pipelex.core.stuffs.text_content import TextContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_signature.exceptions import PipeSignatureNotExecutableErrorfrom pipelex.pipeline.bundle_validator import DryRunStatusfrom pipelex.pipeline.exceptions import PipelineExecutionErrorfrom pipelex.pipeline.runner import PipelexMTHDSProtocolfrom pipelex.pipeline.validate_bundle import validate_bundle+from pipelex.system.pipe_run_mode import PipeRunMode_FIXTURE_DIR = Path(__file__).parent / "fixtures" / "signature_bundles"_SIGNATURE_ONLY = _FIXTURE_DIR / "signature_only.mthds"diff --git a/tests/integration/pipelex/cogt/content_generation/test_dry_run_object_fidelity.py b/tests/integration/pipelex/cogt/content_generation/test_dry_run_object_fidelity.pyindex 066418838..1682fb425 100644--- a/tests/integration/pipelex/cogt/content_generation/test_dry_run_object_fidelity.py+++ b/tests/integration/pipelex/cogt/content_generation/test_dry_run_object_fidelity.py@@ -19,8 +19,8 @@ from pipelex.cogt.content_generation.content_generator_protocol import ContentGefrom pipelex.cogt.content_generation.exceptions import DryRunObjectFidelityErrorfrom pipelex.cogt.llm.llm_prompt import LLMPromptfrom pipelex.cogt.llm.llm_setting import LLMSetting-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.cogt.content_generation.test_data import ConstrainedName, PlainNamediff --git a/tests/integration/pipelex/cogt/content_generation/test_leaf_dry_object_mocks.py b/tests/integration/pipelex/cogt/content_generation/test_leaf_dry_object_mocks.pyindex 4fbeac320..63b7b1950 100644--- a/tests/integration/pipelex/cogt/content_generation/test_leaf_dry_object_mocks.py+++ b/tests/integration/pipelex/cogt/content_generation/test_leaf_dry_object_mocks.py@@ -27,8 +27,8 @@ from pipelex.cogt.llm.llm_setting import LLMSettingfrom pipelex.cogt.search.search_setting import SearchSettingfrom pipelex.config import get_configfrom pipelex.core.stuffs.structured_content import StructuredContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.cogt.content_generation.test_data import ConstrainedNamediff --git a/tests/integration/pipelex/cogt/test_content_generator.py b/tests/integration/pipelex/cogt/test_content_generator.pyindex 4b42fe774..0d0918b91 100644--- a/tests/integration/pipelex/cogt/test_content_generator.py+++ b/tests/integration/pipelex/cogt/test_content_generator.py@@ -11,9 +11,9 @@ from pipelex.cogt.llm.llm_prompt import LLMPromptfrom pipelex.cogt.llm.llm_setting import LLMSettingfrom pipelex.core.stuffs.image_content import ImageContentfrom pipelex.core.stuffs.page_content import PageContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.runtime_hub import get_model_deckfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.cases import DocumentTestCases, ImageTestCasesfrom tests.integration.pipelex.cogt.test_data import Employeediff --git a/tests/integration/pipelex/cogt/test_llm_generate_security.py b/tests/integration/pipelex/cogt/test_llm_generate_security.pyindex 785c17850..61f9f027c 100644--- a/tests/integration/pipelex/cogt/test_llm_generate_security.py+++ b/tests/integration/pipelex/cogt/test_llm_generate_security.py@@ -15,8 +15,8 @@ from pipelex.cogt.content_generation.exceptions import UnsafeSchemaErrorfrom pipelex.cogt.content_generation.llm_generate import llm_gen_object, llm_gen_object_listfrom pipelex.cogt.llm.llm_prompt import LLMPromptfrom pipelex.cogt.llm.llm_setting import LLMSetting-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModedef _make_stub_llm_assignment() -> LLMAssignment:diff --git a/tests/integration/pipelex/csv/test_csv_roundtrip.py b/tests/integration/pipelex/csv/test_csv_roundtrip.pyindex ad723093f..4c23b7ff7 100644--- a/tests/integration/pipelex/csv/test_csv_roundtrip.py+++ b/tests/integration/pipelex/csv/test_csv_roundtrip.py@@ -26,8 +26,8 @@ from mthds.protocol.pipeline_inputs import PipelineInputsfrom pipelex.core.memory.working_memory_factory import WorkingMemoryFactoryfrom pipelex.core.stuffs.list_content import ListContentfrom pipelex.interpreter_hub import get_concept_library, get_library_manager-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.tools.tabular.csv_codec import csv_from_list_contentif TYPE_CHECKING:diff --git a/tests/integration/pipelex/error_handling/test_error_report_local_full_chain.py b/tests/integration/pipelex/error_handling/test_error_report_local_full_chain.pyindex 3de727085..7101c6c74 100644--- a/tests/integration/pipelex/error_handling/test_error_report_local_full_chain.py+++ b/tests/integration/pipelex/error_handling/test_error_report_local_full_chain.py@@ -23,7 +23,7 @@ from pipelex.cogt.content_generation.content_generator import ContentGeneratorfrom pipelex.interpreter_hub import get_pipe_routerfrom pipelex.pipe_run.exceptions import PipeRouterErrorfrom pipelex.pipe_run.pipe_job import PipeJob-from pipelex.pipe_run.pipe_run_mode import PipeRunMode+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.error_handling.test_data import ErrorReportParityTestDatafrom tests.integration.pipelex.fixtures.pipe_job_helpers import pipe_job_from_bundlediff --git a/tests/integration/pipelex/error_handling/test_search_error_report_local_full_chain.py b/tests/integration/pipelex/error_handling/test_search_error_report_local_full_chain.pyindex 8625b9ed4..d6e5df118 100644--- a/tests/integration/pipelex/error_handling/test_search_error_report_local_full_chain.py+++ b/tests/integration/pipelex/error_handling/test_search_error_report_local_full_chain.py@@ -20,7 +20,7 @@ from pipelex.cogt.content_generation.content_generator import ContentGeneratorfrom pipelex.cogt.exceptions import SearchJobFailureErrorfrom pipelex.interpreter_hub import get_pipe_routerfrom pipelex.pipe_run.pipe_job import PipeJob-from pipelex.pipe_run.pipe_run_mode import PipeRunMode+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.error_handling.test_data import SearchErrorReportParityTestDatafrom tests.integration.pipelex.fixtures.pipe_job_helpers import pipe_job_from_bundlediff --git a/tests/integration/pipelex/fixtures/pipe_job_helpers.py b/tests/integration/pipelex/fixtures/pipe_job_helpers.pyindex 35970e40e..eacba7fbd 100644--- a/tests/integration/pipelex/fixtures/pipe_job_helpers.py+++ b/tests/integration/pipelex/fixtures/pipe_job_helpers.py@@ -10,10 +10,9 @@ from pipelex.mthds_parsing.parser import MthdsParserfrom pipelex.pipe_machinery.pipe_abstract import PipeAbstractfrom pipelex.pipe_run.pipe_job import PipeJobfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactory-from pipelex.pipeline.pipeline_models import SpecialPipelineId-from pipelex.system.job_metadata import JobMetadata+from pipelex.system.job_metadata import JobMetadata, SpecialPipelineId+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.telemetry.otel_constants import OTelConstantsPIPE_JOB_HELPERS_PIPELINE_RUN_ID_PREFIX = "pipe_job_helpers_test"diff --git a/tests/integration/pipelex/pipe_signature/test_pipe_signature.py b/tests/integration/pipelex/pipe_signature/test_pipe_signature.pyindex 6bb2898a2..a001d9560 100644--- a/tests/integration/pipelex/pipe_signature/test_pipe_signature.py+++ b/tests/integration/pipelex/pipe_signature/test_pipe_signature.py@@ -6,14 +6,13 @@ from pipelex.core.memory.working_memory_factory import WorkingMemoryFactoryfrom pipelex.core.stuffs.list_content import ListContentfrom pipelex.interpreter_hub import get_current_libraryfrom pipelex.pipe_machinery.pipe_factory import PipeFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.pipe_signature.exceptions import PipeSignatureNotExecutableErrorfrom pipelex.pipe_signature.pipe_signature import PipeSignaturefrom pipelex.pipe_signature.pipe_signature_blueprint import PipeSignatureBlueprintfrom pipelex.pipeline.bundle_validator import BundleValidator, DryRunStatus-from pipelex.pipeline.pipeline_models import SpecialPipelineId-from pipelex.system.job_metadata import JobMetadata+from pipelex.system.job_metadata import JobMetadata, SpecialPipelineId+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.telemetry.otel_constants import OTelConstantsfrom tests.integration.pipelex.pipe_signature.conftest import SIGNATURES_DOMAIN_CODEdiff --git a/tests/integration/pipelex/pipeline/test_cost_report_rendering.py b/tests/integration/pipelex/pipeline/test_cost_report_rendering.pyindex ce9dded3f..26c24284e 100644--- a/tests/integration/pipelex/pipeline/test_cost_report_rendering.py+++ b/tests/integration/pipelex/pipeline/test_cost_report_rendering.py@@ -22,11 +22,11 @@ from pipelex.cogt.usage.cost_category import CostCategoryfrom pipelex.cogt.usage.token_category import TokenCategoryfrom pipelex.config import get_configfrom pipelex.core.pipes.pipe_output import PipeOutput-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocolfrom pipelex.reporting.cost_report_renderer import render_run_cost_reportfrom pipelex.system.configuration.configs import NdjsonTracingConfig, PipelineExecutionConfig, TracingBackendfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode_DOMAIN = "cost_report_rendering"_MTHDS = f"""diff --git a/tests/integration/pipelex/pipeline/test_direct_tracing_assembly.py b/tests/integration/pipelex/pipeline/test_direct_tracing_assembly.pyindex 1ad9d5ae5..64d4a9c8c 100644--- a/tests/integration/pipelex/pipeline/test_direct_tracing_assembly.py+++ b/tests/integration/pipelex/pipeline/test_direct_tracing_assembly.py@@ -20,9 +20,9 @@ from pipelex.config import get_configfrom pipelex.core.pipes.pipe_output import PipeOutputfrom pipelex.core.stuffs.stuff_content import StuffContentfrom pipelex.graph.graphspec import GraphSpecMode-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocolfrom pipelex.system.configuration.configs import NdjsonTracingConfig, PipelineExecutionConfig, TracingBackend+from pipelex.system.pipe_run_mode import PipeRunMode_DIRECT_DOMAIN = "direct_tracing_assembly"_DIRECT_MTHDS = f"""diff --git a/tests/integration/pipelex/pipeline/test_execution_seams.py b/tests/integration/pipelex/pipeline/test_execution_seams.pyindex 54d9b61e9..3b08bbfa4 100644--- a/tests/integration/pipelex/pipeline/test_execution_seams.py+++ b/tests/integration/pipelex/pipeline/test_execution_seams.py@@ -12,10 +12,10 @@ from pytest_mock import MockerFixturefrom pipelex.config import get_configfrom pipelex.interpreter_hub import clear_current_library, get_current_library_id_or_none, get_library_manager, get_required_pipe-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline import execution_seams as execution_seams_modulefrom pipelex.pipeline.execution_seams import acquire_library, prepare_pipe_jobfrom pipelex.system.configuration.configs import PipelineExecutionConfig+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.telemetry.otel_constants import OTelConstants_SEAMS_DOMAIN = "seams_test"diff --git a/tests/integration/pipelex/pipeline/test_mock_usage_direct.py b/tests/integration/pipelex/pipeline/test_mock_usage_direct.pyindex edc2fc6a2..572feab27 100644--- a/tests/integration/pipelex/pipeline/test_mock_usage_direct.py+++ b/tests/integration/pipelex/pipeline/test_mock_usage_direct.py@@ -22,10 +22,10 @@ from pipelex.cogt.content_generation.dry_mock import MOCK_USAGE_MODEL_NAMEfrom pipelex.cogt.usage.cost_registry import CostRegistryfrom pipelex.config import get_configfrom pipelex.core.pipes.pipe_output import PipeOutput-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocolfrom pipelex.reporting.cost_report_renderer import render_run_cost_reportfrom pipelex.system.configuration.configs import NdjsonTracingConfig, PipelineExecutionConfig, TracingBackend+from pipelex.system.pipe_run_mode import PipeRunMode_DOMAIN = "mock_usage_direct"_MTHDS = f"""diff --git a/tests/integration/pipelex/pipeline/test_optional_method_inputs.py b/tests/integration/pipelex/pipeline/test_optional_method_inputs.pyindex 87f99070f..d2d09f5a8 100644--- a/tests/integration/pipelex/pipeline/test_optional_method_inputs.py+++ b/tests/integration/pipelex/pipeline/test_optional_method_inputs.py@@ -18,10 +18,10 @@ from pipelex.core.stuffs.text_content import TextContentfrom pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.func.pipe_func import PipeFuncfrom pipelex.pipe_operators.func.pipe_func_blueprint import PipeFuncBlueprint-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import PipeRunParamsfrom pipelex.pipeline.execution_seams import prepare_pipe_jobfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.registries.func_registry import func_registrydiff --git a/tests/integration/pipelex/pipeline/test_pipeline_run_id_resubmission.py b/tests/integration/pipelex/pipeline/test_pipeline_run_id_resubmission.pyindex a19055883..6db1714be 100644--- a/tests/integration/pipelex/pipeline/test_pipeline_run_id_resubmission.py+++ b/tests/integration/pipelex/pipeline/test_pipeline_run_id_resubmission.py@@ -30,12 +30,12 @@ from pipelex.graph.graph_tracer import GraphTracerfrom pipelex.interpreter_hub import clear_current_library, get_current_library_id_or_none, get_library_manager, get_pipeline_managerfrom pipelex.libraries.pipe.exceptions import PipeNotFoundErrorfrom pipelex.pipe_run.exceptions import PipeRouterError-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_protocol import PipeRunProtocolfrom pipelex.pipeline.exceptions import PipelineExecutionErrorfrom pipelex.pipeline.pipeline_factory import PipelineFactoryfrom pipelex.pipeline.pipeline_run_setup import pipeline_run_setupfrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModeif TYPE_CHECKING:from pytest_mock import MockerFixturediff --git a/tests/integration/pipelex/pipeline/test_pipeline_run_setup_characterization.py b/tests/integration/pipelex/pipeline/test_pipeline_run_setup_characterization.pyindex 81887cf2b..38c0ddab6 100644--- a/tests/integration/pipelex/pipeline/test_pipeline_run_setup_characterization.py+++ b/tests/integration/pipelex/pipeline/test_pipeline_run_setup_characterization.py@@ -60,12 +60,12 @@ from pipelex.interpreter_hub import (set_current_library,)from pipelex.libraries.pipe.exceptions import PipeNotFoundError-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.pipeline_run_setup import pipeline_run_setupfrom pipelex.pipeline.runner import PipelexMTHDSProtocolfrom pipelex.reporting.reporting_manager import ReportingManagerfrom pipelex.runtime_hub import get_report_delegate, get_telemetry_managerfrom pipelex.system.configuration.configs import NdjsonTracingConfig, PipelineExecutionConfig, TracingBackend+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.telemetry.events import EventName_CHAR_DOMAIN = "prs_char"diff --git a/tests/integration/pipelex/pipeline/test_pipeline_run_setup_emit_gates.py b/tests/integration/pipelex/pipeline/test_pipeline_run_setup_emit_gates.pyindex 34da87a5b..41bf64ea1 100644--- a/tests/integration/pipelex/pipeline/test_pipeline_run_setup_emit_gates.py+++ b/tests/integration/pipelex/pipeline/test_pipeline_run_setup_emit_gates.py@@ -19,10 +19,10 @@ from pytest_mock import MockerFixturefrom pipelex.config import get_configfrom pipelex.graph.graph_tracer_manager import GraphTracerManagerfrom pipelex.interpreter_hub import clear_current_library, get_library_manager-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.pipeline_run_setup import pipeline_run_setupfrom pipelex.runtime_hub import get_report_delegatefrom pipelex.system.configuration.configs import NdjsonTracingConfig, PipelineExecutionConfig, TracingBackend+from pipelex.system.pipe_run_mode import PipeRunMode_GATE_DOMAIN = "prs_emit_gates"_GATE_MTHDS = f"""diff --git a/tests/integration/pipelex/pipeline/test_runner_library_lifecycle.py b/tests/integration/pipelex/pipeline/test_runner_library_lifecycle.pyindex 6c29ade3e..89862bd83 100644--- a/tests/integration/pipelex/pipeline/test_runner_library_lifecycle.py+++ b/tests/integration/pipelex/pipeline/test_runner_library_lifecycle.py@@ -24,10 +24,10 @@ from typing_extensions import overridefrom pipelex.config import get_configfrom pipelex.interpreter_hub import clear_current_library, get_current_library_id_or_none, get_library_manager, set_current_libraryfrom pipelex.pipe_run.exceptions import PipeRouterError-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_protocol import PipeRunProtocolfrom pipelex.pipeline.exceptions import PipelineExecutionErrorfrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModeif TYPE_CHECKING:from collections.abc import Callablediff --git a/tests/integration/pipelex/pipeline/test_scoped_in_memory_tracing.py b/tests/integration/pipelex/pipeline/test_scoped_in_memory_tracing.pyindex d192402b8..11368e066 100644--- a/tests/integration/pipelex/pipeline/test_scoped_in_memory_tracing.py+++ b/tests/integration/pipelex/pipeline/test_scoped_in_memory_tracing.py@@ -19,10 +19,10 @@ from pytest_mock import MockerFixturefrom pipelex.config import get_configfrom pipelex.core.pipes.pipe_output import PipeOutput-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocolfrom pipelex.runtime_hub import scoped_event_logfrom pipelex.system.configuration.configs import NdjsonTracingConfig, TracingBackend+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.tracing.in_memory_event_log import InMemoryEventLog_SCOPED_DOMAIN = "scoped_in_memory_tracing"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.pyindex 034c63f33..6d1c59444 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@@ -25,9 +25,9 @@ from pipelex.pipe_controllers.condition.special_outcome import SpecialOutcomefrom pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.func.pipe_func import PipeFuncfrom pipelex.pipe_operators.func.pipe_func_blueprint import PipeFuncBlueprint-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import PipeRunParamsfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.registries.func_registry import func_registry_DOMAIN_CODE = "test_optionals_batch"diff --git a/tests/integration/pipelex/pipes/controller/pipe_batch/test_pipe_batch_simple.py b/tests/integration/pipelex/pipes/controller/pipe_batch/test_pipe_batch_simple.pyindex fd6eee14a..df9cbd5cd 100644--- a/tests/integration/pipelex/pipes/controller/pipe_batch/test_pipe_batch_simple.py+++ b/tests/integration/pipelex/pipes/controller/pipe_batch/test_pipe_batch_simple.py@@ -16,9 +16,9 @@ from pipelex.interpreter_hub import get_concept_libraryfrom pipelex.pipe_controllers.batch.pipe_batch import PipeBatchfrom pipelex.pipe_controllers.batch.pipe_batch_blueprint import PipeBatchBlueprintfrom pipelex.pipe_machinery.pipe_factory import PipeFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.dry_runnablediff --git a/tests/integration/pipelex/pipes/controller/pipe_batch_dotted_path/test_dotted_batch.py b/tests/integration/pipelex/pipes/controller/pipe_batch_dotted_path/test_dotted_batch.pyindex 1d9a4e14e..ce86b18bc 100644--- a/tests/integration/pipelex/pipes/controller/pipe_batch_dotted_path/test_dotted_batch.py+++ b/tests/integration/pipelex/pipes/controller/pipe_batch_dotted_path/test_dotted_batch.py@@ -15,10 +15,10 @@ from pipelex.core.stuffs.stuff_factory import StuffFactoryfrom pipelex.core.stuffs.text_content import TextContentfrom pipelex.interpreter_hub import get_required_pipefrom pipelex.pipe_controllers.sub_pipe import SubPipe-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import BatchParamsfrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.dry_runnablediff --git a/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_complex.py b/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_complex.pyindex 3d2fbceed..fe13224be 100644--- a/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_complex.py+++ b/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_complex.py@@ -15,9 +15,9 @@ from pipelex.core.stuffs.text_content import TextContentfrom pipelex.interpreter_hub import get_pipe_router, get_required_pipefrom pipelex.pipe_run.exceptions import PipeRouterErrorfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.controller.pipe_condition.pipe_condition_complex import (DocumentRequest,UserProfile,diff --git a/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_continue_delivery.py b/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_continue_delivery.pyindex d08d0040e..b2c72d9e5 100644--- a/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_continue_delivery.py+++ b/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_continue_delivery.py@@ -17,16 +17,16 @@ from pipelex.core.concepts.native.concept_native import NativeConceptCodefrom pipelex.core.domains.domain import SpecialDomainfrom pipelex.core.memory.absence import AbsenceKind, AbsenceRecordfrom pipelex.core.memory.working_memory_factory import WorkingMemoryFactory+from pipelex.core.pipes.exceptions import PipeRunErrorfrom pipelex.core.stuffs.stuff_factory import StuffFactoryfrom pipelex.core.stuffs.text_content import TextContentfrom pipelex.pipe_controllers.condition.pipe_condition import PipeConditionfrom pipelex.pipe_controllers.condition.pipe_condition_blueprint import PipeConditionBlueprintfrom pipelex.pipe_controllers.condition.special_outcome import SpecialOutcomefrom pipelex.pipe_machinery.pipe_factory import PipeFactory-from pipelex.pipe_run.exceptions import PipeRunError-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import PipeRunParamsfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModedef _make_continue_only_condition() -> PipeCondition:diff --git a/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_continue_output_type.py b/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_continue_output_type.pyindex 88824fffd..efead687b 100644--- a/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_continue_output_type.py+++ b/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_continue_output_type.py@@ -21,9 +21,9 @@ from pipelex.core.stuffs.list_content import ListContentfrom pipelex.core.stuffs.stuff_factory import StuffFactoryfrom pipelex.interpreter_hub import get_pipe_router, get_required_pipefrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.controller.pipe_condition.pipe_condition_continue_output_type import (Constraint,VerifiedLink,diff --git a/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_simple.py b/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_simple.pyindex 9270a77f4..7019109e2 100644--- a/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_simple.py+++ b/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_simple.py@@ -18,9 +18,9 @@ from pipelex.pipe_controllers.condition.special_outcome import SpecialOutcomefrom pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_run.exceptions import PipeRouterErrorfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.controller.pipe_condition.pipe_condition import CategoryInputdiff --git a/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_absence.py b/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_absence.pyindex f14ce1fa0..47e832476 100644--- a/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_absence.py+++ b/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_absence.py@@ -21,6 +21,7 @@ from pipelex.core.concepts.concept_factory import ConceptFactoryfrom pipelex.core.memory.absence import AbsenceKind, AbsenceRecordfrom pipelex.core.memory.working_memory import WorkingMemoryfrom pipelex.core.memory.working_memory_factory import WorkingMemoryFactory+from pipelex.core.pipes.exceptions import PipeRunErrorfrom pipelex.core.stuffs.composite_content import CompositeContentfrom pipelex.core.stuffs.structured_content import StructuredContentfrom pipelex.core.stuffs.stuff import Stuff@@ -33,11 +34,10 @@ from pipelex.pipe_controllers.sub_pipe_blueprint import SubPipeBlueprintfrom pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.func.pipe_func import PipeFuncfrom pipelex.pipe_operators.func.pipe_func_blueprint import PipeFuncBlueprint-from pipelex.pipe_run.exceptions import PipeRunError-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import PipeRunParamsfrom pipelex.runtime_hub import get_class_registryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.registries.func_registry import func_registry_DOMAIN_CODE = "test_optionals_par"diff --git a/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_always_combines.py b/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_always_combines.pyindex 2f0c8addd..26aafda47 100644--- a/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_always_combines.py+++ b/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_always_combines.py@@ -14,8 +14,8 @@ import pytestfrom pipelex.core.stuffs.composite_content import CompositeContentfrom pipelex.core.stuffs.text_content import TextContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunMode_LIBRARY_DIR = "tests/integration/pipelex/pipes/controller/pipe_parallel"diff --git a/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_final_stuff_code.py b/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_final_stuff_code.pyindex 1a10b770c..f8a673226 100644--- a/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_final_stuff_code.py+++ b/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_final_stuff_code.py@@ -21,9 +21,9 @@ from pipelex.pipe_controllers.parallel.pipe_parallel import PipeParallelfrom pipelex.pipe_controllers.parallel.pipe_parallel_blueprint import PipeParallelBlueprintfrom pipelex.pipe_controllers.sub_pipe_factory import SubPipeBlueprintfrom pipelex.pipe_machinery.pipe_factory import PipeFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode_REQUESTED_CODE = "requested-final-stuff-code"diff --git a/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_simple.py b/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_simple.pyindex 5f1ee737b..71eac4213 100644--- a/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_simple.py+++ b/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_simple.py@@ -14,9 +14,9 @@ from pipelex.pipe_controllers.parallel.pipe_parallel import PipeParallelfrom pipelex.pipe_controllers.parallel.pipe_parallel_blueprint import PipeParallelBlueprintfrom pipelex.pipe_controllers.sub_pipe_factory import SubPipeBlueprintfrom pipelex.pipe_machinery.pipe_factory import PipeFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.dry_runnablediff --git a/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_dry_run.py b/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_dry_run.pyindex b51ab0089..6f4c9a485 100644--- a/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_dry_run.py+++ b/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_dry_run.py@@ -11,9 +11,9 @@ from pipelex.core.stuffs.stuff import Stufffrom pipelex.core.stuffs.stuff_factory import StuffFactoryfrom pipelex.interpreter_hub import get_pipe_router, get_required_pipefrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.tools.misc.json_utils import load_json_list_from_pathfrom tests.integration.pipelex.pipes.controller.pipe_sequence.discord_newsletter import ChannelSummary, DiscordChannelUpdatediff --git a/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_simple.py b/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_simple.pyindex 473230f34..777be12e9 100644--- a/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_simple.py+++ b/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_simple.py@@ -15,9 +15,9 @@ from pipelex.pipe_controllers.sequence.pipe_sequence import PipeSequencefrom pipelex.pipe_controllers.sequence.pipe_sequence_blueprint import PipeSequenceBlueprintfrom pipelex.pipe_controllers.sub_pipe_blueprint import SubPipeBlueprintfrom pipelex.pipe_machinery.pipe_factory import PipeFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.dry_runnablediff --git a/tests/integration/pipelex/pipes/llm_prompt_inputs/test_image_inputs_inference.py b/tests/integration/pipelex/pipes/llm_prompt_inputs/test_image_inputs_inference.pyindex 0d4fc65dd..456436aff 100644--- a/tests/integration/pipelex/pipes/llm_prompt_inputs/test_image_inputs_inference.py+++ b/tests/integration/pipelex/pipes/llm_prompt_inputs/test_image_inputs_inference.py@@ -16,9 +16,9 @@ from pipelex.core.stuffs.text_and_images_content import TextAndImagesContentfrom pipelex.core.stuffs.text_content import TextContentfrom pipelex.interpreter_hub import get_native_concept, get_pipe_router, get_required_pipefrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.cases import ImageTestCasesfrom tests.integration.pipelex.pipes.pipelines.test_structures import Articlediff --git a/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_class_compatibility.py b/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_class_compatibility.pyindex d3d8af0c4..98de199f9 100644--- a/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_class_compatibility.py+++ b/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_class_compatibility.py@@ -22,9 +22,9 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.compose.pipe_compose import PipeComposefrom pipelex.pipe_operators.compose.pipe_compose_blueprint import PipeComposeBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.operator.pipe_compose_structured.models_for_pipe_compose import (DiscountedProduct,Employee,diff --git a/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_content_conversions.py b/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_content_conversions.pyindex 9d1909860..3d228ff4b 100644--- a/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_content_conversions.py+++ b/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_content_conversions.py@@ -24,9 +24,9 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.compose.pipe_compose import PipeComposefrom pipelex.pipe_operators.compose.pipe_compose_blueprint import PipeComposeBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.operator.pipe_compose_structured.models_for_pipe_compose import (MarkdownText,TeamMember,diff --git a/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_native_scalar_conversions.py b/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_native_scalar_conversions.pyindex 59b7dc62a..16a4153fe 100644--- a/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_native_scalar_conversions.py+++ b/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_native_scalar_conversions.py@@ -31,9 +31,9 @@ from pipelex.pipe_operators.compose.exceptions import PipeComposeErrorfrom pipelex.pipe_operators.compose.pipe_compose import PipeComposefrom pipelex.pipe_operators.compose.pipe_compose_blueprint import PipeComposeBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.operator.pipe_compose_structured.test_data import NativeScalarConversionTestDatadiff --git a/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_structured.py b/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_structured.pyindex 39cff6cc1..cfde25efd 100644--- a/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_structured.py+++ b/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_structured.py@@ -20,9 +20,9 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.compose.pipe_compose import PipeComposefrom pipelex.pipe_operators.compose.pipe_compose_blueprint import PipeComposeBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.operator.pipe_compose_structured.models_for_pipe_compose import (Address,Deal,diff --git a/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_structured_compatibility.py b/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_structured_compatibility.pyindex f5acefbcb..68c7d8972 100644--- a/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_structured_compatibility.py+++ b/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_structured_compatibility.py@@ -23,9 +23,9 @@ from pipelex.pipe_operators.compose.exceptions import PipeComposeErrorfrom pipelex.pipe_operators.compose.pipe_compose import PipeComposefrom pipelex.pipe_operators.compose.pipe_compose_blueprint import PipeComposeBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.operator.pipe_compose_structured.models_for_pipe_compose import (Employee,Location,diff --git a/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_stuff_content_subclasses.py b/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_stuff_content_subclasses.pyindex 840ba0fb5..87c5dce46 100644--- a/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_stuff_content_subclasses.py+++ b/tests/integration/pipelex/pipes/operator/pipe_compose_structured/test_pipe_compose_stuff_content_subclasses.py@@ -32,9 +32,9 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.compose.pipe_compose import PipeComposefrom pipelex.pipe_operators.compose.pipe_compose_blueprint import PipeComposeBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.urls import URLsfrom tests.integration.pipelex.pipes.operator.pipe_compose_structured.test_data import StuffContentSubclassTestDatadiff --git a/tests/integration/pipelex/pipes/operator/pipe_extract/test_pipe_extract.py b/tests/integration/pipelex/pipes/operator/pipe_extract/test_pipe_extract.pyindex 7ff9f7f6c..8d0b7803c 100644--- a/tests/integration/pipelex/pipes/operator/pipe_extract/test_pipe_extract.py+++ b/tests/integration/pipelex/pipes/operator/pipe_extract/test_pipe_extract.py@@ -16,9 +16,9 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.extract.pipe_extract import PipeExtractfrom pipelex.pipe_operators.extract.pipe_extract_blueprint import PipeExtractBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.test_data import PipeExtractTestCasesdiff --git a/tests/integration/pipelex/pipes/operator/pipe_extract/test_pipe_extract_model_not_found_reroute.py b/tests/integration/pipelex/pipes/operator/pipe_extract/test_pipe_extract_model_not_found_reroute.pyindex 61ea1b31c..34815cc24 100644--- a/tests/integration/pipelex/pipes/operator/pipe_extract/test_pipe_extract_model_not_found_reroute.py+++ b/tests/integration/pipelex/pipes/operator/pipe_extract/test_pipe_extract_model_not_found_reroute.py@@ -16,9 +16,9 @@ from pipelex.pipe_operators.exceptions import PipeOperatorModelAvailabilityErrorfrom pipelex.pipe_operators.extract.pipe_extract import PipeExtractfrom pipelex.pipe_operators.extract.pipe_extract_blueprint import PipeExtractBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.asyncio(loop_scope="class")diff --git a/tests/integration/pipelex/pipes/operator/pipe_func/test_pipe_func.py b/tests/integration/pipelex/pipes/operator/pipe_func/test_pipe_func.pyindex c123ce96b..14334c246 100644--- a/tests/integration/pipelex/pipes/operator/pipe_func/test_pipe_func.py+++ b/tests/integration/pipelex/pipes/operator/pipe_func/test_pipe_func.py@@ -13,9 +13,9 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.func.pipe_func import PipeFuncfrom pipelex.pipe_operators.func.pipe_func_blueprint import PipeFuncBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.registries.func_registry import func_registryfrom tests.cases.source_code import wrap_linesdiff --git a/tests/integration/pipelex/pipes/operator/pipe_img_gen/test_pipe_img_gen_model_not_found_reroute.py b/tests/integration/pipelex/pipes/operator/pipe_img_gen/test_pipe_img_gen_model_not_found_reroute.pyindex 4e59820a2..99dd431ed 100644--- a/tests/integration/pipelex/pipes/operator/pipe_img_gen/test_pipe_img_gen_model_not_found_reroute.py+++ b/tests/integration/pipelex/pipes/operator/pipe_img_gen/test_pipe_img_gen_model_not_found_reroute.py@@ -12,9 +12,9 @@ from pipelex.pipe_operators.exceptions import PipeOperatorModelAvailabilityErrorfrom pipelex.pipe_operators.img_gen.pipe_img_gen import PipeImgGenfrom pipelex.pipe_operators.img_gen.pipe_img_gen_blueprint import PipeImgGenBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.asyncio(loop_scope="class")diff --git a/tests/integration/pipelex/pipes/operator/pipe_img_gen/test_pipe_img_gen_run.py b/tests/integration/pipelex/pipes/operator/pipe_img_gen/test_pipe_img_gen_run.pyindex 25cc11259..ec3a79d56 100644--- a/tests/integration/pipelex/pipes/operator/pipe_img_gen/test_pipe_img_gen_run.py+++ b/tests/integration/pipelex/pipes/operator/pipe_img_gen/test_pipe_img_gen_run.py@@ -10,9 +10,9 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.img_gen.pipe_img_gen import PipeImgGenfrom pipelex.pipe_operators.img_gen.pipe_img_gen_blueprint import PipeImgGenBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.fixtures.model_combo import ModelCombofrom tests.integration.pipelex.test_data import ImageGenTestCasesdiff --git a/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm.py b/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm.pyindex 25db787a5..2e451c595 100644--- a/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm.py+++ b/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm.py@@ -14,10 +14,10 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.llm.pipe_llm import PipeLLMfrom pipelex.pipe_operators.llm.pipe_llm_blueprint import PipeLLMBlueprint, StructuringMethodfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.runtime_hub import get_class_registryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.test_data import BasicStructuredDataTestCases, PipeTestCasesdiff --git a/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm_date_output_path.py b/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm_date_output_path.pyindex c3e5dc5db..2d4d78693 100644--- a/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm_date_output_path.py+++ b/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm_date_output_path.py@@ -20,10 +20,10 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.llm.pipe_llm import PipeLLMfrom pipelex.pipe_operators.llm.pipe_llm_blueprint import PipeLLMBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.runtime_hub import get_content_generatorfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.asyncio(loop_scope="class")diff --git a/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm_model_not_found_reroute.py b/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm_model_not_found_reroute.pyindex 29f4ef7d4..9560cc195 100644--- a/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm_model_not_found_reroute.py+++ b/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm_model_not_found_reroute.py@@ -13,9 +13,9 @@ from pipelex.pipe_operators.exceptions import PipeOperatorModelAvailabilityErrorfrom pipelex.pipe_operators.llm.pipe_llm import PipeLLMfrom pipelex.pipe_operators.llm.pipe_llm_blueprint import PipeLLMBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.asyncio(loop_scope="class")diff --git a/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm_yes_no_output_path.py b/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm_yes_no_output_path.pyindex 4e3e41570..84acf20b9 100644--- a/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm_yes_no_output_path.py+++ b/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm_yes_no_output_path.py@@ -20,10 +20,10 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.llm.pipe_llm import PipeLLMfrom pipelex.pipe_operators.llm.pipe_llm_blueprint import PipeLLMBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.runtime_hub import get_content_generatorfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.asyncio(loop_scope="class")diff --git a/tests/integration/pipelex/pipes/operator/pipe_search/test_pipe_search_model_not_found_reroute.py b/tests/integration/pipelex/pipes/operator/pipe_search/test_pipe_search_model_not_found_reroute.pyindex e35871e4c..aaa950cbd 100644--- a/tests/integration/pipelex/pipes/operator/pipe_search/test_pipe_search_model_not_found_reroute.py+++ b/tests/integration/pipelex/pipes/operator/pipe_search/test_pipe_search_model_not_found_reroute.py@@ -12,9 +12,9 @@ from pipelex.pipe_operators.exceptions import PipeOperatorModelAvailabilityErrorfrom pipelex.pipe_operators.search.pipe_search import PipeSearchfrom pipelex.pipe_operators.search.pipe_search_blueprint import PipeSearchBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.asyncio(loop_scope="class")diff --git a/tests/integration/pipelex/pipes/operator/pipe_structure/test_pipe_structure.py b/tests/integration/pipelex/pipes/operator/pipe_structure/test_pipe_structure.pyindex 3ad12a617..c4a01834e 100644--- a/tests/integration/pipelex/pipes/operator/pipe_structure/test_pipe_structure.py+++ b/tests/integration/pipelex/pipes/operator/pipe_structure/test_pipe_structure.py@@ -13,9 +13,9 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.structure.pipe_structure import PipeStructurefrom pipelex.pipe_operators.structure.pipe_structure_blueprint import PipeStructureBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.dry_runnablediff --git a/tests/integration/pipelex/pipes/operator/pipe_structure/test_pipe_structure_in_batch.py b/tests/integration/pipelex/pipes/operator/pipe_structure/test_pipe_structure_in_batch.pyindex ec3fdb92f..f4d935236 100644--- a/tests/integration/pipelex/pipes/operator/pipe_structure/test_pipe_structure_in_batch.py+++ b/tests/integration/pipelex/pipes/operator/pipe_structure/test_pipe_structure_in_batch.py@@ -17,9 +17,9 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.structure.pipe_structure import PipeStructurefrom pipelex.pipe_operators.structure.pipe_structure_blueprint import PipeStructureBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.operator.pipe_structure.test_structures_basic import RestaurantReviewdiff --git a/tests/integration/pipelex/pipes/operator/pipe_structure/test_pipe_structure_in_sequence.py b/tests/integration/pipelex/pipes/operator/pipe_structure/test_pipe_structure_in_sequence.pyindex 6910b72cf..3cf98dda6 100644--- a/tests/integration/pipelex/pipes/operator/pipe_structure/test_pipe_structure_in_sequence.py+++ b/tests/integration/pipelex/pipes/operator/pipe_structure/test_pipe_structure_in_sequence.py@@ -16,9 +16,9 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.structure.pipe_structure import PipeStructurefrom pipelex.pipe_operators.structure.pipe_structure_blueprint import PipeStructureBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.operator.pipe_structure.test_structures_basic import RestaurantReviewdiff --git a/tests/integration/pipelex/pipes/operator/pipe_structure/test_preliminary_text_e2e.py b/tests/integration/pipelex/pipes/operator/pipe_structure/test_preliminary_text_e2e.pyindex d289cb6b4..c7e30376c 100644--- a/tests/integration/pipelex/pipes/operator/pipe_structure/test_preliminary_text_e2e.py+++ b/tests/integration/pipelex/pipes/operator/pipe_structure/test_preliminary_text_e2e.py@@ -14,10 +14,10 @@ from pipelex.interpreter_hub import get_native_concept, get_pipe_router, get_reqfrom pipelex.pipe_controllers.sequence.pipe_sequence import PipeSequencefrom pipelex.pipe_operators.structure.pipe_structure import PipeStructurefrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.runtime_hub import get_report_delegatefrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.pipes.operator.pipe_structure.test_structures_basic import RestaurantReviewdiff --git a/tests/integration/pipelex/pipes/operator/pipe_structure/test_preliminary_text_inline_e2e.py b/tests/integration/pipelex/pipes/operator/pipe_structure/test_preliminary_text_inline_e2e.pyindex 39dea89b1..4d823b655 100644--- a/tests/integration/pipelex/pipes/operator/pipe_structure/test_preliminary_text_inline_e2e.py+++ b/tests/integration/pipelex/pipes/operator/pipe_structure/test_preliminary_text_inline_e2e.py@@ -15,10 +15,10 @@ from pipelex.interpreter_hub import get_native_concept, get_pipe_router, get_reqfrom pipelex.pipe_controllers.sequence.pipe_sequence import PipeSequencefrom pipelex.pipe_operators.structure.pipe_structure import PipeStructurefrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.runtime_hub import get_report_delegatefrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModedef _count_llm_report_calls(report_spy: MockType) -> int:diff --git a/tests/integration/pipelex/pipes/optionals/test_lift_sequence.py b/tests/integration/pipelex/pipes/optionals/test_lift_sequence.pyindex ea9951233..8ac32c4f0 100644--- a/tests/integration/pipelex/pipes/optionals/test_lift_sequence.py+++ b/tests/integration/pipelex/pipes/optionals/test_lift_sequence.py@@ -22,10 +22,10 @@ from pipelex.pipe_controllers.sub_pipe_blueprint import SubPipeBlueprintfrom pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.func.pipe_func import PipeFuncfrom pipelex.pipe_operators.func.pipe_func_blueprint import PipeFuncBlueprint-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import PipeRunParamsfrom pipelex.pipeline.execution_seams import prepare_pipe_jobfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.registries.func_registry import func_registry_DOMAIN_CODE = "test_optionals_seq"diff --git a/tests/integration/pipelex/pipes/optionals/test_lift_skip_trichotomy.py b/tests/integration/pipelex/pipes/optionals/test_lift_skip_trichotomy.pyindex 9215a7eeb..de6faaf37 100644--- a/tests/integration/pipelex/pipes/optionals/test_lift_skip_trichotomy.py+++ b/tests/integration/pipelex/pipes/optionals/test_lift_skip_trichotomy.py@@ -24,9 +24,9 @@ from pipelex.core.stuffs.text_content import TextContentfrom pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.func.pipe_func import PipeFuncfrom pipelex.pipe_operators.func.pipe_func_blueprint import PipeFuncBlueprint-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import PipeRunParamsfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.registries.func_registry import func_registryfrom tests.unit.pipelex.graph.conftest import make_trace_contextdiff --git a/tests/integration/pipelex/pipes/optionals/test_lifted_parallel_companion_slots.py b/tests/integration/pipelex/pipes/optionals/test_lifted_parallel_companion_slots.pyindex 09ca69d98..1b8f368a1 100644--- a/tests/integration/pipelex/pipes/optionals/test_lifted_parallel_companion_slots.py+++ b/tests/integration/pipelex/pipes/optionals/test_lifted_parallel_companion_slots.py@@ -24,9 +24,9 @@ from pipelex.pipe_controllers.sub_pipe_blueprint import SubPipeBlueprintfrom pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.func.pipe_func import PipeFuncfrom pipelex.pipe_operators.func.pipe_func_blueprint import PipeFuncBlueprint-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import PipeRunParamsfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.registries.func_registry import func_registry_DOMAIN_CODE = "test_optionals_companion"diff --git a/tests/integration/pipelex/pipes/optionals/test_optional_gate_tolerates_missing.py b/tests/integration/pipelex/pipes/optionals/test_optional_gate_tolerates_missing.pyindex 15a0c0315..8fd6c8fc3 100644--- a/tests/integration/pipelex/pipes/optionals/test_optional_gate_tolerates_missing.py+++ b/tests/integration/pipelex/pipes/optionals/test_optional_gate_tolerates_missing.py@@ -21,9 +21,9 @@ from pipelex.pipe_controllers.sub_pipe_blueprint import SubPipeBlueprintfrom pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.compose.pipe_compose import PipeComposefrom pipelex.pipe_operators.compose.pipe_compose_blueprint import PipeComposeBlueprint-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import PipeRunParamsfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode_DOMAIN_CODE = "test_optionals_gate"diff --git a/tests/integration/pipelex/pipes/test_image_out_in.py b/tests/integration/pipelex/pipes/test_image_out_in.pyindex 875c56e3d..7de156265 100644--- a/tests/integration/pipelex/pipes/test_image_out_in.py+++ b/tests/integration/pipelex/pipes/test_image_out_in.py@@ -5,9 +5,9 @@ import pytestfrom pipelex.interpreter_hub import get_pipe_router, get_required_pipefrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.dry_runnablediff --git a/tests/integration/pipelex/pipes/test_pipe_compose.py b/tests/integration/pipelex/pipes/test_pipe_compose.pyindex 1b9f99d17..628151294 100644--- a/tests/integration/pipelex/pipes/test_pipe_compose.py+++ b/tests/integration/pipelex/pipes/test_pipe_compose.py@@ -13,9 +13,9 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.compose.pipe_compose import PipeCompose, PipeComposeOutputfrom pipelex.pipe_operators.compose.pipe_compose_blueprint import PipeComposeBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.tools.jinja2.template_category import TemplateCategoryfrom pipelex.tools.templating.templating_style import TagStyle, TemplatingStylefrom pipelex.tools.templating.text_format import TextFormatdiff --git a/tests/integration/pipelex/pipes/test_pipe_running_variants.py b/tests/integration/pipelex/pipes/test_pipe_running_variants.pyindex 64475d3bb..d375ed312 100644--- a/tests/integration/pipelex/pipes/test_pipe_running_variants.py+++ b/tests/integration/pipelex/pipes/test_pipe_running_variants.py@@ -9,10 +9,10 @@ from pipelex.core.pipes.variable_multiplicity import VariableMultiplicityfrom pipelex.core.stuffs.stuff import Stufffrom pipelex.interpreter_hub import get_pipe_router, get_required_pipefrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.pipeline.exceptions import PipeStackOverflowErrorfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom tests.integration.pipelex.test_data import PipeTestCasesdiff --git a/tests/integration/pipelex/system/test_keyless_boot_forced_dry.py b/tests/integration/pipelex/system/test_keyless_boot_forced_dry.pyindex a59a8c629..81ee61739 100644--- a/tests/integration/pipelex/system/test_keyless_boot_forced_dry.py+++ b/tests/integration/pipelex/system/test_keyless_boot_forced_dry.py@@ -18,10 +18,10 @@ from pipelex.core.concepts.native.concept_native import NativeConceptCodefrom pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.search.pipe_search import PipeSearchfrom pipelex.pipe_operators.search.pipe_search_blueprint import PipeSearchBlueprint-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipelex import Pipelexfrom pipelex.pipeline.execution_seams import load_libraries_and_activate, prepare_pipe_jobfrom pipelex.runtime_hub import get_content_generator, is_dry_run_forced+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.runtime import IntegrationMode, runtime_managerdiff --git a/tests/unit/pipelex/cli/dev/test_hub_layering_guard.py b/tests/unit/pipelex/cli/dev/test_hub_layering_guard.pyindex 1d014048e..3de9c6513 100644--- a/tests/unit/pipelex/cli/dev/test_hub_layering_guard.py+++ b/tests/unit/pipelex/cli/dev/test_hub_layering_guard.py@@ -123,6 +123,30 @@ class TestHubLayeringGuard:"runtime-layer. Undeclared means unchecked, not flagged — add the covering entry.")+ def test_the_measured_clean_packages_stay_declared(self) -> None:+ """The four packages that were clean but undeclared must stay declared.++ `graph`, `tracing`, `observer` and `errors` load zero interpreter modules and always did —+ yet leaving them out of the tuple is what let `graph.graph_rendering` reach `interpreter_hub`+ through `pipeline.dry_run_pipeline` for a whole release with every gate green. Both the layer+ rule and the transitive rule filter their candidates through `is_runtime_layer`, so an+ undeclared package sits outside the rules' domain rather than being reported by them: **an+ undeclared package is not neutral, it is unpoliced.**++ That makes deletion the silent regression to guard, and nothing else in the suite catches it.+ The neighbouring checks all *iterate* the tuple — every entry resolves on disk, no entry is+ also an interpreter package — so they say nothing about a name that is simply gone. Same+ shape and same reasoning as `test_the_plugin_split_left_both_halves_declared` above, and+ membership is likewise the whole assertion: `is_runtime_layer` matches by dotted prefix, so+ the entry's presence is the one bit that matters.+ """+ for package in ("pipelex.graph", "pipelex.tracing", "pipelex.observer", "pipelex.errors"):+ assert package in RUNTIME_LAYER_PACKAGES, (+ f"{package} was measured clean and declared runtime-layer, and is no longer in the "+ "declaration. Undeclared means unchecked, not flagged — restore the entry, or move "+ "whatever made it dirty to the layer it belongs to."+ )+def test_runtime_layer_may_import_runtime_hub(self) -> None:"""The permitted direction is never flagged — the runtime layer lives on `runtime_hub`."""violations = _violate(diff --git a/tests/unit/pipelex/cli/test_agent_validate_cmd.py b/tests/unit/pipelex/cli/test_agent_validate_cmd.pyindex 8eb36dd2d..4d07224cf 100644--- a/tests/unit/pipelex/cli/test_agent_validate_cmd.py+++ b/tests/unit/pipelex/cli/test_agent_validate_cmd.py@@ -10,8 +10,8 @@ import typerfrom pipelex.cli.agent_cli.commands.agent_output import CliOutputFormatfrom pipelex.cli.agent_cli.commands.validate.bundle_cmd import validate_bundle_cmd-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.exceptions import PipelineExecutionError+from pipelex.system.pipe_run_mode import PipeRunModeif TYPE_CHECKING:from pathlib import Pathdiff --git a/tests/unit/pipelex/cli/test_error_handlers.py b/tests/unit/pipelex/cli/test_error_handlers.pyindex 9cc20ca98..b70fd9bd2 100644--- a/tests/unit/pipelex/cli/test_error_handlers.py+++ b/tests/unit/pipelex/cli/test_error_handlers.py@@ -19,8 +19,8 @@ from pipelex.cogt.exceptions import ModelDeckPresetValidatonErrorfrom pipelex.cogt.model_backends.model_type import ModelTypefrom pipelex.core.pipes.exceptions import PipeOperatorModelChoiceErrorfrom pipelex.pipe_operators.exceptions import PipeOperatorModelAvailabilityError-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.exceptions import ValidateBundleError+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.pipelex_service.exceptions import InferenceSetupRequiredErrorif TYPE_CHECKING:diff --git a/tests/unit/pipelex/cli/test_error_handlers_snapshot.py b/tests/unit/pipelex/cli/test_error_handlers_snapshot.pyindex b404d2a76..2e01f4682 100644--- a/tests/unit/pipelex/cli/test_error_handlers_snapshot.py+++ b/tests/unit/pipelex/cli/test_error_handlers_snapshot.py@@ -17,7 +17,7 @@ from pipelex.cli.error_handlers import ErrorContext, handle_model_availability_efrom pipelex.cogt.model_backends.model_type import ModelTypefrom pipelex.core.pipes.exceptions import PipeOperatorModelChoiceErrorfrom pipelex.pipe_operators.exceptions import PipeOperatorModelAvailabilityError-from pipelex.pipe_run.pipe_run_mode import PipeRunMode+from pipelex.system.pipe_run_mode import PipeRunModeif TYPE_CHECKING:from pytest_mock import MockerFixturediff --git a/tests/unit/pipelex/cli/test_graph_rendering.py b/tests/unit/pipelex/cli/test_graph_rendering.pydeleted file mode 100644index 82dbdc5e6..000000000--- a/tests/unit/pipelex/cli/test_graph_rendering.py+++ /dev/null@@ -1,193 +0,0 @@-"""Unit tests for the shared graph rendering utility."""--from __future__ import annotations--from typing import TYPE_CHECKING--import pytest--if TYPE_CHECKING:- from pathlib import Path-- from pytest_mock import MockerFixture--from pipelex.graph.graph_rendering import render_graph_from_spec-from pipelex.tools.misc.chart_utils import FlowchartDirection--GRAPH_RENDERING_MODULE = "pipelex.graph.graph_rendering"--[email protected](loop_scope="class")-class TestRenderGraphFromSpec:- """Tests for the render_graph_from_spec utility function."""-- @pytest.mark.parametrize(- ("include_mermaidflow", "include_reactflow"),- [- (True, False),- (False, True),- (True, True),- ],- )- async def test_format_selection_sets_correct_inclusion(- self,- mocker: MockerFixture,- tmp_path: Path,- include_mermaidflow: bool,- include_reactflow: bool,- ) -> None:- """Each format combination should set the correct mermaidflow/reactflow inclusion flags."""- mock_graph_spec = mocker.MagicMock()- mock_graph_config = mocker.MagicMock()-- mocker.patch(- f"{GRAPH_RENDERING_MODULE}.generate_graph_outputs",- new_callable=mocker.AsyncMock,- return_value=mocker.MagicMock(),- )- mocker.patch(- f"{GRAPH_RENDERING_MODULE}.save_graph_outputs_to_dir",- return_value={"reactflow_html": tmp_path / "graph.html"},- )-- await render_graph_from_spec(- graph_spec=mock_graph_spec,- graph_config=mock_graph_config,- include_mermaidflow=include_mermaidflow,- include_reactflow=include_reactflow,- pipe_code="test_pipe",- output_dir=tmp_path,- )-- # Verify the config was built with correct inclusion via model_copy chain- mock_graph_config.model_copy.assert_called_once()- graphs_inclusion_update = mock_graph_config.graphs_inclusion.model_copy.call_args.kwargs["update"]- assert graphs_inclusion_update["mermaidflow_html"] is include_mermaidflow- assert graphs_inclusion_update["reactflow_html"] is include_reactflow-- async def test_returns_saved_files(- self,- mocker: MockerFixture,- tmp_path: Path,- ) -> None:- """Should return the dict from save_graph_outputs_to_dir."""- mock_graph_spec = mocker.MagicMock()- mock_graph_config = mocker.MagicMock()-- mocker.patch(- f"{GRAPH_RENDERING_MODULE}.generate_graph_outputs",- new_callable=mocker.AsyncMock,- return_value=mocker.MagicMock(),- )-- expected_result = {"reactflow_html": tmp_path / "reactflow.html"}- mocker.patch(- f"{GRAPH_RENDERING_MODULE}.save_graph_outputs_to_dir",- return_value=expected_result,- )-- result = await render_graph_from_spec(- graph_spec=mock_graph_spec,- graph_config=mock_graph_config,- include_mermaidflow=False,- include_reactflow=True,- pipe_code="test_pipe",- output_dir=tmp_path,- )-- assert result == expected_result-- async def test_passes_pipe_code_to_generate(- self,- mocker: MockerFixture,- tmp_path: Path,- ) -> None:- """Should pass pipe_code through to generate_graph_outputs."""- mock_graph_spec = mocker.MagicMock()- mock_graph_config = mocker.MagicMock()-- mock_generate = mocker.patch(- f"{GRAPH_RENDERING_MODULE}.generate_graph_outputs",- new_callable=mocker.AsyncMock,- return_value=mocker.MagicMock(),- )- mocker.patch(- f"{GRAPH_RENDERING_MODULE}.save_graph_outputs_to_dir",- return_value={},- )-- await render_graph_from_spec(- graph_spec=mock_graph_spec,- graph_config=mock_graph_config,- include_mermaidflow=False,- include_reactflow=True,- pipe_code="my_pipeline",- output_dir=tmp_path,- )-- assert mock_generate.call_args.kwargs["pipe_code"] == "my_pipeline"-- async def test_saves_to_correct_output_dir(- self,- mocker: MockerFixture,- tmp_path: Path,- ) -> None:- """Should pass output_dir to save_graph_outputs_to_dir."""- mock_graph_spec = mocker.MagicMock()- mock_graph_config = mocker.MagicMock()-- mocker.patch(- f"{GRAPH_RENDERING_MODULE}.generate_graph_outputs",- new_callable=mocker.AsyncMock,- return_value=mocker.MagicMock(),- )- mock_save = mocker.patch(- f"{GRAPH_RENDERING_MODULE}.save_graph_outputs_to_dir",- return_value={},- )-- await render_graph_from_spec(- graph_spec=mock_graph_spec,- graph_config=mock_graph_config,- include_mermaidflow=True,- include_reactflow=True,- pipe_code="test_pipe",- output_dir=tmp_path,- )-- assert mock_save.call_args.kwargs["output_dir"] == tmp_path-- async def test_passes_optional_params_to_generate(- self,- mocker: MockerFixture,- tmp_path: Path,- ) -> None:- """Should forward title, direction, and include_subgraphs to generate_graph_outputs."""- mock_graph_spec = mocker.MagicMock()- mock_graph_config = mocker.MagicMock()-- mock_generate = mocker.patch(- f"{GRAPH_RENDERING_MODULE}.generate_graph_outputs",- new_callable=mocker.AsyncMock,- return_value=mocker.MagicMock(),- )- mocker.patch(- f"{GRAPH_RENDERING_MODULE}.save_graph_outputs_to_dir",- return_value={},- )-- await render_graph_from_spec(- graph_spec=mock_graph_spec,- graph_config=mock_graph_config,- include_mermaidflow=True,- include_reactflow=False,- output_dir=tmp_path,- title="My Title",- direction=FlowchartDirection.TOP_DOWN,- include_subgraphs=False,- )-- call_kwargs = mock_generate.call_args.kwargs- assert call_kwargs["title"] == "My Title"- assert call_kwargs["direction"] == FlowchartDirection.TOP_DOWN- assert call_kwargs["include_subgraphs"] is Falsediff --git a/tests/unit/pipelex/cli/test_run_core_wrapper.py b/tests/unit/pipelex/cli/test_run_core_wrapper.pyindex 8fd9cb10b..00da9962f 100644--- a/tests/unit/pipelex/cli/test_run_core_wrapper.py+++ b/tests/unit/pipelex/cli/test_run_core_wrapper.py@@ -17,7 +17,7 @@ from pipelex.cli.error_handlers import ErrorContextfrom pipelex.cogt.model_backends.model_type import ModelTypefrom pipelex.core.pipes.exceptions import PipeOperatorModelChoiceErrorfrom pipelex.pipe_operators.exceptions import PipeOperatorModelAvailabilityError-from pipelex.pipe_run.pipe_run_mode import PipeRunMode+from pipelex.system.pipe_run_mode import PipeRunModeif TYPE_CHECKING:from pytest_mock import MockerFixturediff --git a/tests/unit/pipelex/cli/test_traceback_flag_run_core.py b/tests/unit/pipelex/cli/test_traceback_flag_run_core.pyindex 9c8ce44a3..d94fa1f30 100644--- a/tests/unit/pipelex/cli/test_traceback_flag_run_core.py+++ b/tests/unit/pipelex/cli/test_traceback_flag_run_core.py@@ -21,8 +21,8 @@ if TYPE_CHECKING:from pytest_mock import MockerFixturefrom pipelex.cli.commands.run._run_core import _execute_run # noqa: PLC2701 # pyright: ignore[reportPrivateUsage]-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.exceptions import PipelineExecutionError+from pipelex.system.pipe_run_mode import PipeRunModeOUTPUT_DIR = "temp/test_outputs"diff --git a/tests/unit/pipelex/cogt/content_generation/test_assignment_models_schema.py b/tests/unit/pipelex/cogt/content_generation/test_assignment_models_schema.pyindex f4847643c..a1aa73f7d 100644--- a/tests/unit/pipelex/cogt/content_generation/test_assignment_models_schema.py+++ b/tests/unit/pipelex/cogt/content_generation/test_assignment_models_schema.py@@ -6,8 +6,8 @@ from pipelex.cogt.content_generation.assignment_models import LLMAssignment, Objfrom pipelex.cogt.content_generation.cogt_run_params import CogtRunParamsfrom pipelex.cogt.llm.llm_prompt import LLMPromptfrom pipelex.cogt.llm.llm_setting import LLMSetting-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModeclass SampleOutputModel(BaseModel):diff --git a/tests/unit/pipelex/cogt/content_generation/test_assignment_models_security.py b/tests/unit/pipelex/cogt/content_generation/test_assignment_models_security.pyindex ae2e1a1f9..e0ba4e674 100644--- a/tests/unit/pipelex/cogt/content_generation/test_assignment_models_security.py+++ b/tests/unit/pipelex/cogt/content_generation/test_assignment_models_security.py@@ -13,8 +13,8 @@ from pipelex.cogt.content_generation.exceptions import UnsafeSchemaErrorfrom pipelex.cogt.content_generation.schema_to_model_factory import SchemaToModelFactoryfrom pipelex.cogt.llm.llm_prompt import LLMPromptfrom pipelex.cogt.llm.llm_setting import LLMSetting-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModedef _make_stub_job_metadata() -> JobMetadata:diff --git a/tests/unit/pipelex/cogt/content_generation/test_dry_mock.py b/tests/unit/pipelex/cogt/content_generation/test_dry_mock.pyindex e899f4c76..10dfebf6c 100644--- a/tests/unit/pipelex/cogt/content_generation/test_dry_mock.py+++ b/tests/unit/pipelex/cogt/content_generation/test_dry_mock.py@@ -25,8 +25,8 @@ from pipelex.cogt.llm.llm_prompt import LLMPromptfrom pipelex.cogt.llm.llm_setting import LLMSettingfrom pipelex.cogt.usage.cost_registry import CostRegistryfrom pipelex.core.stuffs.text_content import TextContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModedef _dry_object_assignment() -> ObjectAssignment:diff --git a/tests/unit/pipelex/cogt/content_generation/test_extract_generate_dry_branch.py b/tests/unit/pipelex/cogt/content_generation/test_extract_generate_dry_branch.pyindex d157adde5..fe6bace32 100644--- a/tests/unit/pipelex/cogt/content_generation/test_extract_generate_dry_branch.py+++ b/tests/unit/pipelex/cogt/content_generation/test_extract_generate_dry_branch.py@@ -15,8 +15,8 @@ from pipelex.cogt.content_generation.extract_generate import extract_gen_pages_afrom pipelex.cogt.extract.extract_input import ExtractInputfrom pipelex.cogt.extract.extract_job_components import ExtractJobConfig, ExtractJobParamsfrom pipelex.config import get_config-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModeclass TestExtractGenerateDryBranch:diff --git a/tests/unit/pipelex/cogt/content_generation/test_img_gen_generate_dry_branch.py b/tests/unit/pipelex/cogt/content_generation/test_img_gen_generate_dry_branch.pyindex 810ca1756..859f38ed3 100644--- a/tests/unit/pipelex/cogt/content_generation/test_img_gen_generate_dry_branch.py+++ b/tests/unit/pipelex/cogt/content_generation/test_img_gen_generate_dry_branch.py@@ -14,8 +14,8 @@ from pipelex.cogt.content_generation.cogt_run_params import CogtRunParamsfrom pipelex.cogt.content_generation.img_gen_generate import img_gen_image_list_and_store, img_gen_single_image_and_storefrom pipelex.cogt.img_gen.img_gen_job_components import AspectRatio, Background, ImgGenJobConfig, ImgGenJobParamsfrom pipelex.cogt.img_gen.img_gen_prompt import ImgGenPrompt-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModeclass TestImgGenGenerateDryBranch:diff --git a/tests/unit/pipelex/cogt/content_generation/test_llm_generate_dry_branch.py b/tests/unit/pipelex/cogt/content_generation/test_llm_generate_dry_branch.pyindex 51f8babf5..e17240541 100644--- a/tests/unit/pipelex/cogt/content_generation/test_llm_generate_dry_branch.py+++ b/tests/unit/pipelex/cogt/content_generation/test_llm_generate_dry_branch.py@@ -22,8 +22,8 @@ from pipelex.cogt.content_generation.llm_generate import llm_gen_textfrom pipelex.cogt.llm.llm_prompt import LLMPromptfrom pipelex.cogt.llm.llm_setting import LLMSettingfrom pipelex.cogt.usage.cost_registry import CostRegistry-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModeclass TestLlmGenerateDryBranch:diff --git a/tests/unit/pipelex/cogt/content_generation/test_render_generate_dry_branch.py b/tests/unit/pipelex/cogt/content_generation/test_render_generate_dry_branch.pyindex f60f2e0bf..2c3cf34c8 100644--- a/tests/unit/pipelex/cogt/content_generation/test_render_generate_dry_branch.py+++ b/tests/unit/pipelex/cogt/content_generation/test_render_generate_dry_branch.py@@ -11,8 +11,8 @@ from pipelex.cogt.content_generation.assignment_models import RenderPageViewsAssfrom pipelex.cogt.content_generation.cogt_run_params import CogtRunParamsfrom pipelex.cogt.content_generation.render_generate import render_page_views_and_storefrom pipelex.config import get_config-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModeclass TestRenderGenerateDryBranch:diff --git a/tests/unit/pipelex/cogt/content_generation/test_search_generate_dry_branch.py b/tests/unit/pipelex/cogt/content_generation/test_search_generate_dry_branch.pyindex 091e360cb..b60597912 100644--- a/tests/unit/pipelex/cogt/content_generation/test_search_generate_dry_branch.py+++ b/tests/unit/pipelex/cogt/content_generation/test_search_generate_dry_branch.py@@ -15,8 +15,8 @@ from pipelex.cogt.content_generation.search_generate import search_gen_sourced_afrom pipelex.cogt.search.search_setting import SearchSettingfrom pipelex.config import get_configfrom pipelex.core.stuffs.search_result_content import SearchResultContent-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModeclass TestSearchGenerateDryBranch:diff --git a/tests/unit/pipelex/cogt/content_generation/test_templating_generate_dry_branch.py b/tests/unit/pipelex/cogt/content_generation/test_templating_generate_dry_branch.pyindex ddc2117c7..e55d401f5 100644--- a/tests/unit/pipelex/cogt/content_generation/test_templating_generate_dry_branch.py+++ b/tests/unit/pipelex/cogt/content_generation/test_templating_generate_dry_branch.py@@ -11,8 +11,8 @@ from pytest_mock import MockerFixturefrom pipelex.cogt.content_generation.assignment_models import TemplatingAssignmentfrom pipelex.cogt.content_generation.cogt_run_params import CogtRunParamsfrom pipelex.cogt.content_generation.templating_generate import templating_gen_text-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.tools.jinja2.exceptions import Jinja2TemplateSyntaxErrorfrom pipelex.tools.jinja2.template_category import TemplateCategorydiff --git a/tests/unit/pipelex/core/concepts/test_special_args_concept.py b/tests/unit/pipelex/core/concepts/test_special_args_concept.pyindex bf173c3ea..c3851c017 100644--- a/tests/unit/pipelex/core/concepts/test_special_args_concept.py+++ b/tests/unit/pipelex/core/concepts/test_special_args_concept.py@@ -16,9 +16,9 @@ from pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.llm.pipe_llm import PipeLLMfrom pipelex.pipe_operators.llm.pipe_llm_blueprint import PipeLLMBlueprintfrom pipelex.pipe_run.pipe_job_factory import PipeJobFactory-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.dry_runnablediff --git a/tests/unit/pipelex/exceptions/test_class_level_metadata.py b/tests/unit/pipelex/exceptions/test_class_level_metadata.pyindex 6956abf81..4294505c3 100644--- a/tests/unit/pipelex/exceptions/test_class_level_metadata.py+++ b/tests/unit/pipelex/exceptions/test_class_level_metadata.py@@ -18,10 +18,10 @@ from pipelex.cogt.exceptions import ()from pipelex.core.stuffs.exceptions import DateContentErrorfrom pipelex.mthds_parsing.exceptions import MthdsParserError-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipeline.exceptions import PipeExecutionError, PipelineExecutionError, ValidateBundleErrorfrom pipelex.plugins.exceptions import UnknownSecretsMethodError, UnknownStorageMethodErrorfrom pipelex.system.exceptions import EnvVarNotFoundError+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.pipelex_service.exceptions import (GatewayTermsNotAcceptedError,PipelexServiceConfigValidationError,diff --git a/tests/unit/pipelex/exceptions/test_wrapper_error_enrichment.py b/tests/unit/pipelex/exceptions/test_wrapper_error_enrichment.pyindex e1b88a08a..afbd390cd 100644--- a/tests/unit/pipelex/exceptions/test_wrapper_error_enrichment.py+++ b/tests/unit/pipelex/exceptions/test_wrapper_error_enrichment.py@@ -1,9 +1,10 @@from pipelex.base_exceptions import ErrorDomainfrom pipelex.cogt.exceptions import CogtError, InferenceErrorCategoryfrom pipelex.cogt.inference.error_classification import UserAction, UserActionKind-from pipelex.pipe_run.exceptions import PipeRouterError, PipeRunError-from pipelex.pipe_run.pipe_run_mode import PipeRunMode+from pipelex.core.pipes.exceptions import PipeRunError+from pipelex.pipe_run.exceptions import PipeRouterErrorfrom pipelex.pipeline.exceptions import PipelineExecutionError+from pipelex.system.pipe_run_mode import PipeRunModedef _make_pipeline_execution_error(cause: BaseException | None) -> PipelineExecutionError:diff --git a/tests/unit/pipelex/graph/test_graph_rendering.py b/tests/unit/pipelex/graph/test_graph_rendering.pyindex 4fc51a0c4..82dbdc5e6 100644--- a/tests/unit/pipelex/graph/test_graph_rendering.py+++ b/tests/unit/pipelex/graph/test_graph_rendering.py@@ -1,31 +1,193 @@-"""Unit tests for graph rendering helpers."""+"""Unit tests for the shared graph rendering utility."""from __future__ import annotations-from pipelex.graph.graph_rendering import (- _sanitize_graph_name, # noqa: PLC2701 # pyright: ignore[reportPrivateUsage]-)+from typing import TYPE_CHECKING+import pytest-class TestSanitizeGraphName:- """Tests for the _sanitize_graph_name helper that prevents path traversal."""+if TYPE_CHECKING:+ from pathlib import Path- def test_plain_filename(self) -> None:- """A plain filename should pass through unchanged."""- assert _sanitize_graph_name("dry_run.html") == "dry_run.html"+ from pytest_mock import MockerFixture- def test_traversal_stripped(self) -> None:- """Directory traversal components should be stripped."""- assert _sanitize_graph_name("../../etc/passwd") == "passwd"+from pipelex.graph.graph_rendering import render_graph_from_spec+from pipelex.tools.misc.chart_utils import FlowchartDirection- def test_absolute_path_stripped(self) -> None:- """Absolute paths should be reduced to just the filename."""- assert _sanitize_graph_name("/var/data/evil.html") == "evil.html"+GRAPH_RENDERING_MODULE = "pipelex.graph.graph_rendering"- def test_subdirectory_stripped(self) -> None:- """Subdirectory paths should be reduced to just the filename."""- assert _sanitize_graph_name("subdir/graph.html") == "graph.html"- def test_empty_string_returns_default(self) -> None:- """An empty string should return the default filename."""- assert _sanitize_graph_name("") == "graph.html"[email protected](loop_scope="class")+class TestRenderGraphFromSpec:+ """Tests for the render_graph_from_spec utility function."""++ @pytest.mark.parametrize(+ ("include_mermaidflow", "include_reactflow"),+ [+ (True, False),+ (False, True),+ (True, True),+ ],+ )+ async def test_format_selection_sets_correct_inclusion(+ self,+ mocker: MockerFixture,+ tmp_path: Path,+ include_mermaidflow: bool,+ include_reactflow: bool,+ ) -> None:+ """Each format combination should set the correct mermaidflow/reactflow inclusion flags."""+ mock_graph_spec = mocker.MagicMock()+ mock_graph_config = mocker.MagicMock()++ mocker.patch(+ f"{GRAPH_RENDERING_MODULE}.generate_graph_outputs",+ new_callable=mocker.AsyncMock,+ return_value=mocker.MagicMock(),+ )+ mocker.patch(+ f"{GRAPH_RENDERING_MODULE}.save_graph_outputs_to_dir",+ return_value={"reactflow_html": tmp_path / "graph.html"},+ )++ await render_graph_from_spec(+ graph_spec=mock_graph_spec,+ graph_config=mock_graph_config,+ include_mermaidflow=include_mermaidflow,+ include_reactflow=include_reactflow,+ pipe_code="test_pipe",+ output_dir=tmp_path,+ )++ # Verify the config was built with correct inclusion via model_copy chain+ mock_graph_config.model_copy.assert_called_once()+ graphs_inclusion_update = mock_graph_config.graphs_inclusion.model_copy.call_args.kwargs["update"]+ assert graphs_inclusion_update["mermaidflow_html"] is include_mermaidflow+ assert graphs_inclusion_update["reactflow_html"] is include_reactflow++ async def test_returns_saved_files(+ self,+ mocker: MockerFixture,+ tmp_path: Path,+ ) -> None:+ """Should return the dict from save_graph_outputs_to_dir."""+ mock_graph_spec = mocker.MagicMock()+ mock_graph_config = mocker.MagicMock()++ mocker.patch(+ f"{GRAPH_RENDERING_MODULE}.generate_graph_outputs",+ new_callable=mocker.AsyncMock,+ return_value=mocker.MagicMock(),+ )++ expected_result = {"reactflow_html": tmp_path / "reactflow.html"}+ mocker.patch(+ f"{GRAPH_RENDERING_MODULE}.save_graph_outputs_to_dir",+ return_value=expected_result,+ )++ result = await render_graph_from_spec(+ graph_spec=mock_graph_spec,+ graph_config=mock_graph_config,+ include_mermaidflow=False,+ include_reactflow=True,+ pipe_code="test_pipe",+ output_dir=tmp_path,+ )++ assert result == expected_result++ async def test_passes_pipe_code_to_generate(+ self,+ mocker: MockerFixture,+ tmp_path: Path,+ ) -> None:+ """Should pass pipe_code through to generate_graph_outputs."""+ mock_graph_spec = mocker.MagicMock()+ mock_graph_config = mocker.MagicMock()++ mock_generate = mocker.patch(+ f"{GRAPH_RENDERING_MODULE}.generate_graph_outputs",+ new_callable=mocker.AsyncMock,+ return_value=mocker.MagicMock(),+ )+ mocker.patch(+ f"{GRAPH_RENDERING_MODULE}.save_graph_outputs_to_dir",+ return_value={},+ )++ await render_graph_from_spec(+ graph_spec=mock_graph_spec,+ graph_config=mock_graph_config,+ include_mermaidflow=False,+ include_reactflow=True,+ pipe_code="my_pipeline",+ output_dir=tmp_path,+ )++ assert mock_generate.call_args.kwargs["pipe_code"] == "my_pipeline"++ async def test_saves_to_correct_output_dir(+ self,+ mocker: MockerFixture,+ tmp_path: Path,+ ) -> None:+ """Should pass output_dir to save_graph_outputs_to_dir."""+ mock_graph_spec = mocker.MagicMock()+ mock_graph_config = mocker.MagicMock()++ mocker.patch(+ f"{GRAPH_RENDERING_MODULE}.generate_graph_outputs",+ new_callable=mocker.AsyncMock,+ return_value=mocker.MagicMock(),+ )+ mock_save = mocker.patch(+ f"{GRAPH_RENDERING_MODULE}.save_graph_outputs_to_dir",+ return_value={},+ )++ await render_graph_from_spec(+ graph_spec=mock_graph_spec,+ graph_config=mock_graph_config,+ include_mermaidflow=True,+ include_reactflow=True,+ pipe_code="test_pipe",+ output_dir=tmp_path,+ )++ assert mock_save.call_args.kwargs["output_dir"] == tmp_path++ async def test_passes_optional_params_to_generate(+ self,+ mocker: MockerFixture,+ tmp_path: Path,+ ) -> None:+ """Should forward title, direction, and include_subgraphs to generate_graph_outputs."""+ mock_graph_spec = mocker.MagicMock()+ mock_graph_config = mocker.MagicMock()++ mock_generate = mocker.patch(+ f"{GRAPH_RENDERING_MODULE}.generate_graph_outputs",+ new_callable=mocker.AsyncMock,+ return_value=mocker.MagicMock(),+ )+ mocker.patch(+ f"{GRAPH_RENDERING_MODULE}.save_graph_outputs_to_dir",+ return_value={},+ )++ await render_graph_from_spec(+ graph_spec=mock_graph_spec,+ graph_config=mock_graph_config,+ include_mermaidflow=True,+ include_reactflow=False,+ output_dir=tmp_path,+ title="My Title",+ direction=FlowchartDirection.TOP_DOWN,+ include_subgraphs=False,+ )++ call_kwargs = mock_generate.call_args.kwargs+ assert call_kwargs["title"] == "My Title"+ assert call_kwargs["direction"] == FlowchartDirection.TOP_DOWN+ assert call_kwargs["include_subgraphs"] is Falsediff --git a/tests/unit/pipelex/pipe_machinery/test_pipe_validate_before_run.py b/tests/unit/pipelex/pipe_machinery/test_pipe_validate_before_run.pyindex 843662f8f..419a5cd29 100644--- a/tests/unit/pipelex/pipe_machinery/test_pipe_validate_before_run.py+++ b/tests/unit/pipelex/pipe_machinery/test_pipe_validate_before_run.py@@ -13,9 +13,9 @@ from pipelex.interpreter_hub import get_concept_libraryfrom pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.llm.pipe_llm import PipeLLMfrom pipelex.pipe_operators.llm.pipe_llm_blueprint import PipeLLMBlueprint-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.asyncio(loop_scope="class")diff --git a/tests/unit/pipelex/pipe_operators/pipe_func/test_direct_executor_workdir.py b/tests/unit/pipelex/pipe_operators/pipe_func/test_direct_executor_workdir.pyindex b3c77e0c1..3c53a8357 100644--- a/tests/unit/pipelex/pipe_operators/pipe_func/test_direct_executor_workdir.py+++ b/tests/unit/pipelex/pipe_operators/pipe_func/test_direct_executor_workdir.py@@ -14,9 +14,9 @@ from pipelex.libraries.library_crate import LibraryCratefrom pipelex.pipe_operators.func import direct_pipe_func_executorfrom pipelex.pipe_operators.func.direct_pipe_func_executor import DirectPipeFuncExecutorfrom pipelex.pipe_operators.func.pipe_func_execution_dtos import PipeFuncExecutionRequest-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import PipeRunParamsfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode# A method whose ONLY custom source is the PipeFunc — its output structure (Greeting) is a concept# declared in the .mthds, NOT a shipped .py. The box must regenerate `structures.py` from the crate'sdiff --git a/tests/unit/pipelex/pipe_operators/pipe_func/test_pipe_func_execution_transport.py b/tests/unit/pipelex/pipe_operators/pipe_func/test_pipe_func_execution_transport.pyindex 55b295d73..c38ba3f47 100644--- a/tests/unit/pipelex/pipe_operators/pipe_func/test_pipe_func_execution_transport.py+++ b/tests/unit/pipelex/pipe_operators/pipe_func/test_pipe_func_execution_transport.py@@ -15,9 +15,9 @@ from pipelex.pipe_operators.func.pipe_func_execution_transport import (PipeFuncExecutionRequest,PipeFuncExecutionResponse,)-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import PipeRunParamsfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModeclass TestPipeFuncExecutionTransport:diff --git a/tests/unit/pipelex/pipe_operators/pipe_func/test_pipe_func_hosted_mode.py b/tests/unit/pipelex/pipe_operators/pipe_func/test_pipe_func_hosted_mode.pyindex 918c39637..1944e9ce9 100644--- a/tests/unit/pipelex/pipe_operators/pipe_func/test_pipe_func_hosted_mode.py+++ b/tests/unit/pipelex/pipe_operators/pipe_func/test_pipe_func_hosted_mode.py@@ -9,9 +9,9 @@ from pipelex.core.stuffs.list_content import ListContentfrom pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.func.pipe_func import PipeFuncfrom pipelex.pipe_operators.func.pipe_func_blueprint import PipeFuncBlueprint-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import PipeRunParamsfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunMode_UNREGISTERED = PipeFuncBlueprint(description="Hosted-mode case: function lives only in the sandbox, never in this process.",diff --git a/tests/unit/pipelex/pipe_operators/pipe_llm/test_pipe_llm_dynamic_output.py b/tests/unit/pipelex/pipe_operators/pipe_llm/test_pipe_llm_dynamic_output.pyindex 66c97615c..fed080415 100644--- a/tests/unit/pipelex/pipe_operators/pipe_llm/test_pipe_llm_dynamic_output.py+++ b/tests/unit/pipelex/pipe_operators/pipe_llm/test_pipe_llm_dynamic_output.py@@ -23,8 +23,8 @@ from pipelex.core.domains.domain import SpecialDomainfrom pipelex.pipe_machinery.pipe_factory import PipeFactoryfrom pipelex.pipe_operators.llm.pipe_llm import PipeLLMfrom pipelex.pipe_operators.llm.pipe_llm_blueprint import PipeLLMBlueprint-from pipelex.pipe_run.pipe_run_params import PipeRunParamKeyfrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactory+from pipelex.system.pipe_run_param_key import PipeRunParamKeydef _make_pipe(domain_code: str, pipe_code: str, output: str) -> PipeLLM:diff --git a/tests/unit/pipelex/pipe_run/test_cogt_run_params_carrier.py b/tests/unit/pipelex/pipe_run/test_cogt_run_params_carrier.pyindex c8394cc78..42197d627 100644--- a/tests/unit/pipelex/pipe_run/test_cogt_run_params_carrier.py+++ b/tests/unit/pipelex/pipe_run/test_cogt_run_params_carrier.py@@ -11,9 +11,9 @@ from pydantic import ValidationErrorfrom pytest_mock import MockerFixturefrom pipelex.cogt.content_generation.cogt_run_params import CogtRunParams-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import PipeRunParamsfrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactory+from pipelex.system.pipe_run_mode import PipeRunModeclass TestCogtRunParamsCarrier:diff --git a/tests/unit/pipelex/pipe_run/test_pipe_router_run.py b/tests/unit/pipelex/pipe_run/test_pipe_router_run.pyindex 8c5408a8c..d58bd43a3 100644--- a/tests/unit/pipelex/pipe_run/test_pipe_router_run.py+++ b/tests/unit/pipelex/pipe_run/test_pipe_router_run.py@@ -4,14 +4,15 @@ import pytestfrom typing_extensions import overridefrom pipelex.cogt.exceptions import CogtError, InferenceErrorCategory+from pipelex.core.pipes.exceptions import PipeRunErrorfrom pipelex.core.pipes.pipe_output import PipeOutputfrom pipelex.observer.observer_protocol import ObserverNoOp-from pipelex.pipe_run.exceptions import PipeRouterError, PipeRunError+from pipelex.pipe_run.exceptions import PipeRouterErrorfrom pipelex.pipe_run.pipe_job import PipeJobfrom pipelex.pipe_run.pipe_router_protocol import PipeRouterProtocol-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactoryfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModeif TYPE_CHECKING:from pipelex.pipe_machinery.pipe_abstract import PipeAbstractdiff --git a/tests/unit/pipelex/pipe_run/test_pipe_run.py b/tests/unit/pipelex/pipe_run/test_pipe_run.pyindex 18125fef8..872aa9a93 100644--- a/tests/unit/pipelex/pipe_run/test_pipe_run.py+++ b/tests/unit/pipelex/pipe_run/test_pipe_run.py@@ -4,7 +4,7 @@ from pytest_mock import MockerFixturefrom pipelex.pipe_run.delivery_assignment import DeliveryAssignment, StorageTargetfrom pipelex.pipe_run.exceptions import PipeRouterError, WebhookDeliveryErrorfrom pipelex.pipe_run.pipe_run import PipeRun-from pipelex.pipe_run.pipe_run_mode import PipeRunMode+from pipelex.system.pipe_run_mode import PipeRunMode@pytest.mark.asyncio(loop_scope="class")diff --git a/tests/unit/pipelex/pipe_run/test_pipe_run_params_isolation.py b/tests/unit/pipelex/pipe_run/test_pipe_run_params_isolation.pyindex 7abb7ec43..1ce444a13 100644--- a/tests/unit/pipelex/pipe_run/test_pipe_run_params_isolation.py+++ b/tests/unit/pipelex/pipe_run/test_pipe_run_params_isolation.py@@ -1,5 +1,5 @@-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_params import PipeRunParams+from pipelex.system.pipe_run_mode import PipeRunModeclass TestPipeRunParamsIsolation:diff --git a/tests/unit/pipelex/pipe_run/test_tracing_assembly.py b/tests/unit/pipelex/pipe_run/test_tracing_assembly.pyindex 4d605103d..07dff22f8 100644--- a/tests/unit/pipelex/pipe_run/test_tracing_assembly.py+++ b/tests/unit/pipelex/pipe_run/test_tracing_assembly.py@@ -11,10 +11,10 @@ from pipelex.cogt.usage.cost_category import CostCategoryfrom pipelex.cogt.usage.token_category import TokenCategoryfrom pipelex.core.pipes.pipe_output import PipeOutputfrom pipelex.graph.graphspec import GraphSpecMode-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.tracing_assembly import TracingAssembly, assemble_tracing, assemble_tracing_on_outputfrom pipelex.system.exceptions import MissingDependencyErrorfrom pipelex.system.job_metadata import JobMetadata+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.tracing.exceptions import EventLogReadError, EventLogSetupErrorfrom pipelex.tracing.trace_events import UsageReportEventdiff --git a/tests/unit/pipelex/graph/test_graph_rendering_dry_run_bundle.py b/tests/unit/pipelex/pipeline/test_bundle_graph_rendering_dry_run.pysimilarity index 88%rename from tests/unit/pipelex/graph/test_graph_rendering_dry_run_bundle.pyrename to tests/unit/pipelex/pipeline/test_bundle_graph_rendering_dry_run.pyindex 61e54bac7..8f0f05b1e 100644--- a/tests/unit/pipelex/graph/test_graph_rendering_dry_run_bundle.py+++ b/tests/unit/pipelex/pipeline/test_bundle_graph_rendering_dry_run.py@@ -1,4 +1,4 @@-"""Unit tests for the bundle dry-run helper in graph rendering."""+"""Unit tests for the bundle dry-run helper behind bundle graph rendering."""from __future__ import annotations@@ -6,7 +6,7 @@ from typing import TYPE_CHECKINGimport pytest-from pipelex.graph.graph_rendering import (+from pipelex.pipeline.bundle_graph_rendering import (_dry_run_bundle, # noqa: PLC2701 # pyright: ignore[reportPrivateUsage])@@ -15,7 +15,7 @@ if TYPE_CHECKING:from pytest_mock import MockerFixture-GRAPH_RENDERING_MODULE = "pipelex.graph.graph_rendering"+BUNDLE_GRAPH_RENDERING_MODULE = "pipelex.pipeline.bundle_graph_rendering"BUNDLE_CONTENT = 'domain = "test_domain"\nmain_pipe = "test_pipe"\n'@@ -35,7 +35,7 @@ class TestDryRunBundle:graph_spec_mock = mocker.MagicMock()mock_dry_run = mocker.patch(- f"{GRAPH_RENDERING_MODULE}.dry_run_pipeline",+ f"{BUNDLE_GRAPH_RENDERING_MODULE}.dry_run_pipeline",new_callable=mocker.AsyncMock,return_value=(graph_spec_mock, "pipe_code"),)@@ -58,7 +58,7 @@ class TestDryRunBundle:bundle_path.write_text(BUNDLE_CONTENT, encoding="utf-8")mock_dry_run = mocker.patch(- f"{GRAPH_RENDERING_MODULE}.dry_run_pipeline",+ f"{BUNDLE_GRAPH_RENDERING_MODULE}.dry_run_pipeline",new_callable=mocker.AsyncMock,return_value=(mocker.MagicMock(), "pipe_code"),)@@ -80,7 +80,7 @@ class TestDryRunBundle:bundle_path.write_text(BUNDLE_CONTENT, encoding="utf-8")mock_dry_run = mocker.patch(- f"{GRAPH_RENDERING_MODULE}.dry_run_pipeline",+ f"{BUNDLE_GRAPH_RENDERING_MODULE}.dry_run_pipeline",new_callable=mocker.AsyncMock,return_value=(mocker.MagicMock(), "pipe_code"),)diff --git a/tests/unit/pipelex/graph/test_graph_rendering_generate_graph.py b/tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_graph.pysimilarity index 81%rename from tests/unit/pipelex/graph/test_graph_rendering_generate_graph.pyrename to tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_graph.pyindex 329d4af21..4846f9393 100644--- a/tests/unit/pipelex/graph/test_graph_rendering_generate_graph.py+++ b/tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_graph.py@@ -6,7 +6,8 @@ from typing import TYPE_CHECKING, Anyimport pytest-from pipelex.graph.graph_rendering import GraphFormat, generate_graph_for_bundle+from pipelex.graph.graph_rendering import GraphFormat+from pipelex.pipeline.bundle_graph_rendering import generate_graph_for_bundlefrom pipelex.tools.misc.chart_utils import FlowchartDirectionif TYPE_CHECKING:@@ -14,7 +15,7 @@ if TYPE_CHECKING:from pytest_mock import MockerFixture-GRAPH_RENDERING_MODULE = "pipelex.graph.graph_rendering"+BUNDLE_GRAPH_RENDERING_MODULE = "pipelex.pipeline.bundle_graph_rendering"BUNDLE_CONTENT = 'domain = "test_domain"\nmain_pipe = "test_pipe"\n'@@ -29,13 +30,19 @@ class TestGenerateGraphForBundle:tmp_path: Path,saved_files: dict[str, Path],) -> dict[str, Any]:- """Create the bundle file and patch the graph_rendering collaborators."""+ """Create the bundle file and patch the bundle_graph_rendering collaborators.++ The renderer is patched as a whole: since the split, `render_graph_from_spec` lives in the+ runtime-layer `pipelex.graph.graph_rendering` and is this module's collaborator, not its+ internals. How it maps the inclusion flags onto the graph config is its own test's business+ (`tests/unit/pipelex/graph/test_graph_rendering.py`); what belongs here is the dispatch.+ """bundle_path = tmp_path / "bundle.mthds"bundle_path.write_text(BUNDLE_CONTENT, encoding="utf-8")graph_spec_mock = mocker.MagicMock()mock_dry_run = mocker.patch(- f"{GRAPH_RENDERING_MODULE}.dry_run_pipeline",+ f"{BUNDLE_GRAPH_RENDERING_MODULE}.dry_run_pipeline",new_callable=mocker.AsyncMock,return_value=(graph_spec_mock, "pipe_code"),)@@ -43,15 +50,11 @@ class TestGenerateGraphForBundle:execution_config_mock = mocker.MagicMock()config_mock = mocker.MagicMock()config_mock.pipelex.pipeline_execution_config.with_execution_overrides.return_value = execution_config_mock- mocker.patch(f"{GRAPH_RENDERING_MODULE}.get_config", return_value=config_mock)+ mocker.patch(f"{BUNDLE_GRAPH_RENDERING_MODULE}.get_config", return_value=config_mock)- mock_generate = mocker.patch(- f"{GRAPH_RENDERING_MODULE}.generate_graph_outputs",+ mock_render = mocker.patch(+ f"{BUNDLE_GRAPH_RENDERING_MODULE}.render_graph_from_spec",new_callable=mocker.AsyncMock,- return_value=mocker.MagicMock(),- )- mock_save = mocker.patch(- f"{GRAPH_RENDERING_MODULE}.save_graph_outputs_to_dir",return_value=saved_files,)@@ -61,8 +64,7 @@ class TestGenerateGraphForBundle:"mock_dry_run": mock_dry_run,"config_mock": config_mock,"execution_config_mock": execution_config_mock,- "mock_generate": mock_generate,- "mock_save": mock_save,+ "mock_render": mock_render,}@pytest.mark.parametrize(@@ -89,10 +91,10 @@ class TestGenerateGraphForBundle:graph_format=graph_format,)- execution_config_mock = mocks["execution_config_mock"]- graphs_inclusion_update = execution_config_mock.graph_config.graphs_inclusion.model_copy.call_args.kwargs["update"]- assert graphs_inclusion_update["mermaidflow_html"] is expected_mermaidflow- assert graphs_inclusion_update["reactflow_html"] is expected_reactflow+ render_kwargs = mocks["mock_render"].call_args.kwargs+ assert render_kwargs["include_mermaidflow"] is expected_mermaidflow+ assert render_kwargs["include_reactflow"] is expected_reactflow+ assert render_kwargs["graph_config"] is mocks["execution_config_mock"].graph_configoverrides_kwargs = mocks["config_mock"].pipelex.pipeline_execution_config.with_execution_overrides.call_args.kwargsassert overrides_kwargs == {"generate_graph": True, "mock_inputs": True}diff --git a/tests/unit/pipelex/graph/test_graph_rendering_generate_view.py b/tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_view.pysimilarity index 92%rename from tests/unit/pipelex/graph/test_graph_rendering_generate_view.pyrename to tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_view.pyindex f3a80f264..681cbd014 100644--- a/tests/unit/pipelex/graph/test_graph_rendering_generate_view.py+++ b/tests/unit/pipelex/pipeline/test_bundle_graph_rendering_generate_view.py@@ -6,7 +6,7 @@ from typing import TYPE_CHECKING, Anyimport pytest-from pipelex.graph.graph_rendering import generate_view_for_bundle+from pipelex.pipeline.bundle_graph_rendering import generate_view_for_bundlefrom pipelex.tools.misc.chart_utils import FlowchartDirectionif TYPE_CHECKING:@@ -14,7 +14,7 @@ if TYPE_CHECKING:from pytest_mock import MockerFixture-GRAPH_RENDERING_MODULE = "pipelex.graph.graph_rendering"+BUNDLE_GRAPH_RENDERING_MODULE = "pipelex.pipeline.bundle_graph_rendering"BUNDLE_CONTENT = 'domain = "test_domain"\nmain_pipe = "test_pipe"\n'@@ -36,7 +36,7 @@ class TestGenerateViewForBundle:graph_spec_mock = mocker.MagicMock()graph_spec_mock.model_dump.return_value = {"nodes": "node_payload", "edges": "edge_payload"}dry_run_mock = mocker.patch(- f"{GRAPH_RENDERING_MODULE}.dry_run_pipeline",+ f"{BUNDLE_GRAPH_RENDERING_MODULE}.dry_run_pipeline",new_callable=mocker.AsyncMock,return_value=(graph_spec_mock, "pipe_code"),)@@ -45,7 +45,7 @@ class TestGenerateViewForBundle:execution_config_mock.graph_config.reactflow_config.layout_direction = config_layout_directionconfig_mock = mocker.MagicMock()config_mock.pipelex.pipeline_execution_config.with_execution_overrides.return_value = execution_config_mock- mocker.patch(f"{GRAPH_RENDERING_MODULE}.get_config", return_value=config_mock)+ mocker.patch(f"{BUNDLE_GRAPH_RENDERING_MODULE}.get_config", return_value=config_mock)return bundle_path, graph_spec_mock, dry_run_mockdiff --git a/tests/unit/pipelex/pipeline/test_bundle_graph_rendering_sanitize.py b/tests/unit/pipelex/pipeline/test_bundle_graph_rendering_sanitize.pynew file mode 100644index 000000000..e9d77f051--- /dev/null+++ b/tests/unit/pipelex/pipeline/test_bundle_graph_rendering_sanitize.py@@ -0,0 +1,31 @@+"""Unit tests for the bundle graph output-filename sanitizer."""++from __future__ import annotations++from pipelex.pipeline.bundle_graph_rendering import (+ _sanitize_graph_name, # noqa: PLC2701 # pyright: ignore[reportPrivateUsage]+)+++class TestSanitizeGraphName:+ """Tests for the _sanitize_graph_name helper that prevents path traversal."""++ def test_plain_filename(self) -> None:+ """A plain filename should pass through unchanged."""+ assert _sanitize_graph_name("dry_run.html") == "dry_run.html"++ def test_traversal_stripped(self) -> None:+ """Directory traversal components should be stripped."""+ assert _sanitize_graph_name("../../etc/passwd") == "passwd"++ def test_absolute_path_stripped(self) -> None:+ """Absolute paths should be reduced to just the filename."""+ assert _sanitize_graph_name("/var/data/evil.html") == "evil.html"++ def test_subdirectory_stripped(self) -> None:+ """Subdirectory paths should be reduced to just the filename."""+ assert _sanitize_graph_name("subdir/graph.html") == "graph.html"++ def test_empty_string_returns_default(self) -> None:+ """An empty string should return the default filename."""+ assert _sanitize_graph_name("") == "graph.html"diff --git a/tests/unit/pipelex/pipeline/test_bundle_validator.py b/tests/unit/pipelex/pipeline/test_bundle_validator.pyindex 907899cc3..bee9f49af 100644--- a/tests/unit/pipelex/pipeline/test_bundle_validator.py+++ b/tests/unit/pipelex/pipeline/test_bundle_validator.py@@ -13,10 +13,11 @@ from pydantic import BaseModel, ValidationErrorfrom pytest_mock import MockerFixturefrom pipelex.base_exceptions import PipelexError+from pipelex.core.pipes.exceptions import PipeRunErrorfrom pipelex.libraries.pipe.exceptions import PipeNotFoundError-from pipelex.pipe_run.exceptions import DryRunError, PipeRunError-from pipelex.pipe_run.pipe_run_mode import PipeRunMode+from pipelex.pipe_run.exceptions import DryRunErrorfrom pipelex.pipeline.bundle_validator import BundleValidator, DryRunStatus+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.telemetry.events import EventName, EventPropertydiff --git a/tests/unit/pipelex/pipeline/test_runner_execute_error_paths.py b/tests/unit/pipelex/pipeline/test_runner_execute_error_paths.pyindex 558ee0a50..4f4fc92dd 100644--- a/tests/unit/pipelex/pipeline/test_runner_execute_error_paths.py+++ b/tests/unit/pipelex/pipeline/test_runner_execute_error_paths.py@@ -14,10 +14,10 @@ import pytestfrom pydantic import BaseModel, ValidationErrorfrom typing_extensions import override-from pipelex.pipe_run.pipe_run_mode import PipeRunModefrom pipelex.pipe_run.pipe_run_protocol import PipeRunProtocolfrom pipelex.pipeline.exceptions import PipeExecutionError, PipelineExecutionErrorfrom pipelex.pipeline.runner import PipelexMTHDSProtocol+from pipelex.system.pipe_run_mode import PipeRunModefrom pipelex.system.telemetry.events import EventName, EventProperty, Outcomefrom pipelex.tools.typing.pydantic_utils import format_pydantic_validation_errordiff --git a/tests/unit/pipelex/test_runtime_layer_import_closure.py b/tests/unit/pipelex/test_runtime_layer_import_closure.pyindex 3eab9df8b..830a3a05c 100644--- a/tests/unit/pipelex/test_runtime_layer_import_closure.py+++ b/tests/unit/pipelex/test_runtime_layer_import_closure.py@@ -13,12 +13,15 @@ It does not any more: every one of those modules now lives under `pipe_machineryso the top-level package set says exactly what it means, with no per-module list and no exclusion. Apackage-granular predicate is only honest once the packages match the layers, which is what M1 bought.-Two documented interpreter homes are deliberately absent, and their absence is a known wart rather than-an oversight: `pipeline` and `pipe_run` already leak leaf models into every runtime closure —-`SpecialPipelineId`, `PipeRunMode`. Naming them here would fail the test over a *placement* problem,-not a broken hub arrow. See `wip/pr-1062-review-notes.md`. The third leak of that family is gone:-the bundle validation-error data that `pipeline/` carries into every closure now lives in-`core.exceptions`, beside the two sibling error-data models, so `mthds_parsing` needs no exclusion.+The set below now names every interpreter package, with no exclusion and no qualification. `pipeline`+and `pipe_run` were the last two absent, and their absence was a *placement* problem rather than a+broken hub arrow: four leaf models of theirs landed in every runtime closure, so naming them here+would have failed every entry point over an address. The remedy was the one `mthds_parsing` used —+move the leaves to a runtime-layer home, then widen the predicate. `SpecialPipelineId` is now in+`system.job_metadata` beside the `pipeline_run_id` it names, `PipeRunMode` and `PipeRunParamKey` are+`system.pipe_run_mode` / `system.pipe_run_param_key`, and `PipeRunError` sits in+`core.pipes.exceptions` with the runtime-layer subclasses that derive from it. Moving the leaf is+what buys the clean predicate; excluding it would only have recorded the problem.Run in a subprocess so the closure is exactly what the entry point pulls in: an in-process`sys.modules` check would see everything the test session already imported.@@ -51,6 +54,15 @@ import pytest#: so importing it pulls in every one of them — the broadest single entry point into `pipelex.providers`,#: which is where those adapters now live. The plugin *mechanism* it registers through stayed behind#: in `pipelex.plugins` and is reached from here, so one entry point still covers both halves.+#:+#: `providers.anthropic.anthropic_list` is here because `providers.builtins` turned out **not** to cover+#: it: the vendor plugins import their `*_list` modules inside a function (`# noqa: PLC0415`), so a+#: deferred import hides them from the static graph *and* from the aggregator's own closure. Five of+#: them imported `MissingDependencyError` from the top-level `pipelex.exceptions` aggregate rather than+#: from its definition site in `pipelex.system.exceptions`, and since that aggregate re-exports every+#: interpreter package's errors, each one loaded 15 interpreter modules — inside a package this tuple's+#: sibling declaration already claimed was clean. The import now points at the definition site, per this+#: repo's "direct full-path imports everywhere" rule, and this entry point is what keeps it there.RUNTIME_LAYER_ENTRY_POINTS = ["pipelex.cogt.content_generation.content_generator","pipelex.runtime_hub",@@ -61,6 +73,7 @@ RUNTIME_LAYER_ENTRY_POINTS = ["pipelex.core.pipes.inputs.input_stuff_specs_factory","pipelex.core.pipes.stuff_spec.stuff_spec_factory","pipelex.core.stuffs.stuff_factory",+ "pipelex.providers.anthropic.anthropic_list",]#: The negative control, and the reason it is needed: the detector below is a `textwrap.dedent`@@ -82,9 +95,9 @@ SUBPROCESS_TIMEOUT_SECONDS = 300#:#: A real module-level constant, handed to the subprocess as argv rather than baked into the script#: string below. That is deliberate: while these names lived *inside* the `textwrap.dedent` string,-#: nothing type-checked, linted or grepped them, and reading them back out took a regex. Two-#: documented interpreter homes are absent, and their absence is a known wart rather than an-#: oversight — see this module's docstring.+#: nothing type-checked, linted or grepped them, and reading them back out took a regex. The set is+#: complete — every interpreter package is named — which is what makes the property unqualified;+#: see this module's docstring for the two that were absent longest and why.INTERPRETER_PACKAGES: tuple[str, ...] = ("libraries","pipe_operators",@@ -99,6 +112,9 @@ INTERPRETER_PACKAGES: tuple[str, ...] = ("pipe_signature",# The MTHDS parser and its blueprint, hoisted out of `core/`."mthds_parsing",+ # The two interpreter homes the predicate could not name until their leaf models moved out.+ "pipeline",+ "pipe_run",)_CLOSURE_SCRIPT = textwrap.dedent(diff --git a/wip/drift-contracts/dogfood-log.md b/wip/drift-contracts/dogfood-log.mdindex 7bc17dfd6..754fd9226 100644--- a/wip/drift-contracts/dogfood-log.md+++ b/wip/drift-contracts/dogfood-log.md@@ -32,3 +32,8 @@ One entry per ack. Verdicts: **real-catch** (the review found actual staleness),- **2026-07-28 · cli-docs · real-catch** — first opening for this contract that was *not* a mechanical sweep, and the first that caught real staleness. Triggers were two `build output` help strings: the group help in `build/app.py` advertised "(JSON, Python, or TypeScript)" while `--format` accepts `json|python|schema` (passing `typescript` errors out), and `method_cmd.py`'s `--format` help lacked the TypeScript/Zod parenthetical its `pipe`/`bundle` siblings carry. Reviewing `docs/tools/cli/` against them found `docs/tools/cli/build/index.md` describing the command as "Generate example output JSON for a pipe" — written before `python` and `schema` existed, and stale in the same direction as the help string that opened the contract. `build/output.md` was already accurate (all three subcommands list the three formats; TypeScript is consistently framed as a downstream use of `--format schema`), and `agent_cli/CLAUDE.md` has no `build` command at all, so it was structurally out of scope. Both stale strings fixed before the ack. Worth recording against the four consecutive clean-passes above: this contract's value shows up precisely when a trigger diff is a *user-visible string* rather than an import line — which is the same distinction the content-aware-digest recommendation draws, and further evidence it would preserve the openings that matter while dropping the ones that don't. Note the finding arrived from outside the contract (a developer reported the `typescript` help lie); the contract's contribution was pulling the neighbouring doc table into the same fix instead of leaving it to rot another cycle.- **2026-07-29 · keyword-only-convention · real-catch (eleventh)** — FU-3, and the first opening on this contract where the review target's **prose was the specification the code was changed to satisfy**, not the record that had to catch up. Line 37 had asserted since the registry landed that "the registry is machine-written and sorted by key"; nothing checked it, and the modularity track broke it three times, each found by hand well after the fact. The guard gains an `unsorted-grant` kind and the doc's claim stops being a claim. Five edits, and for the fifth consecutive entry across this log's two active contracts **the enumerations were where the page had to change and three of the five sat away from the paragraph the work is about**: the violation-kinds table under Enforcement, the hook bullet's parenthetical listing which violations are full-scan-only, and the auto-fix paragraph's list of what is never rewritten (which was already carrying only `grant-param-mismatch` and silently omitting `dead-grant`, a pre-existing gap this pass closed as a side effect). The fifth is the one worth naming: the page opens with "A signature is a violation when any of these holds", and registry order is **not** a property of any signature, so adding a sixth bullet there would have been wrong — the honest edit was a pointer line saying the registry carries one rule that is not about a signature at all. A doc whose framing sentence silently excludes a rule it later documents is a shape no mechanical check can see, and it only surfaced because the rule being added did not fit the list. **Eleventh consecutive real-catch on this contract** — but the recorded verdict is narrower than the streak suggests: the doc edits here were going to happen with or without the contract, since the whole item was "enforce what the docs claim". What the contract bought was the *sweep* — the three enumerations, which the implementing change had no reason to visit.- **2026-07-29 · cli-docs · clean-pass** — the first entry in this log for an opening caused by a **merge** rather than by a change, and it exposes a property of the ack model nothing above has hit. Merging `dev` into `refactor/Hub-2` conflicted on `.drift/acks/cli-docs.toml` itself: both branches had acked the same contract, the file holds exactly one ack, and the two sides carried different digests *and* different trigger blobs. Resolving to either side leaves the digest wrong, because the merged trigger content is a third thing — so the contract necessarily reopens on the union of both branches' changes, and the whole modularity sweep (26 `pipelex/cli/**` files) re-presents as unreviewed despite three prior acks on this branch having covered it. **The ack registry has no merge semantics**: an ack is a claim about one linear history, and a merge invalidates both parents' claims by construction. That is not a bug — reopening is the conservative answer — but it means any long-lived branch pays the full review cost of a contract again at every merge, which belongs in the pilot verdict next to the content-aware-digest recommendation the entries above build. Note the two interact: a digest that ignored import-only diffs would have made this reopening nearly free, since 19 of the 26 triggers changed by import line alone. The review itself was cheap and mechanical, per the method recorded above — filtering import lines out of the combined diff left three real changes, all previously reviewed (the `PipelexInterpreter`→`MthdsParser` and `PipelexInterpreterError`→`MthdsParserError` renames, and `build_registrar`'s new arguments) — then both sides were checked live: dev's corrected `build output` help now agrees with the `docs/tools/cli/build/index.md` line dev fixed with it, and the agent-CLI error envelope still reports `error_type: ValidateBundleError` with `MthdsParserError` confined to `error_source`, as the target describes. One durable finding worth keeping beyond the merge question: `agent_cli/CLAUDE.md` survives an error-class rename untouched **because it names the `AGENT_ERROR_HINTS` dict instead of copying its keys** — the exact opposite of the enumeration-copying that the `hub-layering-convention` entries above show rotting on every single opening. Two targets, two contracts, same log: the page that points at its source is the one that never goes stale.+- **2026-07-29 · cli-docs · friction** — the third import-line-only opening on this contract and the second one in two days, so the narrowing proposal recorded above is now backed by more data than the openings it would suppress. Trigger was a single file, `validate/bundle_cmd.py`, and the entire diff is two `from` lines: `generate_graph_for_bundle` / `generate_view_for_bundle` moved to `pipelex.pipeline.bundle_graph_rendering` when `graph_rendering.py` was split along the hub layer boundary. No option, default, enum member, output shape, or error class moved. Both targets were opened and grepped for every moved symbol and both module paths — zero hits, and structurally so: neither `docs/tools/cli/` nor `agent_cli/CLAUDE.md` cites a Python import path anywhere, which is the same *by construction* argument the `config-docs` friction entry makes. Verified live anyway (`--graph-format` still `mermaidflow|reactflow|both`, default `reactflow`, matching both targets verbatim). Recorded as **friction** rather than clean-pass on the distinction this log has already drawn: a clean-pass means the review could have found something and did not; here the trigger and the targets cannot interact. **Narrowing that would have prevented it:** the content-aware digest proposed on 2026-07-28 — ignore diffs confined to `import` / `from` statements. That single change would have suppressed this opening, the `config-docs` one, and made the merge-induced reopening nearly free, while preserving every real-catch this contract has recorded (each involved a user-visible string, never an import).+- **2026-07-29 · hub-layering-convention · real-catch (eleventh)** — the first opening whose trigger is packages being added to `RUNTIME_LAYER_PACKAGES` *for the sake of what the omission was hiding*, and it turns the contract's own recurring failure mode into the finding. For the **fifth consecutive opening** the enumeration under Enforcement was stale — eight packages listed where there are now twelve — and once again it sat in a section the trigger diff never touched. But the substantive edit is the one to record, because it generalizes the page's existing worked example rather than repeating it: `graph/graph_rendering.py` had been reaching `interpreter_hub` through `pipeline.dry_run_pipeline` with every gate green, for the reason the guard's own note states and the page had not drawn a lesson from — rules 1 and 3 both filter candidates through `is_runtime_layer`, so an **undeclared** package is excluded from the rules' domain rather than reported by it. The `pipelex.plugins` breach the transitive rule was built for was a declaration that overreached; this one is a package with no declaration at all, which is strictly harder to see and which no gate in the repo could have surfaced. The page now carries it under Known inversions with the generalized rule — *an undeclared package is not neutral, it is unpoliced* — and the same conclusion under The rule, as the reason to declare a measured-clean package rather than leave it alone. The two prescribed mechanical checks (twelve declared packages named under Enforcement, 32 + 31 hub accessors covered) passed unchanged and were blind to the enumeration rot, **ninth consecutive time**. Method note worth keeping: the negative control was run rather than reasoned about — re-adding the evicted import makes the guard fail with `interpreter-hub-transitive`, where before the declaration it produced no finding at all — which is what turns "the declaration matters" from an argument into a measurement. **Eleventh consecutive real-catch.**+- **2026-07-29 · cli-docs · friction** — fourth consecutive import-line-only opening, and the clearest one yet: two of the three triggers change a single `from` line each (`PipeRunMode` moving to `pipelex.system.pipe_run_mode`), and the third changes a *comment* — the guard's declaration rationale, which no CLI doc has ever described or could. Targets grepped for all four moved symbols and their old module paths: zero hits. Verified the affected surface live anyway (`run pipe --help` still lists `--dry-run` / `--mock-inputs` exactly as `agent-cli.md` lines 37-38 describe). The narrowing case is now overdetermined — the content-aware digest proposed on 2026-07-28 would have suppressed this, the two before it, and made the merge-induced reopening nearly free, while preserving every real-catch this contract has recorded (all of which touched a user-visible string). One further refinement this opening suggests: `pipelex/cli/dev_cli/**` arguably should not be a trigger for this contract at all — the dev CLI is not distributed with the package and neither review target covers it, so it can only ever produce friction here. It already has its own contract in `hub-layering-convention`, which is where its changes were genuinely reviewed.+- **2026-07-29 · hub-layering-convention · real-catch (twelfth)** — the opening that closes the thing this whole log has been watching rot. The caveat that two interpreter-named packages could not be named in the layer predicate was written into **six** places, and the leaf models that made it true moved this phase, so all six went false at once. Four were on the review target and all four were edited: the must-not-name list, the deliberately-absent paragraph, the `core.pipes.pipe_output` parenthetical under Where core splits, and "what the predicate still cannot name" under The property. **Sixth consecutive opening where an enumeration was the rot** — but this one carries the counter-example, and it is the most useful finding in the entry. The page's runnable `INTERPRETER = {…}` snippet is the one enumeration that *cannot* go stale, because `test_the_interpreter_package_set_matches_the_documented_one` compares it against `INTERPRETER_PACKAGES` by machine: it would have gone red on this change whether or not anyone reviewed the page. Every other enumeration on the page is prose, and every one of them has now rotted at least twice. That is a concrete, generalizable remedy for this contract's recurring failure — a doc enumeration that duplicates a code constant should either point at it (the `AGENT_ERROR_HINTS` pattern the 2026-07-29 `cli-docs` entry praised) or be machine-compared to it; prose duplication is the failure mode, not prose itself. The two prescribed mechanical checks passed and were blind to all six sites, **tenth consecutive time**, which is by now less a caveat than a measurement: they check *presence*, and every finding this contract produces is about *content*. Outcome verified rather than asserted — measurement across all nine runtime entry points returns zero `pipeline` and zero `pipe_run` modules, and the closure test is green with both names added. **Twelfth consecutive real-catch.**+- **2026-07-29 · hub-layering-convention · real-catch (thirteenth)** — third opening on this contract in one day, and the one that found a live counter-example to the page's own central claim rather than a stale sentence. Two of the three findings are the usual shape, now thoroughly established: the Enforcement enumeration was stale *again* (sixth consecutive opening, same enumeration as the previous two), and the exclusion sentence — "kit is data files and language has interpreter edges, so both stay out" — read exhaustive while accounting for two of the tree's twenty-seven top-level packages. Enumerating all of them and running the measurement over each turned up `test_extras`: clean, shipped, imported at boot, and undeclared. **The third finding is a new shape and the reason to read this entry.** Five built-in vendor adapters imported `MissingDependencyError` from `pipelex/exceptions.py` — the *public all-errors aggregate*, which re-exports every interpreter package's exceptions — instead of from its definition site. Each therefore loaded 15 interpreter modules, inside `pipelex.providers`, a package the guard's own tuple already declared clean. Both gates were blind by construction: the guard's rules only chase `interpreter_hub` and an aggregate of exception classes never reaches it, while the closure test's `providers.builtins` entry point misses these modules because the vendor plugins import them *inside a function* — a deferred import hides a module from the static graph and from the aggregator's runtime closure simultaneously. So the failure needed two independent blind spots to survive, and it had them. Fixed at the import site (the repo's existing "direct full-path imports everywhere" rule already forbade it), with one new entry point and a negative control. **The generalization worth carrying forward: a module that re-exports across layers is a layer boundary with the sign filed off.** `pipelex/exceptions.py` is a deliberate public convenience, so the answer is not to delete it — it is that runtime-layer code must import from definition sites, and that a lazily-imported module is invisible to every static gate in this repo. Two prescribed mechanical checks passed and were blind to all three findings, **eleventh consecutive time**; the counting is no longer interesting, the pattern is — they verify *presence*, and every finding this contract has ever produced concerns *content*. **Thirteenth consecutive real-catch.**diff --git a/wip/hub/hub-split-tracker.md b/wip/hub/hub-split-tracker.mdindex 11c93544e..0e3f5fed3 100644--- a/wip/hub/hub-split-tracker.md+++ b/wip/hub/hub-split-tracker.md@@ -697,6 +697,43 @@ Two notes on that list: `get_pipelex_hub` splits into two accessors, so every ex**Phase 3 added a second wave of breakage to the same sweep** — the moved types, not the hub accessors. The per-repo counts and the complete old→new import table are in [Cross-repo impact added by Phase 3](#cross-repo-impact-added-by-phase-3). Do both waves in one pass per repo.+### Third wave — the layer-placement track (`refactor/Layer-boundary`)++Folded in here deliberately rather than opened as a second sweep: it is the same shape, the same repos, and it must go out on the same release. Plan and rationale: [`../layer-placement-completion.md`](../layer-placement-completion.md).++| old | new |+| --- | --- |+| `from pipelex.pipe_run.pipe_run_mode import PipeRunMode` | `from pipelex.system.pipe_run_mode import PipeRunMode` |+| `from pipelex.pipeline.pipeline_models import SpecialPipelineId` | `from pipelex.system.job_metadata import SpecialPipelineId` |+| `from pipelex.pipe_run.pipe_run_params import PipeRunParamKey` | `from pipelex.system.pipe_run_param_key import PipeRunParamKey` |+| `from pipelex.pipe_run.exceptions import PipeRunError` | `from pipelex.core.pipes.exceptions import PipeRunError` |+| `from pipelex.graph.graph_rendering import generate_graph_for_bundle, generate_view_for_bundle` | `from pipelex.pipeline.bundle_graph_rendering import …` |++`pipelex.pipeline.pipeline_models` is **deleted**, not aliased. `GraphFormat` and `render_graph_from_spec` stay in `pipelex.graph.graph_rendering` — only the two bundle-driven helpers moved.++Measured 2026-07-29 (re-run at sweep time — `grep -rn --include='*.py' -E 'pipe_run\.pipe_run_mode|pipeline\.pipeline_models|PipeRunParamKey|pipe_run\.exceptions import.*PipeRunError|graph\.graph_rendering' <repo>`):++| repo | sites | what |+| --- | --- | --- |+| `pipelex-temporal/` (private) | 37 | `PipeRunMode` throughout tests + `test_extras`; one `SpecialPipelineId` in `tests/integration/fixtures/pipe_job_helpers.py`. Also two copies of the same `.claude` / `.agents` skill script. |+| `cocode/` | 6 | `PipeRunMode` in five CLI modules + one test |+| `pipelex-cookbook/` | 2 | `PipeRunMode` in two tests |+| `pipelex-mistralai-workflows/` | 1 | `PipeRunMode` in `tests/e2e/conftest.py` |+| `test-bed/` | 1 | `PipeRunMode` in `tests/e2e/conftest.py` |+| `pipelex-workshop/` | 1 | `PipeRunMode` in `tests/e2e/conftest.py` |+| `pipelex-demos/` | 1 | `PipeRunMode` in `tests/e2e/conftest.py` |+| `pipelex-demo-frostbeam/` | 1 | `PipeRunMode` in `tests/e2e/conftest.py` |+| `pipelex-demo-mistral/` | 1 | `PipeRunMode` in `tests/e2e/conftest.py` |+| `pipelex-demo-vibe/` | 1 | `PipeRunMode` in `tests/e2e/conftest.py` |++Clean for this wave: `pipelex-api/`, `pipelex-transport/`, `pipelex-daytona-sandbox/`, `pipelex-worker/`, `pipelex-starter-python/`, `pipelex-relay/`, `n8n-nodes-pipelex/`, `sandbox/`.++> **Enumerate the workspace, do not hand-list it.** The first pass at this table iterated a *hardcoded* repo list and silently missed the last six rows — every one of them a real breaking site, and every one invisible because a repo absent from both columns reads exactly like a repo that was checked and cleared. Re-measure with `for repo in $(ls -d */ | tr -d '/')`, and note that the `_*` directories are worktrees of `pipelex/` itself, not consumers.++**`conformance/` and `docs/specs/pipelex-transport-boundary.md` need no edit for *this* wave** — none of the four moved leaves is on `ALLOWED_SURFACE`. They are stale for the **hub track's** wave and were already so before this one: both still pin `pipelex.pipeline.job_metadata` and `pipelex.graph.trace_context`, which moved to `pipelex/system/` when the hub split landed. That is the standing evidence this sweep is still open.++**All of it is `pipe_run` / `pipeline` → runtime-layer homes, none of it is a behavior change.** Every site is a one-line import swap and a missed one is an `ImportError`, never a silent wrong resolution.+## Known inversions — not fixed hereNamed so the docs stay honest, not scheduled.diff --git a/wip/inputs/error-reference-grouping-axis.md b/wip/inputs/error-reference-grouping-axis.mdnew file mode 100644index 000000000..48545f417--- /dev/null+++ b/wip/inputs/error-reference-grouping-axis.md@@ -0,0 +1,21 @@+# Deferred: the error reference groups by module path, and runtime errors under `core/` land in "Authoring & language"++**Raised:** 2026-07-29, during the `refactor/Layer-boundary` checkpoint review. **Not a regression introduced by that branch** — it is a pre-existing property the branch made visible.++## What was observed++`error_pages_generator.py`'s `_SUBSYSTEM_SECTIONS` keys each error class on the **second dotted segment of its defining module** (`pipelex.<subsystem>.…`), and maps `core` → "Authoring & language". That is right for most of `core/`, which is the value data model and the language's own vocabulary.++It is not obviously right for the run-failure errors that live under `core/pipes/inputs/`. `PipeRunInputsError` and `OptionalValueAbsentError` are raised *while a method runs* — `OptionalValueAbsentError` is literally a data-dependent runtime failure, `error_domain = RUNTIME` — yet the public error reference files both under **Authoring & language / Core language**. Moving `PipeRunError` to `core.pipes.exceptions` put the base class beside them, which is an improvement in consistency (the base and its two subclasses are now in one section instead of two) but does not answer whether that section is the right one for any of the three.++## Why it was left alone++- Nothing about it is *new*. Both subclasses have been filed this way since they were written; the branch only stopped the base from being filed somewhere else.+- The alternatives are all bigger than the problem. Adding a per-class section override introduces a second, hand-maintained grouping axis that will drift from the module one. Re-keying on `error_domain` instead of the module path changes the section of every error class in the reference at once. Splitting the run-failure errors out of `core/pipes/inputs/` moves code to satisfy a docs grouping, which is the tail wagging the dog.+- The grouping axis is documented and deliberate: the generator's comment says the subsystem key "groups errors by the area of the codebase they originate from", and by that stated rule the current output is *correct*. The open question is whether that rule is the one a reader of the error reference wants, which is a product question, not a bug.++## What to decide, if this is ever picked up++Does the public error reference group by **where the error lives** (today's rule — stable, mechanical, needs no curation) or by **when the user hits it** (authoring vs running — more useful to a reader, but needs a second manifest and a way to keep it honest)? If the answer is the second, the honest implementation is probably `error_domain`, which already exists on every class and is already load-bearing for HTTP status mapping — not a new hand-maintained list.++Note the related hazard already recorded twice in `wip/drift-contracts/dogfood-log.md`: because the key is the *second segment*, any package move silently reclassifies every error class in it, with `make gep` exiting 0 either way. That is the same mechanism, and it is worth fixing (or gating) independently of the grouping-axis question.diff --git a/wip/layer-placement-completion.md b/wip/layer-placement-completion.mdnew file mode 100644index 000000000..3fd846cd6--- /dev/null+++ b/wip/layer-placement-completion.md@@ -0,0 +1,269 @@+# Complete the layer boundary — placement, so the predicate can say what it means++**Status: DONE — this is the PR's guide, not an open plan.** Implemented on `refactor/Layer-boundary`, off `dev` at `123d81f3b`, in three commits (one per phase boundary). Every number below was measured on that tree, and every measurement was re-run after each phase; the recipes are inline so a reviewer can reproduce any claim in two minutes without external tooling. The one remaining open item is [Phase 4](#phase-4--cross-repo-release-gated), which is release-gated by construction and folded into a sweep that was already open.++## For a reviewer, in one screen++The hub split drew the runtime/interpreter boundary and made it enforceable. It shipped with a caveat repeated in **six** places: two interpreter packages could not be named in the closure test's predicate, so *"importing the runtime loads zero interpreter modules"* was really *"zero modules from the packages we can name"*. This PR removes the caveat by fixing what caused it, and the measurement turned up one thing the deferral did not know.++**Two findings, two commits, one theme — placement, not indirection.**++1. **`graph` was never an interpreter package, and being undeclared was hiding a live breach** (commit 1). `graph/graph_rendering.py` reached `interpreter_hub` through `pipeline.dry_run_pipeline` — 77 interpreter modules — with every gate green, because both the layer rule and the transitive rule filter candidates through `is_runtime_layer` and `pipelex.graph` was not declared. **An undeclared package is not neutral, it is unpoliced.** Fixed by splitting the module along the boundary's own question ("do I need a loaded method?") and declaring the four packages that measure clean.+2. **Four leaf models were filed in the wrong package** (commit 2). They are what put `pipeline` and `pipe_run` in every runtime closure. Moved to runtime-layer homes, then the predicate widened — the same remedy `mthds_parsing` used, and the reason the fix is a move rather than an exclusion.++**What to check hardest, if you only check three things:**++- **The declaration additions are claims, and they are pinned.** `test_the_measured_clean_packages_stay_declared` fails if any of the four names is dropped; negative control run. Without it, deleting an entry left the whole suite green — the exact regression this PR exists to close.+- **The property is now unqualified.** `INTERPRETER_PACKAGES` names every interpreter package with no exclusion; measurement command 1 returns zero `pipeline` / `pipe_run` modules for all nine runtime entry points. The negative control (`pipelex.interpreter_hub` as an entry point) still fails with an offender list, so the test is not passing vacuously.+- **`PipeRunError` deliberately does not follow the other three leaves into `system/`.** That is a judgement call, argued in the [D-1 deviation](#deviation-from-d-1-recorded), and one earlier justification for it was **measured false and removed** — see that note.++**Roughly 170 files, but almost all of it is mechanical.** The substantive diff is: `pipelex/graph/graph_rendering.py`, `pipelex/pipeline/bundle_graph_rendering.py` (new), `pipelex/cli/dev_cli/commands/hub_layering_guard.py`, `pipelex/system/pipe_run_mode.py` + `pipe_run_param_key.py` (new/moved), the `PipeRunError` hunk in `pipelex/core/pipes/exceptions.py`, `tests/unit/pipelex/test_runtime_layer_import_closure.py`, and `docs/contribute/hub-layering.md`. Everything else is a one-line import swap, and a missed one is an `ImportError`, never a silent wrong resolution.++**No behavior changes.** Nothing in this PR changes what any code does — only where it lives and what the guard is allowed to see.++**What this finishes.** The hub split drew the boundary and made it enforceable. It left one thing undone, and the track recorded it honestly rather than fixing it: three top-level packages could not be named in the closure test's `INTERPRETER_PACKAGES`, so the property the whole track exists to state — *importing the runtime loads zero interpreter modules* — still ships with a caveat. The caveat is not repeated in four places, as [`../refactoring/deferred-placement-follow-ups.md`](refactoring/deferred-placement-follow-ups.md) §3 estimated; it is repeated in **six**, and a caveat repeated six times is a caveat that will go stale in at least one. This plan removes it.++The measurement also turned up something the deferral did not know: one of those three packages is not an interpreter package at all, and it is hiding a module that loads the entire interpreter.++## Related documents++- [`pr-1062-review-notes.md`](pr-1062-review-notes.md) §1 — where the leak was first recorded, from the Codex thread on the closure test. **Partly stale**: it names `core.bundles.exceptions` as the awkward case, and that module no longer exists — the modularity refactors moved it to `core.exceptions`, and it is no longer part of the problem.+- [`../refactoring/deferred-placement-follow-ups.md`](refactoring/deferred-placement-follow-ups.md) §3 — the same leak, restated after M1, with the remedy named ("move the leaf models to a runtime-layer home, *then* widen the predicate"). This plan is that remedy, measured.+- [`hub-split-tracker.md`](hub/hub-split-tracker.md) → [Cross-repo sweep](hub/hub-split-tracker.md#cross-repo-sweep) — **still open and release-gated.** This track's cross-repo work is the same shape and must merge into that sweep rather than open a second one. See [Cross-repo](#cross-repo--fold-into-the-pending-hub-sweep).+- [`docs/contribute/hub-layering.md`](../docs/contribute/hub-layering.md) — the shipped specification. It is the thing this plan edits at the end, not the thing it works around.++## The measurement — reproduce it in two minutes++Everything below rests on three commands run from the `pipelex/` worktree.++**1. What leaks into a runtime closure.** For any entry point, which modules of the three suspect packages get loaded:++```bash+.venv/bin/python -c "+import sys, importlib+importlib.import_module('pipelex.core.stuffs.stuff_factory')+print(sorted(m for m in sys.modules if m.startswith(('pipelex.pipeline','pipelex.pipe_run','pipelex.graph'))))+"+```++**2. Every module-level edge from the declared runtime layer into them** — the authoritative work list, because the closure is just this list plus transitive fallout:++```bash+grep -rn --include='*.py' -E '^from pipelex\.(pipeline|pipe_run|graph)[.a-z_]* import|^import pipelex\.(pipeline|pipe_run|graph)' \+ pipelex/cogt pipelex/core pipelex/plugins pipelex/providers pipelex/reporting \+ pipelex/system pipelex/tools pipelex/tracing pipelex/runtime_hub.py pipelex/config.py+```++**3. Whether an undeclared package is secretly clean (or secretly dirty)** — import each of its modules in a fresh subprocess and count interpreter modules loaded:++```bash+.venv/bin/python - <<'EOF'+import subprocess, sys, pathlib+INTERP = ('pipelex.libraries','pipelex.pipe_operators','pipelex.pipe_controllers','pipelex.codegen',+ 'pipelex.builder','pipelex.interpreter_plugins','pipelex.pipe_machinery','pipelex.pipe_signature',+ 'pipelex.mthds_parsing','pipelex.interpreter_hub')+script = f"import sys, importlib; importlib.import_module(sys.argv[1]); print(len([m for m in sys.modules if m.startswith({INTERP!r})]))"+for pkg in ("graph", "tracing", "observer", "errors"):+ for f in sorted(pathlib.Path("pipelex", pkg).rglob("*.py")):+ if f.name == "__init__.py":+ continue+ mod = str(f.with_suffix("")).replace("/", ".")+ n = subprocess.run([sys.executable, "-c", script, mod], capture_output=True, text=True).stdout.strip()+ if n not in ("0", ""):+ print(f"{n:>6} {mod}")+EOF+```++Command 3 is the one that changed this plan's shape. Run it before trusting anything below.++## What actually leaked++Command 2 returns exactly nine edges, from eight files. This is the complete surface — there is no long tail:++| # | Importer (declared runtime layer) | Imports | Resolution |+| --- | --- | --- | --- |+| 1 | `cogt/content_generation/cogt_run_params.py` | `pipe_run.pipe_run_mode.PipeRunMode` | **move the leaf** |+| 2 | `core/pipes/inputs/exceptions.py` | `pipe_run.pipe_run_mode.PipeRunMode` | **move the leaf** |+| 3 | `core/pipes/inputs/exceptions.py` | `pipe_run.exceptions.PipeRunError` | **move the leaf** |+| 4 | `core/concepts/concept_structure_blueprint.py` | `pipe_run.pipe_run_params.PipeRunParamKey` | **move the leaf** |+| 5 | `core/pipes/pipe_output.py` | `pipeline.pipeline_models.SpecialPipelineId` | **move the leaf** |+| 6 | `core/pipes/pipe_output.py` | `graph.graphspec.GraphSpec` | **declare `graph`** |+| 7 | `system/configuration/configs.py` | `graph.graph_config.GraphConfig` | **declare `graph`** |+| 8 | `tracing/trace_events.py` | `graph.graphspec.{EdgeKind, ErrorSpec, IOSpec, NodeKind}` | **declare `graph`** |+| 9 | `tracing/graphspec_assembler.py` | `graph.graphspec.*` | **declare `graph`** |++Two different problems wearing one label. Four of the nine are not a placement wart at all — they are a **missing declaration**, and the fix costs nothing. The other five are the real leaves.++Everything else in the closures is transitive fallout from these nine. In particular the longest chain — `pipeline.exceptions` → `pipeline.validation_errors` → `pipeline.fixes.planner` — is reached *only* through edge 4, via `pipe_run_params.py`'s import of `PipeStackOverflowError`. Cut edge 4 and the whole chain leaves every runtime closure without being touched.++## Part 1 — `graph` and `tracing` are runtime-layer, and one module is lying about it++**The finding.** Command 3, run over every module in `graph/`, `tracing/`, `observer/` and `errors/`, returns exactly one offender:++```+ 77 pipelex.graph.graph_rendering+```++Every other module in all four packages loads **zero** interpreter modules. `graph/` imports no interpreter package anywhere except that one file; `tracing/`, `observer/` and `errors/` import none at all.++So `graph` was never an interpreter package. It is the run-graph data model (`graphspec.py`), the tracer, the renderers and their config — all of it machinery present at execution time whatever is loaded, which is the runtime layer's own definition. It sat outside both declarations because nobody measured it, and the closure test could not name it because `graphspec` is in every runtime closure — which reads as a leak only if you have already assumed the package is interpreter-layer. It isn't. Edges 6–9 are correct imports that needed a declaration, not a refactor.++**The hidden breach.** `graph/graph_rendering.py` imports `pipeline.dry_run_pipeline`, and importing it pulls in `interpreter_hub` and 76 more interpreter modules. It has passed every gate to date for a reason worth stating: the layer rule and the transitive rule both filter their candidates through `is_runtime_layer`, and `pipelex.graph` is not declared — so *omitting a package makes the guard quieter, not louder*. The guard's own note says exactly this. `graph_rendering` has been outside the rule's domain the whole time.++This is the same shape as the `pipelex.plugins` breach the transitive rule was built to catch, and it is the argument for declaring these packages rather than leaving them undeclared: an undeclared package is not neutral, it is unpoliced.++**The module splits cleanly.** Its two importers are both CLI (`cli/commands/graph_cmd.py`, `cli/agent_cli/commands/validate/bundle_cmd.py`), and its contents fall on either side of the line by themselves:++- Runtime-layer, imports nothing but `graph/` + `config` + `tools`: `GraphFormat`, `_sanitize_graph_name`, `render_graph_from_spec` (takes a `GraphSpec`, renders it).+- Interpreter-layer, needs `dry_run_pipeline`: `_dry_run_bundle`, `generate_graph_for_bundle`, `generate_view_for_bundle` (take a *bundle*, dry-run it, then render).++The split is along "do I need a loaded method?", which is the layer boundary's own question.++## Part 2 — the four leaves in `pipeline` and `pipe_run`++Unlike `graph`, these two are genuinely interpreter-layer. Measured by counting module-level imports of interpreter packages:++| package | modules importing the interpreter | verdict |+| --- | --- | --- |+| `pipeline` | 14 of 32 (`validate_bundle`, `resolve_bundle`, `controller_taint`, `fixes/fix_loop`, `execution_seams`, `bundle_validator`, `runner`, …) | solidly interpreter |+| `pipe_run` | 3 of 15 (`pipe_job`, `pipe_job_factory`, `dry_run_in_process`) | straddles |+| `graph` | 1 of 27 (`graph_rendering`) | runtime, with one tenant in the wrong house |++The symbols the runtime layer actually needs out of the two interpreter packages:++| symbol | today | size | who needs it from the runtime layer |+| --- | --- | --- | --- |+| `SpecialPipelineId` | `pipeline/pipeline_models.py` — the whole module | 6 lines, one `StrEnum` | `core/pipes/pipe_output.py` |+| `PipeRunMode` | `pipe_run/pipe_run_mode.py` — the whole module | 34 lines, one `StrEnum` + three properties | `cogt/content_generation/cogt_run_params.py`, `core/pipes/inputs/exceptions.py` |+| `PipeRunParamKey` | inside `pipe_run/pipe_run_params.py` (255 lines) | 2-member `StrEnum` + `value_list()` | `core/concepts/concept_structure_blueprint.py`, for its reserved-names list |+| `PipeRunError` | inside `pipe_run/exceptions.py` (106 lines, 11 classes) | one `PipelexError` subclass | `core/pipes/inputs/exceptions.py`, as a base class |++Two are whole tiny modules that move as-is. Two are single symbols inside larger modules and need extracting.++**A note on `pipe_run/exceptions.py`.** `AsyncExecutionNotEnabledError`'s docstring, in that same file, says *"it lives in core precisely because it is the shared contract between the runner API … and any async-execution backend plugin"*. It does not live in core. That docstring is evidence the module's placement was already thought to be wrong once, and it is a free doc fix whichever way D-2 goes.++## Decisions — settled, with the two that moved++Recorded as drafted. Two were revised during implementation and both revisions are noted inline at the phase that made them: **D-3** (`_sanitize_graph_name` moved with its only caller rather than staying behind) and **D-1** (`PipeRunError` did not follow the other three leaves into `system/`). D-2, D-4 and D-5 landed exactly as recommended.+++- **D-1 — destination for the relocated leaves.** Recommended: **`pipelex/system/`**. This is not a new judgment call, it is the precedent the hub track already set — `JobMetadata` moved to `system/job_metadata.py`, `TraceContext` to `system/trace_context.py`, `DataInclusionConfig` to `system/data_inclusion_config.py`, all for exactly this reason. The alternative, `pipelex/core/`, reads worse: `core/` is documented as describing *what a method's values are*, and a run mode is not a value.+- **D-2 — `pipe_run`: move the leaves, or split the package the way `core/` was split?** Recommended: **move the leaves.** The split is superficially attractive (only 3 of 15 modules touch the interpreter, and `core/` → `pipe_machinery` is the precedent), but the measurement kills it: declaring `pipe_run` runtime-layer would put `pipe_run_params.py` inside the declaration, and it imports `PipeStackOverflowError` from `pipeline.exceptions` — so the split *also* requires relocating the `pipeline.exceptions` → `validation_errors` → `fixes.planner` chain, which the leaf-move approach removes from the closure for free. The split is strictly more work and strictly more cross-repo churn (`pipe_job` is on the `pipelex-transport` `ALLOWED_SURFACE` and is imported by four sibling repos). Take the leaves.+- **D-3 — where `graph_rendering.py`'s two halves go.** Recommended: **split it.** The pure half (`GraphFormat`, `render_graph_from_spec`, `_sanitize_graph_name`) stays in `graph/`; the bundle-driven half (`_dry_run_bundle`, `generate_graph_for_bundle`, `generate_view_for_bundle`) moves to `pipelex/pipeline/`, next to the `dry_run_pipeline` it exists to wrap. The alternative — move the whole file to `cli/` because both importers are CLI — is worse: it would strand `render_graph_from_spec`, which is a genuine runtime-layer renderer, behind a CLI import path.+- **D-4 — how far to extend the declaration.** `graph` and `tracing` are required by this plan. `observer` and `errors` are measured equally clean and are cheap to add in the same commit; `kit` is data files and `language` has interpreter edges, so both stay out. Recommended: declare `graph`, `tracing`, `observer`, `errors` — a partial declaration is what let `graph_rendering` hide, and the fix is to stop leaving measured-clean packages unpoliced.+- **D-5 — does the closure test name `graph` in `INTERPRETER_PACKAGES`?** No — that is the point of Part 1. `graph` moves into `RUNTIME_LAYER_PACKAGES`; only `pipeline` and `pipe_run` get added to `INTERPRETER_PACKAGES`. Recorded as a decision because [`pr-1062-review-notes.md`](pr-1062-review-notes.md) and the deferred-placement note both list `graph` alongside the other two, and a reader coming from those docs will expect it on the wrong side.++## Phases++### Phase 1 — declare the clean packages, and evict the one tenant that isn't++- [x] 1.1 Split `graph/graph_rendering.py` per D-3: bundle-driven helpers to `pipelex/pipeline/bundle_graph_rendering.py`, pure renderer stays. Updated the one affected CLI import site (`bundle_cmd.py`; `graph_cmd.py` only wanted `render_graph_from_spec`, which stayed) and moved the four bundle-half test modules from `tests/unit/pipelex/graph/` to `tests/unit/pipelex/pipeline/`.+- [x] 1.2 Add `pipelex.graph`, `pipelex.tracing`, `pipelex.observer`, `pipelex.errors` to `RUNTIME_LAYER_PACKAGES` in `pipelex/cli/dev_cli/commands/hub_layering_guard.py`, and extend the tuple's note to say why each is there.+- [x] 1.3 `make check-hub-layering` passes. **Negative control run and recorded**: re-adding the `pipeline.dry_run_pipeline` import to `graph/graph_rendering.py` makes the guard fail with `interpreter-hub-transitive` at `pipelex/graph/graph_rendering.py:14`, chain `pipelex.pipeline.dry_run_pipeline → pipelex.pipeline.runner → pipelex.interpreter_hub`. Before 1.2 that same file produced no finding at all.+- [x] 1.4 Re-ran measurement command 3 over the four newly-declared packages: no output.++**Deviation from D-3, recorded.** `_sanitize_graph_name` moved with the bundle half rather than staying in `graph/`. It is a private helper whose only caller is `generate_graph_for_bundle`; leaving it behind would have meant either dead code in `graph/` or promoting it to a public cross-module symbol to buy nothing. The layer argument for keeping it is untouched — it needs no loaded method — it just has no reason to live apart from its caller.++**Added at review, beyond the plan.** Two findings from the checkpoint review, both accepted:++- **The four new declarations are now pinned by a test.** `test_the_measured_clean_packages_stay_declared` asserts their membership in `RUNTIME_LAYER_PACKAGES`. Without it, deleting an entry left the whole suite green — which is precisely the failure this track exists to close, and the guard's own note already claimed the declaration "is asserted by a test". Mirrors the existing `test_the_plugin_split_left_both_halves_declared`; negative control run (dropping `pipelex.tracing` fails it).+- **Test placement follow-through.** `tests/CLAUDE.md`'s `pipelex/pipeline/` row listed no unit path, so the four relocated modules landed outside the documented targeted-test route; the row now names `tests/unit/pipelex/pipeline/`. And `test_graph_rendering.py` — which tests `pipelex.graph.graph_rendering` — moved from `tests/unit/pipelex/cli/` to `tests/unit/pipelex/graph/`, where the mapping says it belongs and where the name is now free. It became load-bearing in this change: the bundle-side test stopped asserting the inclusion-flag mapping (that is the renderer's business, not the dispatcher's), so it is the only place that covers it.++**🛑 CHECKPOINT 1** — the four packages are declared, policed, and clean; nothing in `pipeline`/`pipe_run` has moved yet. Gates: `make agent-check`, `make check-hub-layering`, full `make agent-test`. This is a coherent unit and a natural handoff: it is defensible on its own (it closes a live unpoliced breach), and it is the half with no cross-repo consequences at all — `graph_rendering`'s only importers are in this repo. Land it before opening Part 2.++### Phase 2 — relocate the four leaves++- [x] 2.1 `SpecialPipelineId` → `pipelex/system/job_metadata.py`; `pipeline/pipeline_models.py` deleted.+- [x] 2.2 `pipe_run/pipe_run_mode.py` → `pipelex/system/pipe_run_mode.py`, whole module, every in-repo import site rewritten (the widest one).+- [x] 2.3 `PipeRunParamKey` extracted to `pipelex/system/pipe_run_param_key.py`.+- [x] 2.4 `PipeRunError` → `pipelex/core/pipes/exceptions.py`. **No sibling in `pipe_run/exceptions.py` subclasses it** — `PipeJobError`, `DeliveryError`, `PipeRouterError` and the rest all derive from `PipelexError` directly — so nothing travels with it and no import back up is needed. `AsyncExecutionNotEnabledError`'s stale "it lives in core" docstring corrected.+- [x] 2.5 Measurement command 1 re-run for every entry point in `RUNTIME_LAYER_ENTRY_POINTS`: **zero `pipeline` and zero `pipe_run` modules in all nine.** The residue is `pipelex.graph.*`, which Phase 1 made runtime-layer — exactly what exit criterion 2 predicts. Measurement command 2 is down from nine edges to five, all into `graph`.++<a id="deviation-from-d-1-recorded"></a>++**Deviation from D-1, recorded.** D-1 recommended `pipelex/system/` for all four leaves; three went there, `PipeRunError` did not. Consistency of destination is not the criterion — what the symbol *is* decides. Three are run-scope directives and enums, which is the `JobMetadata` / `TraceContext` precedent D-1 cites. The fourth is the base class of two runtime-layer errors (`PipeRunInputsError`, `OptionalValueAbsentError` in `core.pipes.inputs.exceptions`), so it belongs with the pipe-error family in `core/pipes/exceptions.py` — and filing it there also lands it in the same error-reference section as those two subclasses, where `system/` would have put the base one section away from them. (A `system/exceptions.py` placement was first argued against on the grounds that the config bootstrap would then load `pipe_run_mode` → `graph.graphspec` for nothing. **That argument is false and was dropped**: measured, `import pipelex.config` already loads both, through `runtime_hub` → `content_generator_protocol` → `assignment_models` → `cogt_run_params`. The subclass relationship is the whole reason.) `SpecialPipelineId` likewise folded into `system/job_metadata.py` rather than getting a module of its own: it is the vocabulary of `pipeline_run_id`, which is `JobMetadata`'s field, and that module already hosts two sibling enums.++### Phase 3 — widen the predicate and delete the caveat++- [x] 3.1 `pipeline` and `pipe_run` added to `INTERPRETER_PACKAGES`, after 2.5 measured clean.+- [x] 3.2 The closure test's module docstring now states the property unqualified, and records where each leaf went.+- [x] 3.3 Caveat deleted at all **six** sites (the doc's machine-checked `INTERPRETER = {…}` snippet was a seventh edit, forced by `test_the_interpreter_package_set_matches_the_documented_one`). The deferred-placement note said four; it is six, and missing one leaves a doc claiming a wart that no longer exists:+ - `pipelex/runtime_hub.py` — module docstring ("Two interpreter-named packages are deliberately absent…").+ - `pipelex/cli/dev_cli/commands/hub_layering_guard.py` — the `RUNTIME_LAYER_PACKAGES` note ("`core.pipes.pipe_output` does still pull in `pipeline.pipeline_models`…").+ - `tests/unit/pipelex/test_runtime_layer_import_closure.py` — the `INTERPRETER_PACKAGES` note (3.2 above).+ - `docs/contribute/hub-layering.md` — "Two interpreter-named packages are deliberately **not** on the list".+ - `docs/contribute/hub-layering.md` — "Where core splits", the parenthetical on `core.pipes.pipe_output`.+ - `docs/contribute/hub-layering.md` — "The property — the import-closure test", "What the predicate still cannot name is `pipeline` and `pipe_run`".+- [x] 3.4 `docs/contribute/hub-layering.md` gains the positive statements this track earned: `graph`/`tracing`/`observer`/`errors` are runtime-layer and why; the `graph_rendering` eviction goes in "Known inversions" as a *fixed* one, next to the `pipelex.plugins` worked example it rhymes with — including the lesson, which is the sharpest one this track produced: **an undeclared package is not neutral, it is unpoliced.**+- [x] 3.5 CHANGELOG: breaking. Public import paths move for `SpecialPipelineId`, `PipeRunMode`, `PipeRunParamKey`, `PipeRunError`, and for `graph_rendering`'s bundle helpers. Give the old → new table.++**🛑 CHECKPOINT 2** — the property is unqualified: every runtime entry point loads zero modules from any interpreter package, stated by a predicate that names them all. Gates: `make agent-check`, `make check-hub-layering`, full `make agent-test`, `make drift-check`.++### Phase 4 — cross-repo, release-gated++- [x] 4.1 Folded into the pending hub cross-repo sweep rather than opening a second one: [`hub/hub-split-tracker.md` → Third wave](hub/hub-split-tracker.md#third-wave--the-layer-placement-track-refactorlayer-boundary) carries the old→new table and the per-repo counts, re-measured 2026-07-29.+- [ ] 4.2 **Open, and gated on a release** — execute that sweep. Nothing to do until a `pipelex` version carrying these moves is published; until then every consumer is correct on its pinned version.++**🛑 CHECKPOINT 3 — not reached, by design.** The sweep is the hub track's, it was already open before this PR, and it closes when both waves ship together. This PR does not and cannot close it.++## Cross-repo — fold into the pending hub sweep++The hub track's own [cross-repo sweep](hub/hub-split-tracker.md#cross-repo-sweep) is **still open and release-gated**, and the evidence is easy to see: `conformance/tests/pipelex_transport/test_data.py`'s `ALLOWED_SURFACE` still pins `pipelex.pipeline.job_metadata` and `pipelex.graph.trace_context` — both of which moved to `pipelex/system/` when the hub split landed. Several sibling repos are on the same stale paths.++So this track must not open a second sweep. Its moves get added to the existing one, and both go out on the same release.++Consumers found by grepping the workspace (`grep -rn --include='*.py' -E 'from pipelex\.(pipeline|pipe_run|graph)' <repo>`) — re-run at sweep time, this is a 2026-07-29 snapshot:++| repo | what it imports | affected by this track |+| --- | --- | --- |+| `cocode/` | `pipe_run.pipe_run_mode.PipeRunMode` in five CLI modules | **yes — the widest consumer of a moved symbol** |+| `pipelex-cookbook/` | `pipe_run.pipe_run_mode.PipeRunMode` (two files), `pipe_run.pipe_run_params.FORCE_DRY_RUN_MODE_ENV_KEY` | **yes** |+| `conformance/` | `ALLOWED_SURFACE` pins `pipe_run.*`, `pipeline.job_metadata`, `graph.trace_context` | **yes — plus the stale hub-track entries** |+| `pipelex-api/` | `graph.graphspec.GraphSpec`, `pipe_run.exceptions.DryRunError`, `pipe_run.pipe_job`, `pipeline.runner` | check `DryRunError` under D-2's split |+| `pipelex-transport/` | `pipe_run.pipe_job`, `pipe_run.pipe_run_params_factory`, `pipeline.job_metadata` | only if D-2 goes the other way |+| `pipelex-daytona-sandbox/` | `pipe_run.pipe_run_params`, `pipeline.job_metadata` | only via the stale hub-track paths |+| `pipelex-mistralai-workflows/` | `graph.trace_context`, `graph.graph_config`, `graph.graph_tracer_manager`, `pipe_run.*` | `graph.*` paths are **unchanged** by this track (Part 1 declares, it does not move) |+| `pipelex-temporal/` (private) | `pipe_run.pipe_run_mode` (36 files), `pipeline.pipeline_models` | **yes — by far the largest consumer**, and the only importer of the deleted `pipeline_models` |++⚠ **This table is the 2026-07-29 draft snapshot and is superseded.** It was assembled from a hand-written repo list and undercounts: the authoritative, re-measured work list is [`hub/hub-split-tracker.md` → Third wave](hub/hub-split-tracker.md#third-wave--the-layer-placement-track-refactorlayer-boundary), which adds `test-bed`, `pipelex-workshop`, `pipelex-demos` and the three `pipelex-demo-*` repos. Enumerate the workspace directory when re-measuring; do not hand-list it.++Worth stating plainly, because it is the main reason D-2 recommends the leaf move: **Part 1 changes no public import path at all** apart from `graph_rendering`'s bundle helpers, whose only importers are in this repo. All the cross-repo cost lives in Part 2, and the leaf move is the variant that minimizes it.++## Exit criteria — measured, not asserted++All six re-measured on the final tree. A reviewer can re-run any of them from the repo root.++1. ✅ Measurement command 1 returns zero `pipeline` / `pipe_run` modules for every entry point in `RUNTIME_LAYER_ENTRY_POINTS`. (The literal `[]` the draft asked for was the wrong bar: the command's prefix filter also matches `pipelex.graph`, which Part 1 made runtime-layer, so `graph.graphspec` legitimately remains in eight of the nine closures.)+2. ✅ Measurement command 2 is down from nine edges to five, all into `graph`.+3. ✅ Measurement command 3 returns no output over `graph/`, `tracing/`, `observer/`, `errors/`.+4. ✅ `INTERPRETER_PACKAGES` names `pipeline` and `pipe_run`; the closure test is green; its negative control (`pipelex.interpreter_hub` as an entry point) still fails with an offender list.+5. ✅ `make check-hub-layering` passes with the four new packages in `RUNTIME_LAYER_PACKAGES` — and, unlike before, *fails* when the evicted import is put back (negative control, recorded under 1.3).+6. ✅ That grep returns one hit, and it is a *different*, still-live inversion (`get_pipe_func_executor_registry`, documented as unfixed). Nothing about the `pipeline` / `pipe_run` placement caveat survives anywhere.++## What the review found, and what it changed++Each phase was reviewed by an agent given only the diff — no plan, no rationale. Both rounds found real things, and both are worth a reviewer's attention because they are the kind of gap the plan itself could not have caught.++**Round 1 (commit 1).** The four new declarations were pinned by nothing: dropping any of them left the entire suite green, while the guard's own note claimed "the declaration is asserted by a test". That is the same failure mode this PR exists to close, one level up — so it earned a test rather than a note. Second finding: the four relocated test modules landed in `tests/unit/pipelex/pipeline/`, which `tests/CLAUDE.md` did not list, so the documented targeted-test route stopped covering them.++**Round 2 (commit 2).** Two published doc snippets still carried `from pipelex.pipe_run.pipe_run_mode import PipeRunMode` and would now raise `ImportError` for a reader copy-pasting them; the generated error-reference pages were stale after `PipeRunError` changed module (`make gep`); and — the one that mattered — **a justification stated in the CHANGELOG, in `hub-layering.md` and in a drift ack was measured false.** The claim was that filing `PipeRunError` in `system/exceptions.py` would make the config bootstrap load a run mode and `graph.graphspec` for nothing. Measured: `import pipelex.config` already loads both, via `runtime_hub → content_generator_protocol → assignment_models → cogt_run_params`. The alternative's stated cost was zero. The clause was removed from all three places and the drift ack re-recorded, because an ack arguing from a measurement nobody took is precisely what that system exists to prevent. The placement is unchanged and never needed the argument — the subclass relationship is the whole reason.++**Round 3 (the whole PR, gstack `/review`).** Verdict was *ship, no blockers*, and the findings were all P2/P3 — but one of them is the most interesting thing this track produced, because it is a live counter-example to the claim the track exists to strengthen.++- **Five built-in vendor adapters were pulling the entire interpreter into `pipelex.providers` — a package the declaration already claimed was clean.** `providers/{anthropic,bedrock,google,mistral}/*_list.py` imported `MissingDependencyError` from `pipelex.exceptions`, the *public all-errors aggregate*, instead of from its definition site `pipelex.system.exceptions`. That aggregate re-exports every interpreter package's exceptions, so each of the five loaded 15 interpreter modules. It survived because it needed two independent blind spots and had both: the guard's rules only chase `interpreter_hub`, which an aggregate of exception classes never reaches; and the closure test's `providers.builtins` entry point does not cover these modules, because the vendor plugins import them *inside a function* — a deferred import is invisible to the static graph and to the aggregator's runtime closure at once. Fixed at the import site (the repo's "direct full-path imports everywhere" rule already forbade it), plus `providers.anthropic.anthropic_list` as a tenth entry point, with a negative control. The generalization now recorded in "Known inversions": **a module that re-exports across layers is a layer boundary with the sign filed off.**+- **`pipelex.test_extras` was measured clean, shipped, imported at boot — and undeclared**, while the guard's exclusion sentence named two packages and read as exhaustive. Declared, and the sentence now accounts for every top-level package. (`config`, `base_exceptions` and `urls` are also clean and undeclared; they were considered and left alone, because the transitive rule already covers them through their 30/32/5 declared runtime-layer importers. `test_extras` had no such cover.)+- **The cross-repo sweep list was incomplete, and the way it was incomplete is the lesson.** The first pass iterated a *hardcoded* repo list and missed six repos with real breaking sites — `test-bed`, `pipelex-workshop`, `pipelex-demos` and three `pipelex-demo-*`. A repo absent from both the affected and the cleared column reads exactly like one that was checked and cleared. The tracker now says: enumerate the workspace directory, do not hand-list it.+- Three bookkeeping fixes: a provenance comment in `pipelex/exceptions.py` that this PR itself made stale, the matched-set measurement snippet in `refactoring/modularity-refactors.md` (which a prescribed script check should have caught), and `refactoring/deferred-placement-follow-ups.md` §3, now marked resolved — its estimate of four caveat sites was also low, which is that section's own point about repeated caveats proving themselves.++One question was deliberately **not** answered, and is deferred: [`inputs/error-reference-grouping-axis.md`](inputs/error-reference-grouping-axis.md). Moving `PipeRunError` to `core.pipes.exceptions` refiles it from "Execution & runtime" to "Authoring & language" in the public error reference, because the generator keys on the module's second dotted segment. That is *consistent* — its two subclasses were already filed there, so the base now sits beside them instead of a section away — but whether that section is right for any of the three is a pre-existing product question, and every fix for it is bigger than the problem.++## Reproducing the whole thing++```bash+make agent-check # ruff, pyright, mypy, keyword-only, hub-layering+make check-hub-layering # the guard on its own+make agent-test # full suite+make drift-check # the two review obligations this PR discharges+```++All green on the final tree. The two drift acks (`cli-docs`, `hub-layering-convention`) are committed alongside the change they cover, with their dogfood-log entries in [`drift-contracts/dogfood-log.md`](drift-contracts/dogfood-log.md).diff --git a/wip/refactoring/deferred-placement-follow-ups.md b/wip/refactoring/deferred-placement-follow-ups.mdindex 44c616213..6bdc80ea5 100644--- a/wip/refactoring/deferred-placement-follow-ups.md+++ b/wip/refactoring/deferred-placement-follow-ups.md@@ -20,7 +20,7 @@ The package is named for what most of it does, but three tenants do something elIt resolves fine — this is filing, not breakage. Moving it means rewriting the nested `from tests.unit.pipelex.core.test_data.…` imports throughout the subtree and renaming `interpreter_test_cases` / `InterpreterTestCases` to match the `MthdsParser` rename, which is exactly the kind of churn that should ride along with the next commit that touches those tests rather than land on its own.-## 3. The `pipeline` / `pipe_run` leak is now referenced from four places+## 3. ~~The `pipeline` / `pipe_run` leak is now referenced from four places~~ — RESOLVED`core.pipes.pipe_output` reaches `pipeline.pipeline_models` for a single leaf constant, and `runtime_hub` reaches `pipe_run.pipe_run_mode`. Because of that, neither package can be named in the closure test's `INTERPRETER_PACKAGES` — naming them would fail every entry point on a placement wart rather than on a broken hub arrow.@@ -28,4 +28,6 @@ The M1 review round found that the *statement* of the property had quietly dropp**The remedy is known and is the one `mthds_parsing` already used** (D-M1-8): move the leaf models to a runtime-layer home, *then* widen the predicate. `SpecialPipelineId` and `PipeRunMode` are the two leaves. Doing it would let all four qualifications collapse back to the unqualified claim — which is the real argument for doing it, since a caveat repeated in four places is a caveat that will go stale in at least one.+> **Resolved 2026-07-29** by `refactor/Layer-boundary` ([`../layer-placement-completion.md`](../layer-placement-completion.md)), which took exactly the remedy named above. Everything in this section is now historical and describes a state that no longer exists. The leaves went to runtime-layer homes — `SpecialPipelineId` to `system.job_metadata`, `PipeRunMode` to `system.pipe_run_mode`, plus two the count above missed, `PipeRunParamKey` to `system.pipe_run_param_key` and `PipeRunError` to `core.pipes.exceptions` — `INTERPRETER_PACKAGES` now names both packages, and the qualification is deleted everywhere. The estimate of *four* sites was also low: it was **six**, which is the section's own point about a repeated caveat proving itself.+See also `wip/pr-1062-review-notes.md`, where this leak was first recorded.diff --git a/wip/refactoring/modularity-refactors.md b/wip/refactoring/modularity-refactors.mdindex f803ae7fc..493de97fa 100644--- a/wip/refactoring/modularity-refactors.md+++ b/wip/refactoring/modularity-refactors.md@@ -269,7 +269,7 @@ ROOT = os.getcwd()SNIP = '''import sys, importlibimportlib.import_module(%r)-I = {"libraries", "pipe_operators", "pipe_controllers", "codegen", "builder", "interpreter_plugins", "pipe_signature", "pipe_machinery", "mthds_parsing"}+I = {"libraries", "pipe_operators", "pipe_controllers", "codegen", "builder", "interpreter_plugins", "pipe_signature", "pipe_machinery", "mthds_parsing", "pipeline", "pipe_run"}bad = sorted(n for n in sys.modules if n.startswith("pipelex.") and len(n.split(".")) > 1 and n.split(".")[1] in I)print(len(bad), int("pipelex.interpreter_hub" in sys.modules))'''