feat: Rust recipe runner integration with engine selection#2951
feat: Rust recipe runner integration with engine selection#2951
Conversation
|
🤖 Auto-fixed version bump The version in If you need a minor or major version bump instead, please update |
Repo Guardian - Passed✅ All files are durable repository content Reviewed 6 changed files:
No ephemeral content detected (no meeting notes, temporary scripts, or point-in-time documents).
|
1c447a3 to
902cfa8
Compare
|
🤖 Auto-fixed version bump The version in If you need a minor or major version bump instead, please update |
c5dd179 to
c0d3e13
Compare
|
🤖 Auto-fixed version bump The version in If you need a minor or major version bump instead, please update |
🤖 PR Triage CompleteRisk Level: Medium-High (6.5/10) 📊 SummaryThis PR integrates a Rust recipe runner as an alternative execution engine with automatic selection and graceful fallback to Python. Changes:
|
PR-M1: Split run_recipe_via_rust into focused helpers PR-M2: Configurable timeouts via env vars PR-M3: Remove point-in-time Python references in docs PR-M4: Remove hardcoded counts from docs PR-M5: Add tests for empty results and exception paths PR-L1: Redact context values in log output PR-L2: Lazy binary search path evaluation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🟡 Triage Result: NEEDS CONFLICT RESOLUTIONPriority: MEDIUM-HIGH | Risk: HIGH AssessmentHigh-value Rust recipe runner integration with manageable scope, but merge conflicts prevent automated merging. Stats:
Blockers❌ Merge conflicts - must be resolved before review Recommended Action
Why This MattersRecipe runner integration is foundational infrastructure. Clean merge critical for:
Related Issues
Automated triage by PR Triage Agent - Run #22827330377
|
Adds the Rust recipe runner binary integration with automatic engine selection and startup dependency management. - src/amplihack/recipes/rust_runner.py: Binary wrapper with find, ensure, and execute functions. RustRunnerNotFoundError for explicit failures. ensure_rust_recipe_runner() auto-installs via cargo if binary is missing. - src/amplihack/recipes/__init__.py: Engine selection via RECIPE_RUNNER_ENGINE env var (rust/python/auto-detect). Exports ensure_rust_recipe_runner. - src/amplihack/install.py: Step 6.5 ensures binary during amplihack install. - tests/recipes/test_rust_runner.py: 26 tests covering discovery, execution, engine selection, and ensure flow. - docs/recipes/README.md: Documents engine selection and auto-install. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Validate RECIPE_RUNNER_ENGINE values (raise ValueError on unknown) - Add non-interactive footer to NestedSessionAdapter - Add session depth tracking to NestedSessionAdapter Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PR-M1: Split run_recipe_via_rust into focused helpers PR-M2: Configurable timeouts via env vars PR-M3: Remove point-in-time Python references in docs PR-M4: Remove hardcoded counts from docs PR-M5: Add tests for empty results and exception paths PR-L1: Redact context values in log output PR-L2: Lazy binary search path evaluation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…th (C2-PR-1, C2-PR-2, C2-PR-6, C2-PR-9, C2-PR-10) C2-PR-1: Raise ValueError on invalid RECIPE_RUNNER_ENGINE values C2-PR-2: Log full traceback for ensure_rust_recipe_runner failures C2-PR-6: Enforce AMPLIHACK_MAX_DEPTH in execute_agent_step C2-PR-9: Add test for invalid engine value validation C2-PR-10: Add test for execution timeout propagation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…g_dir (C2-INT-3/4/5/6/7/10) C2-INT-3: Serialize Duration as f64 seconds (Rust repo) C2-INT-4/5/6: Document Rust-only features in engine comparison table C2-INT-7: Document all environment variables C2-INT-10: Resolve working_dir to absolute path to prevent double-application Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ority test (C3-PR-1/2/3) C3-PR-1: Print warning on install exception (was silent) C3-PR-2: Return resolved path from find_rust_binary for env var path C3-PR-3: Fix false-confidence test with discriminating mock Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
33e5b79 to
16928c8
Compare
|
🤖 Auto-fixed version bump The version in If you need a minor or major version bump instead, please update |
Repo Guardian - Passed✅ All files are durable repository content Reviewed 8 changed files:
No ephemeral content detected (no meeting notes, temporary scripts, or point-in-time documents).
|
Rust Recipe Runner Integration
Integrates the standalone Rust recipe runner into amplihack with automatic engine selection and startup dependency management.
What's included
src/amplihack/recipes/rust_runner.py— Binary wrapper withfind_rust_binary(),ensure_rust_recipe_runner(), andrun_recipe_via_rust(). RaisesRustRunnerNotFoundErrorwhen the Rust engine is explicitly selected but the binary is missing (no silent fallback).src/amplihack/recipes/__init__.py— Engine selection viaRECIPE_RUNNER_ENGINEenv var:rust→ Rust binary only (fails if not installed)python→ Python runner onlysrc/amplihack/install.py— Step 6.5 automatically installs recipe-runner-rs duringamplihack installifcargois availabletests/recipes/test_rust_runner.py— 26 tests covering binary discovery, execution, JSON parsing, engine selection, and the ensure flowdocs/recipes/README.md— Documents engine selection table and auto-install.gitignore— Excludes recipe runner checkout directoryDesign Principles
RECIPE_RUNNER_ENGINE=rust, the binary must exist or execution fails with a clear errorensure_rust_recipe_runner()triescargo install --gitbut doesn't block startup if it failsTesting
uv run pytest tests/recipes/test_rust_runner.py -v # 26 tests