Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.
refactor/Retire-contents-resolver · L-261020-ed544d (#1466)
Louis Choquel7eda8ed6f9d0
diff --git a/.test_durations b/.test_durationsindex 5a15cc5fc..85a1f1871 100644--- a/.test_durations+++ b/.test_durations@@ -281,6 +281,8 @@"tests/integration/pipelex/cli/test_agent_validate_pipe_in_bundle.py::TestAgentValidatePipeInBundle::test_pipe_slice_strict_validates_implemented_pipe_despite_unrelated_signature": 2.1821,"tests/integration/pipelex/cli/test_agent_validate_pipe_in_bundle.py::TestAgentValidatePipeInBundle::test_pipe_slice_unknown_pipe_raises_not_found": 0.3379,"tests/integration/pipelex/cli/test_agent_validate_pipe_in_bundle.py::TestAgentValidatePipeInBundle::test_whole_bundle_strict_reports_unrelated_signature_as_pending": 1.1746,+ "tests/integration/pipelex/cli/test_agent_validate_tree_files_read.py::TestAgentValidateTreeFilesRead::test_the_bundle_envelope_names_them_from_the_bundle_s_tree": 0.1808,+ "tests/integration/pipelex/cli/test_agent_validate_tree_files_read.py::TestAgentValidateTreeFilesRead::test_the_method_folder_envelope_names_the_files_each_step_reads": 0.2161,"tests/integration/pipelex/cli/test_build_bundle_folder.py::TestBuildBundleFolder::test_build_inputs_resolves_a_concept_the_entry_takes_from_a_sibling_bundle": 0.3532,"tests/integration/pipelex/cli/test_build_bundle_folder.py::TestBuildBundleFolder::test_build_output_resolves_a_concept_the_entry_takes_from_a_sibling_bundle": 0.5353,"tests/integration/pipelex/cli/test_fix_bundle_human.py::TestFixBundleHuman::test_diff_preview_deduplicates_equivalent_explicit_library_dirs": 2.2823,@@ -1044,11 +1046,6 @@"tests/integration/pipelex/pipeline/test_render_time_template_refusals.py::TestRenderTimeTemplateRefusals::test_a_condition_expression_naming_an_unknown_filter_in_a_branch_is_refused[expression_template-expression_template = \"{% if lane.text == 'express' %}{{ lane.text | frob_the_lane }}{% else %}quietly_routed{% endif %}\"]": 0.1226,"tests/integration/pipelex/pipeline/test_render_time_template_refusals.py::TestRenderTimeTemplateRefusals::test_an_llm_prompt_naming_an_unknown_filter_in_a_branch_is_refused[prompt]": 0.0139,"tests/integration/pipelex/pipeline/test_render_time_template_refusals.py::TestRenderTimeTemplateRefusals::test_an_llm_prompt_naming_an_unknown_filter_in_a_branch_is_refused[system_prompt]": 0.0154,- "tests/integration/pipelex/pipeline/test_resolve_bundle.py::TestResolveCrateFromContents::test_address_dependency_is_rejected_without_filesystem_discovery": 0.2602,- "tests/integration/pipelex/pipeline/test_resolve_bundle.py::TestResolveCrateFromContents::test_empty_contents_are_a_host_wiring_error": 0.0007,- "tests/integration/pipelex/pipeline/test_resolve_bundle.py::TestResolveCrateFromContents::test_invalid_contents_raise_shared_verdict_and_tear_down": 0.0527,- "tests/integration/pipelex/pipeline/test_resolve_bundle.py::TestResolveCrateFromContents::test_multi_bundle_contents_resolve_to_normalized_crate": 1.1149,- "tests/integration/pipelex/pipeline/test_resolve_bundle.py::TestResolveCrateFromContents::test_sources_length_mismatch_is_a_host_wiring_error": 0.0003,"tests/integration/pipelex/pipeline/test_resolve_crate_from_method_dir.py::TestResolveCrateFromMethodDir::test_a_merge_error_names_the_bundles_by_their_tree_paths": 0.0451,"tests/integration/pipelex/pipeline/test_resolve_crate_from_method_dir.py::TestResolveCrateFromMethodDir::test_a_tree_with_no_crate_raises_the_shared_verdict_and_tears_down[invalid-bundle]": 0.2552,"tests/integration/pipelex/pipeline/test_resolve_crate_from_method_dir.py::TestResolveCrateFromMethodDir::test_a_tree_with_no_crate_raises_the_shared_verdict_and_tears_down[no-bundle]": 0.0425,@@ -1205,6 +1202,9 @@"tests/integration/pipelex/pipeline/test_validate_method_dir.py::TestValidateMethodDir::test_every_python_file_of_the_tree_is_read_for_its_syntax": 0.1077,"tests/integration/pipelex/pipeline/test_validate_method_dir.py::TestValidateMethodDir::test_the_callers_library_loads_beside_the_folder_while_only_the_folders_pipes_are_judged": 0.1475,"tests/integration/pipelex/pipeline/test_validate_method_dir.py::TestValidateMethodDir::test_the_graph_is_the_trees_entry_pipe": 0.118,+ "tests/integration/pipelex/pipeline/test_validate_tree_files_read.py::TestValidateTreeFilesRead::test_a_function_found_on_the_import_path_is_no_file_of_a_tree": 0.163,+ "tests/integration/pipelex/pipeline/test_validate_tree_files_read.py::TestValidateTreeFilesRead::test_the_report_names_the_module_of_each_pipe_func_and_an_empty_list_for_every_other_pipe[module_file]": 0.3038,+ "tests/integration/pipelex/pipeline/test_validate_tree_files_read.py::TestValidateTreeFilesRead::test_the_report_names_the_module_of_each_pipe_func_and_an_empty_list_for_every_other_pipe[package]": 0.3395,"tests/integration/pipelex/pipeline/test_validation_detail_kept.py::TestValidationDetailKept::test_a_dry_run_failure_reads_its_codes_sentence_never_its_own_message": 0.1397,"tests/integration/pipelex/pipeline/test_validation_detail_kept.py::TestValidationDetailKept::test_a_dry_run_failure_that_is_not_caller_facing_names_its_title": 0.0541,"tests/integration/pipelex/pipeline/test_validation_detail_kept.py::TestValidationDetailKept::test_a_failure_in_a_library_pipe_never_names_the_host_file": 0.3402,@@ -1702,11 +1702,19 @@"tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_is_a_file_of_the_bundle_s_method_tree[hidden]": 0.0748,"tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_is_a_file_of_the_bundle_s_method_tree[missing_file]": 0.5002,"tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_is_a_file_of_the_bundle_s_method_tree[outside_the_tree]": 0.1744,+ "tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_is_a_file_of_the_bundle_s_method_tree[resolve-gitignored]": 0.3002,+ "tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_is_a_file_of_the_bundle_s_method_tree[resolve-hidden]": 0.1119,+ "tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_is_a_file_of_the_bundle_s_method_tree[resolve-missing_file]": 0.3747,+ "tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_is_a_file_of_the_bundle_s_method_tree[validate-gitignored]": 0.2414,+ "tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_is_a_file_of_the_bundle_s_method_tree[validate-hidden]": 0.2342,+ "tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_is_a_file_of_the_bundle_s_method_tree[validate-missing_file]": 0.2289,"tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_is_found_inside_the_bundle_s_directory[linked_outside_the_bundle]": 0.1627,"tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_is_found_inside_the_bundle_s_directory[missing_file]": 0.1045,"tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_is_found_inside_the_bundle_s_directory[outside_the_bundle]": 0.0276,"tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_named_by_an_absolute_path_is_refused_without_repeating_it": 0.134,"tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_outside_the_tree_is_the_method_s_security_refusal_not_a_verdict": 0.1767,+ "tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_outside_the_tree_is_the_method_s_security_refusal_not_a_verdict[resolve]": 0.1542,+ "tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_a_template_file_outside_the_tree_is_the_method_s_security_refusal_not_a_verdict[validate]": 0.2734,"tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_an_anything_input_reaches_the_checker_with_an_undeclared_shape": 0.0299,"tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_an_html_template_file_changed_after_its_tree_was_listed_is_refused_not_read_from_disk": 0.0574,"tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py::TestPipeDocGenTemplateFiles::test_an_html_template_file_reads_the_same_whichever_way_its_bundle_loads[from_content]": 0.0434,@@ -1729,6 +1737,10 @@"tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_warnings.py::TestPipeDocGenTemplateWarnings::test_the_bare_cli_echoes_the_warning[pipe]": 0.1669,"tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_warnings.py::TestPipeDocGenTemplateWarnings::test_the_protocol_report_carries_a_warning_found_inside_a_sequence": 0.1952,"tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_warnings.py::TestPipeDocGenTemplateWarnings::test_the_protocol_report_withholds_a_host_template_file": 0.2167,+ "tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_tree_files_read.py::TestPipeDocGenTreeFilesRead::test_a_file_submitted_with_content_is_named_by_the_path_it_is_keyed_by": 0.2509,+ "tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_tree_files_read.py::TestPipeDocGenTreeFilesRead::test_a_step_laying_its_inputs_out_reads_no_file": 0.0808,+ "tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_tree_files_read.py::TestPipeDocGenTreeFilesRead::test_an_inline_template_s_files_resolve_against_its_bundle": 0.2009,+ "tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_tree_files_read.py::TestPipeDocGenTreeFilesRead::test_the_report_names_the_template_file_and_each_file_its_html_names": 0.3697,"tests/integration/pipelex/pipes/operator/pipe_extract/test_pipe_extract.py::TestPipeExtract::test_pipe_extract_from_pdf[@default-extract-document-False-https://pipelex-pytest-assets.s3.eu-west-3.amazonaws.com/pdf_example_1.pdf]": 0.4797,"tests/integration/pipelex/pipes/operator/pipe_extract/test_pipe_extract.py::TestPipeExtract::test_pipe_extract_from_pdf[@default-extract-document-False-https://pipelex-pytest-assets.s3.eu-west-3.amazonaws.com/pdf_example_2.pdf]": 0.5595,"tests/integration/pipelex/pipes/operator/pipe_extract/test_pipe_extract.py::TestPipeExtract::test_pipe_extract_from_pdf[@default-extract-document-False-tests/data/documents/CV-ELIAS-THORNE.docx]": 0.4579,@@ -13967,10 +13979,12 @@"tests/unit/pipelex/pipe_operators/pipe_doc_gen/test_template_asset_check.py::TestTemplateAssetCheck::test_a_literal_url_naming_no_asset_of_the_tree_is_refused[not_an_asset]": 0.0006,"tests/unit/pipelex/pipe_operators/pipe_doc_gen/test_template_asset_check.py::TestTemplateAssetCheck::test_a_literal_url_naming_no_asset_of_the_tree_is_refused[outside_the_tree]": 0.0134,"tests/unit/pipelex/pipe_operators/pipe_doc_gen/test_template_asset_check.py::TestTemplateAssetCheck::test_a_literal_url_naming_no_asset_of_the_tree_is_refused[root_relative]": 0.0008,+ "tests/unit/pipelex/pipe_operators/pipe_doc_gen/test_template_asset_check.py::TestTemplateAssetCheck::test_a_refused_url_keeps_the_files_reached_before_it": 0.0012,"tests/unit/pipelex/pipe_operators/pipe_doc_gen/test_template_asset_check.py::TestTemplateAssetCheck::test_a_stylesheet_s_urls_skip_its_comments": 0.0003,"tests/unit/pipelex/pipe_operators/pipe_doc_gen/test_template_asset_check.py::TestTemplateAssetCheck::test_a_url_of_a_linked_stylesheet_is_checked_against_the_stylesheet": 0.0005,"tests/unit/pipelex/pipe_operators/pipe_doc_gen/test_template_asset_check.py::TestTemplateAssetCheck::test_an_inline_template_of_bundles_from_strings_resolves_from_the_root": 0.0005,"tests/unit/pipelex/pipe_operators/pipe_doc_gen/test_template_asset_check.py::TestTemplateAssetCheck::test_images_stylesheets_and_the_urls_they_name_pass": 0.0005,+ "tests/unit/pipelex/pipe_operators/pipe_doc_gen/test_template_asset_check.py::TestTemplateAssetCheck::test_the_check_names_each_file_the_urls_reach_once_by_tree_path": 0.1804,"tests/unit/pipelex/pipe_operators/pipe_doc_gen/test_template_asset_check.py::TestTemplateAssetCheck::test_the_urls_a_printer_reads_are_collected_and_the_run_s_values_skipped": 0.1419,"tests/unit/pipelex/pipe_operators/pipe_extract/test_pipe_extract_blueprint.py::TestPipeExtractBlueprint::test_valid_blueprints[valid_image_input-blueprint0]": 0.7553,"tests/unit/pipelex/pipe_operators/pipe_extract/test_pipe_extract_blueprint.py::TestPipeExtractBlueprint::test_valid_blueprints[valid_image_with_captions-blueprint4]": 0.0008,@@ -15135,7 +15149,10 @@"tests/unit/pipelex/pipeline/test_validation_render.py::TestValidationRender::test_format_validation_error_items_markdown_groups_categories_and_renders_fix_line": 0.0006,"tests/unit/pipelex/pipeline/test_validation_render.py::TestValidationRender::test_invalid_report_markdown_marks_an_unsafe_fix": 0.0008,"tests/unit/pipelex/pipeline/test_validation_render.py::TestValidationRender::test_invalid_verdict_markdown_marks_an_unsafe_fix": 0.0021,+ "tests/unit/pipelex/pipeline/test_validation_render.py::TestValidationRender::test_names_the_files_each_step_reads_under_the_steps_that_read_any": 0.1776,"tests/unit/pipelex/pipeline/test_validation_render.py::TestValidationRender::test_omits_runnability_verdict_when_key_absent": 0.0006,+ "tests/unit/pipelex/pipeline/test_validation_render.py::TestValidationRender::test_omits_the_files_section_when_no_step_reads_a_file[absent]": 0.0019,+ "tests/unit/pipelex/pipeline/test_validation_render.py::TestValidationRender::test_omits_the_files_section_when_no_step_reads_a_file[no_step_reads_a_file]": 0.151,"tests/unit/pipelex/pipeline/test_validation_render.py::TestValidationRender::test_renders_an_invalid_verdict_from_its_problem_items": 0.0882,"tests/unit/pipelex/pipeline/test_validation_render.py::TestValidationRender::test_renders_invalid_report_as_prose_with_fix_lines_and_dry_run_residual": 0.0006,"tests/unit/pipelex/pipeline/test_validation_render.py::TestValidationRender::test_renders_pending_signatures_section_with_not_runnable_verdict": 0.7682,@@ -15145,6 +15162,7 @@"tests/unit/pipelex/pipeline/test_validation_render.py::TestValidationRender::test_suggested_fix_label_says_when_a_fix_is_unsafe": 0.0953,"tests/unit/pipelex/pipeline/test_validation_report.py::TestBuildValidationReport::test_assembles_canonical_report_from_ingredients": 0.8363,"tests/unit/pipelex/pipeline/test_validation_report.py::TestBuildValidationReport::test_runnable_when_nothing_pending": 0.0012,+ "tests/unit/pipelex/pipeline/test_validation_report.py::TestBuildValidationReport::test_the_per_file_view_is_derived_from_the_files_each_pipe_reads": 0.083,"tests/unit/pipelex/pipeline/test_validation_report.py::TestBuildValidationReport::test_warnings_ride_the_report_without_flipping_the_verdict": 0.0841,"tests/unit/pipelex/plugins/test_bundle_validator_registry.py::TestBundleValidatorRegistry::test_contribution_recorded_on_the_active_plugin": 0.0003,"tests/unit/pipelex/plugins/test_bundle_validator_registry.py::TestBundleValidatorRegistry::test_duplicate_mode_fails_loud_naming_both_plugins": 0.0007,diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 1a880ac0b..ce1513b6c 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -15,6 +15,10 @@- **Where a method's Python travels, in the docs**: the PipeFunc Requirements, PipeFunc and run pages say that the API server receives a method as a tree holding its bundles and its Python together and judges its `requirements.txt` from the tree's listing, that the runner never imports a method's Python, that a run's crate names each step's method tree by its digest and carries none of its files, that a `PipeFunc` call's files are read through the method file store the worker's host installs, and that a worker a method tree's validation is dispatched to checks the method's requirements again, where they said the server received a method's Python apart from its bundles, the Python was captured as text, the crate carried the method's Python sources and the worker never checked anything.+### Removed++- **`resolve_crate_from_contents` (Breaking)**: `pipelex.pipeline.resolve_bundle` no longer resolves a crate from bundle contents held as strings. A host resolves a method as `/v1/resolve`, `/v1/codegen` and `/v1/pipe-io` do, by writing its tree out and calling `resolve_crate_from_method_dir`, with the packages it ships in `methods_dirs`; a call into a package nothing shipped is then an `unresolved_package_dependency` item of the invalid verdict, never the `request.unsupported` refusal with the reason `address_based_dependency`, which no resolution of this release gives.+## [v0.90.0] - 2026-10-19### Addeddiff --git a/docs/under-the-hood/codegen-projections.md b/docs/under-the-hood/codegen-projections.mdindex 9660bee1c..5da15fc52 100644--- a/docs/under-the-hood/codegen-projections.md+++ b/docs/under-the-hood/codegen-projections.md@@ -171,8 +171,7 @@ The remaining findings are artifacts of *how* you lint, not of file content. NonThe same engine backs the `pipelex-api` routes (`POST /v1/resolve`, `POST /v1/codegen` and `POST /v1/pipe-io` — the route envelopes are documented on the API server's [Resolve & Codegen](../api-server/codegen.md) and [Pipe I/O](../api-server/pipe-io.md) pages). Host-facing cores make that possible without any CLI plumbing:-- **`pipelex.pipeline.resolve_bundle.resolve_crate_from_method_dir`** resolves a method's tree the host received and wrote out, which is how the three routes resolve the tree a request sends in `files` or a `method_ref` fetches: the directory is loaded alone as the caller's library directory, exactly as `validate_bundle` loads a `method_dir`, so each bundle is named by its tree path while the host holds the tree in `WRITTEN_METHOD_TREES`, the other files are the ones its steps read, and the packages it ships (laid out like `.mthds/methods/`) are the only place an address-based reference is looked up: the resolution is static, so it reads no method installed on the host and fetches nothing, and a call into a package nothing shipped is an `unresolved_package_dependency` item of the verdict. The API server runs it in a worker thread, with the projection and the teardown. It shares the `ValidateBundleError` cascade and the loaded-on-success contract described next.-- **`pipelex.pipeline.resolve_bundle.resolve_crate_from_contents`** resolves **in-memory** MTHDS contents (strings, with optional per-content sources) into the normalized crate. It mirrors `validate_bundle`'s in-memory arm — the same `translate_to_validate_bundle_error` cascade, so an invalid library raises the one shared `ValidateBundleError` and a resolve verdict cannot drift from a validate verdict — and the same **loaded-on-success contract**: the library is left loaded and current for the host to read live pipes from, and the host owns its teardown. Resolution is static (no dry-run sweep), matching `pipelex resolve`.+- **`pipelex.pipeline.resolve_bundle.resolve_crate_from_method_dir`** resolves a method's tree the host received and wrote out, which is how the three routes resolve the tree a request sends in `files` or a `method_ref` fetches: the directory is loaded alone as the caller's library directory, exactly as `validate_bundle` loads a `method_dir`, so each bundle is named by its tree path while the host holds the tree in `WRITTEN_METHOD_TREES`, the other files are the ones its steps read, and the packages it ships (laid out like `.mthds/methods/`) are the only place an address-based reference is looked up: the resolution is static, so it reads no method installed on the host and fetches nothing, and a call into a package nothing shipped is an `unresolved_package_dependency` item of the verdict. It shares `validate_bundle`'s `translate_to_validate_bundle_error` cascade, so an invalid library raises the one shared `ValidateBundleError` and a resolve verdict cannot drift from a validate verdict, and its **loaded-on-success contract**: the library is left loaded and current for the host to read live pipes from, and the host owns its teardown. Resolution is static (no dry-run sweep), matching `pipelex resolve`. The API server runs it in a worker thread, with the projection and the teardown.- **`build_stamped_projection`** (above) gives the host the stamped artifact set plus the lock as pure content. A client that writes the served files and lock verbatim reproduces a local run byte-for-byte — the offline `codegen check` passes on the written tree exactly as it would locally. There is deliberately no server-side check route: the check is offline by design.## Surfacing imprecision, never guessingdiff --git a/docs/under-the-hood/error-model.md b/docs/under-the-hood/error-model.mdindex 3580ea96e..c40ad42ea 100644--- a/docs/under-the-hood/error-model.md+++ b/docs/under-the-hood/error-model.md@@ -213,7 +213,7 @@ Besides `category` and `message`, each item carries whatever identity fields its**Signatures are never an error.** An unimplemented `PipeSignature` reached during validation is a *runnability fact*, not a validation failure: the validator no longer raises on it. The assembled library's outstanding signatures ride the validation report's `pending_signatures`, and `is_runnable = not pending_signatures`. `allow_signatures` is a sweep-mechanics flag only (whether signature pipes are mock-run and listed in `validated_pipes`) — it does not change the verdict, so strict ≡ lenient in the report body. The "is this a failure?" decision moves to the consumer: the CLI exits non-zero on `not is_runnable` unless `--allow-signatures`; the HTTP caller reads `is_runnable`. (The **execute/run** path is different: running a stub still raises `PipeSignatureNotExecutableError`.)-**Host-wiring guards are programmer errors, not content verdicts.** `validate_bundle`'s "provide exactly one of `mthds_contents` / `mthds_file_path`" guard and `resolve_crate_from_contents`'s `mthds_sources`-length-mismatch guard raise `PipelexUnexpectedError` (`runtime.unexpected`, 500), not `ValidateBundleError` — a caller wiring bug must not be reported as if the submitted bundle were invalid. The empty-`mthds_contents` guard stays the caller's, `request.invalid` (it can legitimately reflect an end user submitting no bundles).+**Host-wiring guards are programmer errors, not content verdicts.** `validate_bundle`'s "provide exactly one of `mthds_contents` / `mthds_file_path`" guard and its `mthds_sources`-length-mismatch guard raise `PipelexUnexpectedError` (`runtime.unexpected`, 500), not `ValidateBundleError` — a caller wiring bug must not be reported as if the submitted bundle were invalid. The empty-`mthds_contents` guard stays the caller's, `request.invalid` (it can legitimately reflect an end user submitting no bundles).`ValidationErrorItem` and the builder are the single source of truth across surfaces: `build_validation_error_items()` (`pipelex/pipeline/validation_errors.py`) is reached through `ValidateBundleError.validation_error_items()`, which `ValidateBundleError.problem_items()` (the `errors` of every problem of an invalid bundle, which the agent CLI prints), the validators' invalid arm, the human CLI's prose and `pipelex fix` all call, so the structured shapes cannot drift. `pipelex-agent validate pipe` and `validate --all` dry-run through the same cascade, so a failing dry run there is the same invalid verdict with the same items as on `validate bundle`. The item lives in `pipelex/base_exceptions.py`, not next to the source error-data models, because the root exceptions module must not import the `pipelex.core` error modules, which import back into it.diff --git a/pipelex/errors/unsupported_reasons.py b/pipelex/errors/unsupported_reasons.pyindex ca7bd5df3..fb6231e91 100644--- a/pipelex/errors/unsupported_reasons.py+++ b/pipelex/errors/unsupported_reasons.py@@ -5,8 +5,11 @@ the problem's text. This module imports nothing, so a client of the hosted API rinterpreter."""-#: Contents-only resolution, the core of `POST /v1/pipe-io`, met a method calling another one by its address, which it-#: cannot fetch. A hosted run tells this refusal apart by it, since the run route fetches such a dependency.+#: A runner older than 0.89.0, whose `POST /v1/pipe-io` resolved a method sent as content strings, met a method calling+#: another one by its address, which that resolution could not fetch. No runtime of this release gives it: `/v1/pipe-io`+#: now resolves the method's tree and answers a call into a package nothing shipped with its invalid verdict. A hosted+#: run still tells this refusal apart by it, since the run route fetches such a dependency and a hosted API may run an+#: older runner.ADDRESS_DEPENDENCY_UNSUPPORTED_REASON = "address_based_dependency"#: A table input, such as a CSV file, given by a URL that is not a local file path: this runtime reads a table from adiff --git a/pipelex/hosted/hosted_inputs.py b/pipelex/hosted/hosted_inputs.pyindex 5095f7f1b..b186f87ed 100644--- a/pipelex/hosted/hosted_inputs.py+++ b/pipelex/hosted/hosted_inputs.py@@ -58,9 +58,9 @@ _HTTP_URL_PATTERN = re.compile(r"^https?://", re.IGNORECASE)_NOT_LOCAL_PREFIXES: tuple[str, ...] = ("pipelex-storage://", "data:")#: A `file://` URI, which a local run reads as the local path it names._FILE_URI_PREFIX = "file://"-#: The code of the refusal an in-memory resolution answers a method calling another one by its address with, carrying-#: the reason `ADDRESS_DEPENDENCY_UNSUPPORTED_REASON` (`resolve_crate_from_contents` in `pipelex/pipeline/resolve_bundle.py`).-#: The run route fetches such a dependency.+#: The code of the refusal a runner older than 0.89.0 answers a method calling another one by its address with, its+#: pipe-io resolving the method from content strings, carrying the reason `ADDRESS_DEPENDENCY_UNSUPPORTED_REASON`. The+#: run route fetches such a dependency._ADDRESS_DEPENDENCY_REFUSAL_CODES: frozenset[str] = frozenset({CoreCode.REQUEST_UNSUPPORTED})@@ -257,10 +257,11 @@ def _with_storage_uris(*, anchored: AnchoredInputs, descriptor: PipeInputFormDesdef _address_dependency_refusal(*, refusal: ApiResponseError) -> HostedLocalFileUploadUnavailableError | None:"""The error to raise when pipe-io refused the method for calling another one by its address, else `None`.- An in-memory resolution answers that refusal with its problem, coded `request.unsupported` and giving the reason- `ADDRESS_DEPENDENCY_UNSUPPORTED_REASON`: the request is what it cannot serve, not the method, which the run route- fetches the dependency of. The tree resolution behind pipe-io answers a call into a package nothing shipped with its- invalid verdict instead (`_unshipped_dependency_refusal`). The refusal's own advice, to send the package's files in+ A runner older than 0.89.0, whose pipe-io resolved the method from content strings, answers that refusal with its+ problem, coded `request.unsupported` and giving the reason `ADDRESS_DEPENDENCY_UNSUPPORTED_REASON`: the request is+ what it cannot serve, not the method, which the run route fetches the dependency of. A current runner's pipe-io+ resolves the method's tree and answers a call into a package nothing shipped with its invalid verdict instead+ (`_unshipped_dependency_refusal`). The refusal's own advice, to send the package's files in`dependencies`, is meant for the API's callers, so the error leaves it out.The error does not name the dependency, because the problem does not carry it: `request.unsupported` declares onlydiff --git a/pipelex/libraries/library_manager.py b/pipelex/libraries/library_manager.pyindex c771f64bb..e0195a029 100644--- a/pipelex/libraries/library_manager.py+++ b/pipelex/libraries/library_manager.py@@ -1405,7 +1405,8 @@ class LibraryManager(LibraryManagerAbstract):# forwards structured data and has none to forward — so every pipe/concept error a# pydantic validator raises during the merge arrived on the wire as one untyped residual.# That is the whole reason `optional_input_unguarded` and `optional_output_required` were- # reachable through `resolve_crate_from_contents` but not through a library directory.+ # reachable through bundles loaded from content strings, whose `load_from_blueprints` runs+ # straight inside the cascade, but not through a library directory.raise LibraryLoadingError(message=(f"Could not load blueprints from {bundle_sources} because of: "diff --git a/pipelex/pipeline/resolve_bundle.py b/pipelex/pipeline/resolve_bundle.pyindex 62157c2b8..ee53c1113 100644--- a/pipelex/pipeline/resolve_bundle.py+++ b/pipelex/pipeline/resolve_bundle.py@@ -1,15 +1,13 @@"""Resolve a method into a normalized library crate, for a host (presentation-free core).-Two entry points, the host-facing siblings of the CLI's directory-based crate loader-(`pipelex.cli.commands.crate_loading.load_normalized_crate`):--- ``resolve_crate_from_method_dir`` resolves a method's tree a host received and wrote out, such as the tree the API- server's crate routes write from a request's `files` map: the directory is loaded as the caller's own, the way- ``validate_bundle`` loads a ``method_dir``, so its other files are the ones its steps read, and, while the host holds- the tree in ``WRITTEN_METHOD_TREES``, its bundles are named by their tree paths.-- ``resolve_crate_from_contents`` resolves bundle contents held as strings, without touching the filesystem.--Both resolve statically from what the caller sent: a package the method calls by its address is loaded only from the+``resolve_crate_from_method_dir`` is the host-facing sibling of the CLI's directory-based crate loader+(`pipelex.cli.commands.crate_loading.load_normalized_crate`). It resolves a method's tree a host received and wrote out,+such as the tree the API server's crate routes write from a request's `files` map or fetch for a `method_ref`: the+directory is loaded as the caller's own, the way ``validate_bundle`` loads a ``method_dir``, so its other files are the+ones its steps read, and, while the host holds the tree in ``WRITTEN_METHOD_TREES``, its bundles are named by their tree+paths.++It resolves statically from what the caller sent: a package the method calls by its address is loaded only from thepackages shipped with it, and one nothing shipped is refused with ``unshipped_address_dependency_message``, never lookedup among the methods installed on the host or fetched.@@ -22,97 +20,21 @@ no dry-run sweep, matching `pipelex resolve` — the crate is emitted from a loavalidated** library (D6), and runnability is `validate`'s vocabulary, not resolution's."""-from collections.abc import Generator, Mapping+from collections.abc import Generatorfrom contextlib import contextmanagerfrom pathlib import Pathfrom typing import Sequencefrom mthds.package.manifest.schema import MTHDS_STANDARD_VERSION-from mthds.protocol.problem.registry import CoreCode-from pipelex.base_exceptions import PipelexUnexpectedError-from pipelex.core.method_trees.file_references import BundleFileOrigin-from pipelex.core.qualified_ref import QualifiedRef-from pipelex.errors.unsupported_reasons import ADDRESS_DEPENDENCY_UNSUPPORTED_REASONfrom pipelex.interpreter_hub import clear_current_library, get_current_library_id_or_none, get_library_manager, set_current_library-from pipelex.libraries.bundle_resources import check_submitted_filesfrom pipelex.libraries.crate_normalization import normalize_cratefrom pipelex.libraries.library_crate import LibraryCrate-from pipelex.libraries.pipe.exceptions import PipeLibraryError-from pipelex.methods.address_dependencies import AddressDependencySources, unshipped_address_dependency_message-from pipelex.mthds_parsing.parser import MthdsParser-from pipelex.mthds_parsing.pipelex_bundle_blueprint import PipelexBundleBlueprint+from pipelex.methods.address_dependencies import AddressDependencySourcesfrom pipelex.pipeline.exceptions import ValidateBundleErrorfrom pipelex.pipeline.validate_bundle_translation import translate_to_validate_bundle_error-def resolve_crate_from_contents(- *,- mthds_contents: list[str],- mthds_sources: Sequence[str | None] | None = None,- submitted_files: Mapping[str, bytes] | None = None,-) -> LibraryCrate:- """Assemble, validate, and normalize a library crate from in-memory MTHDS contents.-- Mirrors ``validate_bundle``'s in-memory arm and its **loaded-on-success contract**: on- success the freshly opened library is left loaded and current so the host can read live- pipes from it (input templates, runner scaffolds) — the host then owns its teardown- (``clear_current_library()`` + ``library_manager.teardown(library_id=...)``). On failure the- library is torn down here and the caller's prior current-library is restored.-- Args:- mthds_contents: MTHDS bundle contents (at least one) forming the closure to resolve.- mthds_sources: Optional per-content logical sources (e.g. relative file paths), threaded- onto each blueprint so diagnostics carry a real ``source``; a ``None`` entry leaves- that content source-less. Must match ``mthds_contents`` in length when provided — a- mismatch is a host-wiring bug.- submitted_files: The files submitted with the contents that their steps read, such as a ``PipeDocGen``- step's ``template_file``, keyed by canonical bundle-relative path. The load resolves the steps' references- among them; the normalized crate, a standard artifact, carries neither them nor their tree.-- Returns:- The normalized library crate (fully qualified, natives materialized, fingerprint set).-- Raises:- ValidateBundleError: the produced negative verdict — the library could not be parsed,- loaded, or validated; carries the structured validation-error items.- PipelexUnexpectedError: host-wiring bug (empty contents, sources length mismatch).- CrateNormalizationError: internal invariant violation in the normalization pass —- deliberately not translated, it must surface as a server fault.- """- if not mthds_contents:- msg = "mthds_contents must not be empty: provide at least one MTHDS content to resolve"- raise PipelexUnexpectedError(msg)- if mthds_sources is not None and len(mthds_sources) != len(mthds_contents):- msg = "mthds_sources, when provided, must be a per-item source list matching mthds_contents in length"- raise PipelexUnexpectedError(msg)-- library_manager = get_library_manager()- with _resolving_library() as library_id:- content_sources: list[str | None] = list(mthds_sources) if mthds_sources is not None else [None] * len(mthds_contents)- with translate_to_validate_bundle_error():- # Contents belong to no method tree: their steps read only the files submitted with them.- blueprints = [- MthdsParser.make_pipelex_bundle_blueprint(mthds_content=content, mthds_source=source, file_origin=BundleFileOrigin.SUBMITTED_FILES)- for content, source in zip(mthds_contents, content_sources, strict=True)- ]- _reject_address_based_dependencies(blueprints=blueprints)- if submitted_files:- check_submitted_files(blueprints=blueprints, submitted_files=submitted_files)- library_manager.add_submitted_files(library_id=library_id, submitted_files=submitted_files)- # load_from_blueprints ends in load_from_crate, whose last step is- # library.validate_library() — so a crate read after it satisfies the D6- # "built only from a valid library" contract.- library_manager.load_from_blueprints(library_id=library_id, blueprints=blueprints)- crate = library_manager.get_crate(library_id)- if crate is None:- # Unreachable with non-empty contents (load_from_blueprints accumulated them), so a- # None crate is an internal invariant break, not a verdict on the caller's method.- msg = "library crate unavailable after a successful bundle load"- raise PipelexUnexpectedError(msg)- return normalize_crate(crate, mthds_version=MTHDS_STANDARD_VERSION)--def resolve_crate_from_method_dir(*, method_dir: Path, methods_dirs: Sequence[Path] | None = None) -> LibraryCrate:"""Load, validate, and normalize the library crate of a method's tree written out to a directory.@@ -122,12 +44,12 @@ def resolve_crate_from_method_dir(*, method_dir: Path, methods_dirs: Sequence[Paships with the method, the only place an address-based reference is looked up: one they do not answer is refused,since a static resolution reads no method installed on the host and fetches nothing. A tree the host holds in``WRITTEN_METHOD_TREES`` (``pipelex.libraries.written_trees``) has its bundles named by their tree paths, so the- diagnostics and the crate's ``source_map`` never name a path on the host. Resolution is static, as for contents: no- dry run.+ diagnostics and the crate's ``source_map`` never name a path on the host. Resolution is static: no dry run.- Same **loaded-on-success contract** as ``resolve_crate_from_contents``: on success the library is left loaded and- current, and the host owns its teardown; on failure it is torn down here and the caller's prior current library is- restored.+ It honours ``validate_bundle``'s **loaded-on-success contract**: on success the library is left loaded and current,+ so the host can read live pipes from it, and the host owns its teardown (``clear_current_library()`` and+ ``library_manager.teardown(library_id=...)``); on failure it is torn down here and the caller's prior current library+ is restored.Args:method_dir: The directory of the method's tree, written as the tree holds it.@@ -182,19 +104,3 @@ def _resolving_library() -> Generator[str, None, None]:else:clear_current_library()library_manager.teardown(library_id=library_id)---def _reject_address_based_dependencies(*, blueprints: list[PipelexBundleBlueprint]) -> None:- """Keep contents-only resolution independent from installed methods on the host filesystem."""- for blueprint in blueprints:- for pipe_ref, _context in blueprint.collect_pipe_references():- if not QualifiedRef.has_cross_package_prefix(pipe_ref):- continue- alias, _remainder = QualifiedRef.split_cross_package_ref(pipe_ref)- if QualifiedRef.is_address_based_alias(alias):- msg = unshipped_address_dependency_message(alias=alias)- raise (- PipeLibraryError(msg)- .with_error_code(CoreCode.REQUEST_UNSUPPORTED)- .with_params(field="files", reason=ADDRESS_DEPENDENCY_UNSUPPORTED_REASON)- )diff --git a/pipelex/pipeline/validate_bundle_translation.py b/pipelex/pipeline/validate_bundle_translation.pyindex f3dafc124..c9afdbad3 100644--- a/pipelex/pipeline/validate_bundle_translation.py+++ b/pipelex/pipeline/validate_bundle_translation.py@@ -2,7 +2,7 @@Every surface that loads a bundle and must answer with a verdict wraps its load in:func:`translate_to_validate_bundle_error`: ``validate_bundle`` and ``validate_bundles_from_directory``,-``resolve_crate_from_contents``, the library loads of the ``validate`` commands, and the run path's+``resolve_crate_from_method_dir``, the library loads of the ``validate`` commands, and the run path's``acquire_library``, so a run refuses an invalid bundle with the same located items ``validate`` gives.It lives in its own module, rather than beside ``validate_bundle``, because the run path's seams sitbelow the validation service in the import graph (``validate_bundle`` → ``bundle_validator`` →@@ -86,7 +86,7 @@ def translate_to_validate_bundle_error() -> Generator[None, None, None]:Single source of truth for the bundle-loading error cascade, shared by thebundle-loading entry points: ``validate_bundle``, ``validate_bundles_from_directory``,- ``pipelex.pipeline.resolve_bundle.resolve_crate_from_contents``, the library loads and+ ``pipelex.pipeline.resolve_bundle.resolve_crate_from_method_dir``, the library loads anddry-run sweeps of the ``validate pipe`` / ``validate --all`` commands, and the run path's``pipelex.pipeline.execution_seams.acquire_library``, so running an invalid bundle is refused withthe same items validating it gives.diff --git a/tests/integration/pipelex/pipeline/test_data.py b/tests/integration/pipelex/pipeline/test_data.pyindex 5a74d58df..3a05c56df 100644--- a/tests/integration/pipelex/pipeline/test_data.py+++ b/tests/integration/pipelex/pipeline/test_data.py@@ -880,7 +880,7 @@ prompt = "Count the items in $note"class ResolveBundleTestData:- """Bundles the host-facing resolve cores are pinned with."""+ """Bundles the host-facing resolve core is pinned with."""MAIN_MTHDS: ClassVar[str] = """\domain = "pipeline"diff --git a/tests/integration/pipelex/pipeline/test_resolve_bundle.py b/tests/integration/pipelex/pipeline/test_resolve_bundle.pydeleted file mode 100644index b869ffaa7..000000000--- a/tests/integration/pipelex/pipeline/test_resolve_bundle.py+++ /dev/null@@ -1,109 +0,0 @@-"""Integration: ``resolve_crate_from_contents`` — the in-memory (host-facing) resolve core.--Pins the contract the HTTP resolve/codegen routes build on: in-memory contents resolve to a-normalized crate through the same engine as the CLI, an invalid library raises the one shared-``ValidateBundleError``, and the library lifecycle honors the loaded-on-success /-torn-down-on-failure contract of ``validate_bundle``.-"""--from collections.abc import Callable--import pytest-from mthds.package.manifest.schema import MTHDS_STANDARD_VERSION-from mthds.protocol.problem.registry import CoreCode-from pytest_mock import MockerFixture--from pipelex.base_exceptions import PipelexUnexpectedError-from pipelex.errors.problem import ProblemView-from pipelex.errors.unsupported_reasons import ADDRESS_DEPENDENCY_UNSUPPORTED_REASON-from pipelex.interpreter_hub import clear_current_library, get_current_library_id_or_none, get_library_manager-from pipelex.libraries.pipe.exceptions import PipeLibraryError-from pipelex.methods.address_dependencies import ADDRESS_DEPENDENCY_REFUSAL_MARKER-from pipelex.pipeline.exceptions import ValidateBundleError-from pipelex.pipeline.resolve_bundle import resolve_crate_from_contents-from tests.integration.pipelex.pipeline.test_data import ResolveBundleTestData--MAIN_MTHDS = ResolveBundleTestData.MAIN_MTHDS-STEPS_MTHDS = ResolveBundleTestData.STEPS_MTHDS-INVALID_MTHDS = ResolveBundleTestData.INVALID_MTHDS-ADDRESS_DEPENDENCY_MTHDS = ResolveBundleTestData.ADDRESS_DEPENDENCY_MTHDS---class TestResolveCrateFromContents:- def test_multi_bundle_contents_resolve_to_normalized_crate(self, load_empty_library: Callable[[], str]):- """A multi-bundle in-memory closure resolves to a flat, fully-qualified, natives-materialized crate,- and the library is left loaded + current for the host (which then owns teardown).- """- load_empty_library()- library_manager = get_library_manager()- crate = resolve_crate_from_contents(- mthds_contents=[MAIN_MTHDS, STEPS_MTHDS],- mthds_sources=["main.mthds", "steps.mthds"],- )- library_id = get_current_library_id_or_none()- try:- assert crate.fingerprint- assert crate.mthds_version == MTHDS_STANDARD_VERSION- assert "pipeline.Report" in crate.concepts- assert "pipeline.Score" in crate.concepts- assert "native.Text" in crate.concepts, "referenced natives must be materialized into the normalized crate"- assert "pipeline.run_pipeline" in crate.pipes- assert "pipeline.compute_score" in crate.pipes- # Sources threaded onto the blueprints surface in the crate's provenance map.- assert crate.source_map.get("pipeline.run_pipeline") == "main.mthds"- assert crate.source_map.get("pipeline.compute_score") == "steps.mthds"- # Loaded-on-success: the freshly opened library is current, so the host can read live pipes.- assert library_id is not None- finally:- clear_current_library()- if library_id is not None:- library_manager.teardown(library_id=library_id)-- def test_invalid_contents_raise_shared_verdict_and_tear_down(self, load_empty_library: Callable[[], str], mocker: MockerFixture):- """An invalid library raises the one shared ValidateBundleError (structured items present),- the opened library is torn down, and the caller's current-library state is restored.- """- load_empty_library()- library_manager = get_library_manager()- open_library_spy = mocker.spy(library_manager, "open_library")- teardown_spy = mocker.spy(library_manager, "teardown")- current_before = get_current_library_id_or_none()-- teardown_calls_before = teardown_spy.call_count- with pytest.raises(ValidateBundleError) as exc_info:- resolve_crate_from_contents(mthds_contents=[INVALID_MTHDS], mthds_sources=["broken.mthds"])-- assert exc_info.value.validation_error_items(), "the shared builder must produce structured validation-error items"-- assert teardown_spy.call_count == teardown_calls_before + 1- opened_library_id, _ = open_library_spy.spy_return- assert teardown_spy.call_args_list[-1].kwargs["library_id"] == opened_library_id- assert get_current_library_id_or_none() == current_before-- def test_empty_contents_are_a_host_wiring_error(self):- with pytest.raises(PipelexUnexpectedError):- resolve_crate_from_contents(mthds_contents=[])-- def test_sources_length_mismatch_is_a_host_wiring_error(self):- with pytest.raises(PipelexUnexpectedError):- resolve_crate_from_contents(mthds_contents=[MAIN_MTHDS], mthds_sources=["a.mthds", "b.mthds"])-- def test_address_dependency_is_rejected_without_filesystem_discovery(self, load_empty_library: Callable[[], str], mocker: MockerFixture) -> None:- load_empty_library()- discovery = mocker.patch(- "pipelex.libraries.library_manager.resolve_address_based_method",- side_effect=AssertionError("in-memory resolve must not discover installed methods or fetch by address"),- )-- with pytest.raises(PipeLibraryError) as exc_info:- resolve_crate_from_contents(mthds_contents=[ADDRESS_DEPENDENCY_MTHDS], mthds_sources=["host.mthds"])-- discovery.assert_not_called()- # The request is what pipe-io cannot serve, not the method, so the refusal is no verdict: its problem carries the- # code and the reason a hosted run tells this refusal apart by.- assert not isinstance(exc_info.value, ValidateBundleError)- problem = exc_info.value.to_problem(view=ProblemView.CALLER)- assert problem.code == CoreCode.REQUEST_UNSUPPORTED- assert problem.to_wire().get("params") == {"field": "files", "reason": ADDRESS_DEPENDENCY_UNSUPPORTED_REASON}- # The operator's message quotes the dependency after the marker the tree resolution's verdict items carry too.- assert f"{ADDRESS_DEPENDENCY_REFUSAL_MARKER} 'github.com/org/pkg'" in exc_info.value.messagediff --git a/tests/integration/pipelex/pipeline/test_resolve_crate_from_method_dir.py b/tests/integration/pipelex/pipeline/test_resolve_crate_from_method_dir.pyindex be1475f82..2fae929c9 100644--- a/tests/integration/pipelex/pipeline/test_resolve_crate_from_method_dir.py+++ b/tests/integration/pipelex/pipeline/test_resolve_crate_from_method_dir.py@@ -50,6 +50,8 @@ class TestResolveCrateFromMethodDir:try:assert crate.fingerprintassert crate.mthds_version == MTHDS_STANDARD_VERSION+ assert "pipeline.Report" in crate.concepts+ assert "pipeline.Score" in crate.conceptsassert "pipeline.run_pipeline" in crate.pipesassert "pipeline.compute_score" in crate.pipesassert "native.Text" in crate.concepts, "referenced natives must be materialized into the normalized crate"@@ -82,6 +84,7 @@ class TestResolveCrateFromMethodDir:open_library_spy = mocker.spy(library_manager, "open_library")teardown_spy = mocker.spy(library_manager, "teardown")current_before = get_current_library_id_or_none()+ teardown_calls_before = teardown_spy.call_countwith _written_tree(destination=tmp_path / "method", files=files) as method_dir, pytest.raises(ValidateBundleError) as exc_info:resolve_crate_from_method_dir(method_dir=method_dir)@@ -96,6 +99,7 @@ class TestResolveCrateFromMethodDir:else:assert "holds no .mthds bundle" in exc_info.value.messageopened_library_id, _ = open_library_spy.spy_return+ assert teardown_spy.call_count == teardown_calls_before + 1assert teardown_spy.call_args_list[-1].kwargs["library_id"] == opened_library_idassert get_current_library_id_or_none() == current_before@@ -133,8 +137,8 @@ class TestResolveCrateFromMethodDir:resolve_crate_from_method_dir(method_dir=method_dir)discovery.assert_not_called()- # The unresolved dependency `/v1/validate` reports, located on the pipe calling it, in the words of the contents- # core's refusal.+ # The unresolved dependency `/v1/validate` reports, located on the pipe calling it, in the words of+ # `unshipped_address_dependency_message`.validation_errors = exc_info.value.validation_error_items()assert len(validation_errors) == 1, validation_errorsitem = validation_errors[0]diff --git a/tests/integration/pipelex/pipeline/test_validate_bundle_clean_summary.py b/tests/integration/pipelex/pipeline/test_validate_bundle_clean_summary.pyindex fe20de109..c5bded720 100644--- a/tests/integration/pipelex/pipeline/test_validate_bundle_clean_summary.py+++ b/tests/integration/pipelex/pipeline/test_validate_bundle_clean_summary.py@@ -1,7 +1,7 @@"""Pin: a pydantic ValidationError surfacing through the shared helper produces a clean summary.The shared bundle-loading cascade ``translate_to_validate_bundle_error`` serves every entry point-(``validate_bundle*``, ``resolve_crate_from_contents``). A pydantic ``ValidationError`` raised+(``validate_bundle*``, ``resolve_crate_from_method_dir``). A pydantic ``ValidationError`` raisedduring model construction surfaces as a single ``ValidateBundleError`` whose top-line ``message``must NOT leak the pydantic repr (``Value errors: '<field>': Value error, …``) nor the old``Could not load blueprints/concepts because of:`` framing prefix that rode on it. Instead thediff --git a/tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_submitted_files.py b/tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_submitted_files.pyindex c30f3b5b2..6cc650f3f 100644--- a/tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_submitted_files.py+++ b/tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_submitted_files.py@@ -19,7 +19,6 @@ from pipelex.errors.registry.pipelex_codes import PipelexErrorCodefrom pipelex.pipe_operators.doc_gen.pipe_doc_gen import PipeDocGenfrom pipelex.pipe_operators.doc_gen.template_file_stage import DocGenTemplateFileStagefrom pipelex.pipeline.exceptions import ValidateBundleError-from pipelex.pipeline.resolve_bundle import resolve_crate_from_contentsfrom pipelex.pipeline.runner import PipelexMTHDSProtocolfrom pipelex.pipeline.validate_bundle import validate_bundlefrom pipelex.system.pipe_run_mode import PipeRunMode@@ -57,12 +56,10 @@ def _bundle_file_climbing_in_its_method_tree(*, method_dir: Path) -> Path:async def _load_from_content(*, load: str, content: str, submitted_files: dict[str, bytes] | None) -> None:- """Validate the content, resolve its crate or run it, as the runner's routes do with a bundle sent as a string."""+ """Validate the content or run it, as the runner's routes do with a bundle sent as a string."""match load:case "validate":await validate_bundle(mthds_contents=[content], submitted_files=submitted_files)- case "resolve":- resolve_crate_from_contents(mthds_contents=[content], submitted_files=submitted_files)case _:await PipelexMTHDSProtocol(submitted_files=submitted_files).execute(mthds_contents=[content], inputs=PipeDocGenTestData.INVOICE_INPUTS)@@ -120,7 +117,7 @@ class TestPipeDocGenSubmittedFiles:@pytest.mark.usefixtures("stub_engines")@pytest.mark.parametrize("template_file", ["../invoice.docx", "templates/../invoice.docx"], ids=["leaves_the_bundle", "dot_dot_inside"])- @pytest.mark.parametrize("load", ["validate", "resolve", "run"])+ @pytest.mark.parametrize("load", ["validate", "run"])@pytest.mark.parametrize("sends_a_file", [False, True], ids=["sends_nothing", "sends_a_file"])async def test_a_template_file_no_submitted_file_could_be_keyed_by_is_a_blueprint_item_at_the_step(self, template_file: str, load: str, sends_a_file: booldiff --git a/tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py b/tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.pyindex dd3ca07bd..cdf8d5a97 100644--- a/tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py+++ b/tests/integration/pipelex/pipes/operator/pipe_doc_gen/test_pipe_doc_gen_template_files.py@@ -14,6 +14,7 @@ from pipelex.errors.problem import ProblemViewfrom pipelex.errors.registry.pipelex_codes import PipelexErrorCodefrom pipelex.pipe_operators.doc_gen.pipe_doc_gen import PipeDocGenfrom pipelex.pipeline.exceptions import ValidateBundleError+from pipelex.pipeline.resolve_bundle import resolve_crate_from_method_dirfrom pipelex.pipeline.validate_bundle import ValidateBundleResult, validate_bundlefrom tests.integration.pipelex.pipes.operator.pipe_doc_gen.doc_gen_helpers import (METHOD_MANIFEST,@@ -42,6 +43,15 @@ async def _validate_with_html_template_file(*, directory: Path, load: str, templ)+async def _load_method(*, load: str, method_dir: Path, bundle_path: Path) -> None:+ """Validate the bundle file, or resolve the crate of its method's folder as the runner's crate routes do."""+ match load:+ case "validate":+ await validate_bundle(mthds_file_path=bundle_path)+ case _:+ resolve_crate_from_method_dir(method_dir=method_dir)++@pytest.mark.asyncio(loop_scope="class")class TestPipeDocGenTemplateFiles:@pytest.mark.usefixtures("stub_engines")@@ -58,10 +68,11 @@ class TestPipeDocGenTemplateFiles:],ids=["missing_file", "gitignored", "hidden"],)+ @pytest.mark.parametrize("load", ["validate", "resolve"])async def test_a_template_file_is_a_file_of_the_bundle_s_method_tree(- self, tmp_path: Path, template_file: str, expected_code: CoreCode, expected: str+ self, tmp_path: Path, template_file: str, expected_code: CoreCode, expected: str, load: str) -> None:- """A template file must be a file of the method's tree: one its membership rule keeps out is never read."""+ """A template file must be a file of the method's tree, validated or resolved: one its membership rule keeps out is never read."""method_dir = tmp_path / "method"method_dir.mkdir()(method_dir / "ignored.docx").write_bytes(b"docx")@@ -71,13 +82,14 @@ class TestPipeDocGenTemplateFiles:bundle_path = write_bundle(directory=method_dir, step_fields=f'format = "docx"\ntemplate_file = "{template_file}"')with pytest.raises(ValidateBundleError) as exc_info:- await validate_bundle(mthds_file_path=bundle_path)+ await _load_method(load=load, method_dir=method_dir, bundle_path=bundle_path)assert only_problem_item(exc_info.value).code == expected_codeassert expected in refusal_messages(exc_info.value)@pytest.mark.usefixtures("stub_engines")- async def test_a_template_file_outside_the_tree_is_the_method_s_security_refusal_not_a_verdict(self, tmp_path: Path) -> None:+ @pytest.mark.parametrize("load", ["validate", "resolve"])+ async def test_a_template_file_outside_the_tree_is_the_method_s_security_refusal_not_a_verdict(self, tmp_path: Path, load: str) -> None:"""A template file that climbs out of the method's tree is refused under its security code, never absorbed into a verdict."""method_dir = tmp_path / "method"method_dir.mkdir()@@ -85,7 +97,7 @@ class TestPipeDocGenTemplateFiles:bundle_path = write_bundle(directory=method_dir, step_fields='format = "docx"\ntemplate_file = "../outside.docx"')with pytest.raises(PipelexError) as exc_info:- await validate_bundle(mthds_file_path=bundle_path)+ await _load_method(load=load, method_dir=method_dir, bundle_path=bundle_path)assert not isinstance(exc_info.value, ValidateBundleError)assert exc_info.value.resolve_error_code() == CoreCode.SECURITY_METHOD_PATH_REFUSEDdiff --git a/tests/unit/pipelex/hosted/test_data.py b/tests/unit/pipelex/hosted/test_data.pyindex fdb5e3b0f..cd60b343b 100644--- a/tests/unit/pipelex/hosted/test_data.py+++ b/tests/unit/pipelex/hosted/test_data.py@@ -120,8 +120,9 @@ class HostedPipeIoVerdicts:class HostedPipeIoRefusals:"""`POST /v1/pipe-io` refusals, as the runner answers them in the caller's view."""- # A method calling a published method by address: the crate core behind pipe-io loads no address-based dependency,- # which `/v1/start` fetches and runs. Built from `resolve_crate_from_contents`'s refusal on 2026-10-17.+ # A method calling a published method by address, refused by a runner older than 0.89.0, whose pipe-io resolved the+ # method from content strings and loaded no address-based dependency, which `/v1/start` fetches and runs. Built from+ # that runner's refusal on 2026-10-17.ADDRESS_DEPENDENCY: ClassVar[str] = ('{"type": "https://mthds.ai/errors/request.unsupported", "title": "The request uses a form this runtime does not accept", ''"status": 422, "detail": "This runtime does not accept the form the request\'s field \'files\' uses (reason: '