feat!: remove Python recipe runner — Rust-only execution#2962
Conversation
BREAKING: The Python recipe runner (RecipeRunner, RecipeContext, adapters/) has been removed. All recipe execution now goes through recipe-runner-rs. - Remove runner.py, context.py, and adapters/ directory - Update __init__.py to export only Rust runner functions - run_recipe_by_name() now always delegates to run_recipe_via_rust() - Accept but ignore `adapter` kwarg for backward compatibility - Update recipe_command.py CLI to use Rust runner - Update multitask orchestrator launcher to remove adapter import - Remove 12,241 lines of Python runner code and tests - Bump version to 0.6.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Repo Guardian - PassedAll 37 changed files have been reviewed. This PR contains legitimate code changes as part of the Python→Rust recipe runner migration:
✅ No ephemeral content detected (no meeting notes, investigation notes, temporary scripts, or point-in-time documents)
|
- Remove test_explicit_python_engine (engine no longer exists) - Remove test_auto_detect_uses_python_when_no_rust (no fallback) - Remove test_invalid_engine_raises_valueerror (env var not checked) - Add test_always_uses_rust, test_adapter_kwarg_accepted_but_ignored - Add test_python_runner_no_longer_importable, test_adapters_no_longer_importable - Add test_context_no_longer_importable Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
24 tests across 7 scenarios verifying from the user's perspective: 1. Real recipe dry-run execution (default-workflow, smart-orchestrator, investigation-workflow) — actually invokes the Rust binary 2. Recipe discovery and parsing (list, find, parse YAML, parse real file) 3. Python runner completely gone (modules, classes, source files) 4. Backward compatibility (adapter kwarg accepted but ignored) 5. Error behavior (clear error when Rust binary missing, unknown recipe) 6. Rust runner result structure (recipe_name, step_results, success) 7. CLI module clean (no RecipeRunner/CLISubprocessAdapter references) Also includes gadugi-agentic-test YAML scenario for CI integration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🔴 PR Triage: BLOCKED — Do Not MergeTriage Date: 2026-03-09T02:32:47Z SummaryThis PR removes the entire Python recipe runner (-12,241 LOC) and creates a hard dependency on the external Rust binary Critical Blockers (Must Fix Before Merge)1. ❌ Rust Binary Not in CIThe PR assumes Required action: Add step to CI workflow to install Rust toolchain + cargo binary 2. ❌ Test Plan IncompleteTest plan shows unchecked items:
Required action: Verify all tests pass with Rust runner before merge 3. ❌ No Fallback StrategyThe PR description states: "Prerequisites: recipe-runner-rs must be installed". There's no graceful degradation or fallback. Required action: Either:
4.
|
The adapters namespace package still exists (as an empty directory) but CLISubprocessAdapter was removed by PR #2962. The import raises ImportError (name not found in module), not ModuleNotFoundError (module itself missing). Also removed stale __pycache__ from the empty adapters directory. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rs (#2998) * fix: correct install message and add version check for recipe-runner-rs - install.py: Change misleading 'Python runner will be used' to 'recipe execution will fail without it' since Python runner was removed - rust_runner.py: Add get_runner_version(), check_runner_version(), MIN_RUNNER_VERSION constant for binary compatibility checking - Version check runs on every recipe execution (best-effort, warns on old binary) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * [skip ci] chore: Auto-bump patch version * fix: correct test_adapters_no_longer_importable exception type The adapters namespace package still exists (as an empty directory) but CLISubprocessAdapter was removed by PR #2962. The import raises ImportError (name not found in module), not ModuleNotFoundError (module itself missing). Also removed stale __pycache__ from the empty adapters directory. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * [skip ci] chore: Auto-bump patch version --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Summary
RecipeRunner,RecipeContext,adapters/) — -12,241 linesrecipe-runner-rs(Rust binary)run_recipe_by_name()acceptsadapterkwarg for backward compat but ignores itWhat was removed
runner.pycontext.pyadapters/(6 files)What was updated
recipes/__init__.py— Rust-onlyrun_recipe_by_name(), removed Python importsrecipe_cli/recipe_command.py—handle_runusesrun_recipe_via_rust()multitask/orchestrator.py— Launcher no longer importsCLISubprocessAdaptertests/workflows/test_regression.py— Updated import checkspyproject.toml— Version 0.5.121 → 0.6.0Migration
Prerequisites
recipe-runner-rsmust be installed:cargo install --git https://github.com/rysweet/amplihack-recipe-runnerTest plan
python -c "from amplihack.recipes import run_recipe_by_name"worksfrom amplihack.recipes import RecipeRunnerraisesImportErrorfrom amplihack.recipes.adapters import CLISubprocessAdapterraisesModuleNotFoundErrorrecipe-runner-rsis installed in CI environment🤖 Generated with Claude Code