Skip to content

fix(recipe-runner): auto-update rust runner binary on version mismatch (#4189)#4199

Open
rysweet wants to merge 1 commit intomainfrom
fix/recipe-runner-auto-update-4189
Open

fix(recipe-runner): auto-update rust runner binary on version mismatch (#4189)#4199
rysweet wants to merge 1 commit intomainfrom
fix/recipe-runner-auto-update-4189

Conversation

@rysweet
Copy link
Copy Markdown
Owner

@rysweet rysweet commented Apr 3, 2026

Summary

Fixes ensure_rust_recipe_runner() to upgrade the binary when it's present but outdated, not just when it's absent.

Root Cause

ensure_rust_recipe_runner() previously returned True immediately if any binary was found via is_rust_runner_available(), even if check_runner_version() would have returned False.

Changes

  • src/amplihack/recipes/rust_runner.py: Split the early-return check into two cases:
    1. Present + compatible → return True immediately (unchanged behaviour)
    2. Present + outdated → log a message and fall through to cargo install to upgrade
  • Updated docstring to reflect new behaviour
  • docs/atlas/ast-lsp-bindings/: Refreshed atlas layer 8 to clear CI staleness check

Closes #4159
Related: #4188, #4169

ensure_rust_recipe_runner() previously only installed the binary when
absent, but silently used a stale/incompatible version if it was
already present. Now checks the version via check_runner_version()
and triggers a re-install via cargo if the binary is outdated.

Fixes #4159 (recipe-runner-rs not auto-updated on version mismatch)
Atlas layer 8 (ast-lsp-bindings) refreshed for changed modules.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 3, 2026

Repo Guardian - Passed

All 3 changed files passed inspection — no ephemeral content or temporary scripts detected.

File Assessment
docs/atlas/ast-lsp-bindings/ast-lsp-bindings.mmd Auto-generated Mermaid diagram reflecting new modules (rust_runner, core, knowledge_acquirer, question_generator). Durable architectural documentation.
docs/atlas/ast-lsp-bindings/index.md Atlas index with an updated Generated: timestamp. Part of the persistent code-atlas system, not a point-in-time status document.
src/amplihack/recipes/rust_runner.py Source code fix adding version-check logic to ensure_rust_recipe_runner. Permanent production code.

Generated by Repo Guardian for issue #4199 ·

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 3, 2026

PR Triage Report

Risk: 🟢 Low | Priority: Medium | Type: Bug fix

Assessment

Targeted fix for ensure_rust_recipe_runner() to upgrade outdated binaries (closes #4159). Change is scoped to src/amplihack/recipes/rust_runner.py plus atlas doc refresh.

⚠️ Possible supersession: PR #4203 modifies the same file (src/amplihack/recipes/rust_runner.py) as part of a broader smart-orchestrator teardown fix. Verify whether #4203 already includes this fix before merging to avoid conflicts or duplicate changes.

⚠️ Base drift: Base SHA 6966ad20 does not match current main (9a218fe7). Rebase required before merge.

Recommendation

Hold pending #4203 review. If #4203 subsumes this fix, close this PR. Otherwise, rebase and merge independently.

Generated by PR Triage Agent ·

This was referenced Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: recipe runner version check should auto-update, not just error

1 participant