fix: ensure Rust recipe runner on startup, add cargo to prerequisites#2957
Merged
fix: ensure Rust recipe runner on startup, add cargo to prerequisites#2957
Conversation
Contributor
|
🤖 Auto-fixed version bump The version in If you need a minor or major version bump instead, please update |
Contributor
Repo Guardian - PassedAll files in this PR are durable content:
No ephemeral content detected. ✓
|
Closed
Contributor
|
🤖 Auto-fixed version bump The version in If you need a minor or major version bump instead, please update |
- Add ensure_rust_recipe_runner() call to copilot launcher startup - Add Rust/cargo to Prerequisites in README.md and PREREQUISITES.md - Add cargo install instructions to all platform sections (macOS, Ubuntu, Fedora, Arch) - Add cargo --version to verification commands Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move ensure_rust_recipe_runner() from copilot-only to a shared _ensure_rust_recipe_runner() function called from all 6 launcher entry points: launch, claude, RustyClawd, copilot, codex, amplifier. Previously only copilot and install had the check, leaving 4 paths uncovered. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extract nesting detection, framework staging, Rust recipe runner check, SDK dep check, and power-steering prompt into a single idempotent function called from all 5 launcher entry points. Before: launch_command() had 7 init steps; copilot/codex/amplifier only had staging + rust runner. Now all paths get identical init. Also fixes 6 pre-existing test failures in test_cli_claude_command_guard by mocking _common_launcher_startup (staging sys.exit(1) was leaking through the test harness). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Covers: - Idempotency guard (double-call safe for RustyClawd → launch_command) - subprocess_safe skip - Nesting detection and auto-staging - Startup steps order (staged → rust → sdk → power-steering) - Non-fatal failure handling for SDK deps and power-steering - _ensure_rust_recipe_runner output (success, warning, import error) - All 6 launcher paths call _common_launcher_startup Outside-in verified: each launcher command (launch, claude, RustyClawd, copilot, codex, amplifier) shows 'Rust recipe runner available' in real subprocess output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5126b4d to
11e4151
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Consolidates all launcher startup initialization into a single
_common_launcher_startup()function, ensuring every amplihack launcher path gets identical initialization.Why
Previously,
launch_command()had 7 init steps while copilot/codex/amplifier only had 2 (staging + rust runner). Missing from those paths:Changes
src/amplihack/cli.py_common_launcher_startup(args)— idempotent function with all 5 init steps_ensure_rust_recipe_runner()— standalone helper for Rust recipe runner checklaunch_command()now delegates init to_common_launcher_startup()_common_launcher_startup()instead of duplicating_ensure_amplihack_staged()+_ensure_rust_recipe_runner()launch_command()src/amplihack/launcher/copilot.pyensure_rust_recipe_runner()call (now handled by_common_launcher_startup())tests/test_common_launcher_startup.py(NEW — 19 tests)_ensure_rust_recipe_runneroutput verification_common_launcher_startup()tests/test_cli_claude_command_guard.py_common_launcher_startupTesting
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com