[PR #1227] [CLOSED] mcp: the install plan follows setup's AMD rules - Windows AMD and vision=cpu on Linux are planned (#990) #3324

Closed
opened 2026-11-07 14:40:39 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1227
Author: @BGonnermann
Created: 10/6/2026
Status: ❌ Closed

Base: main ← Head: mcp/amd-install-plan-990


📝 Commits (1)

  • 775a323 mcp: the install plan follows setup's AMD rules - Windows AMD and vision=cpu on Linux are planned (#990)

📊 Changes

3 files changed (+161 additions, -22 deletions)

View changed files

📝 docs/MCP_SERVER.md (+5 -0)
📝 tools/strata_mcp.py (+49 -22)
📝 tools/test_strata_mcp.py (+107 -0)

📄 Description

Fixes #990.

The problem

strata_install (the MCP server's install planner) kept its own copy of the AMD rules, and the copy was older than
setup's:

  • backend: hip on Windows was refused ("runs on Linux only"), although setup installs the ready-made Windows AMD
    engine since 0.1.34.
  • Any vision other than no with backend: hip was refused, although --vision cpu works on Linux AMD since 0.1.32.
  • The hardware check listed AMD cards on Linux only, so on Windows an AMD-only PC got no recommendation.

The change

Where Change
Strata.amd_images() (new) Asks setup.py's own hip_vision what --vision gives on an AMD card, so the plan and setup cannot drift apart. The same rule is built in for when setup.py does not import. Setup's warning is kept out of stdout.
install_plan The Windows guard is gone. vision: cpu plans where setup supports it. vision: yes / gpu on an AMD card is still refused, because setup would only switch images off; the message now names vision=cpu. gpus with an AMD card on Windows is refused, where setup stops too.
install_plan, no backend given On an AMD-only PC setup picks the AMD engine by itself, so the same image rule applies there. Before, vision: yes passed the plan and setup dropped the images silently.
_hardware AMD cards are listed on Windows from setup's amd_gpus_windows() (display adapters and registry).
recommend An unsupported AMD card is named with setup's reason instead of "AMD cards run on Linux only"; the AMD note says what the platform gets.
Tool descriptions, docs/MCP_SERVER.md Updated to match.

Two things to know

  • On Windows the hardware check does not call amd_gpus(): with an AMD engine installed that runs
    strata-device --list-devices and copies runtime files beside it, and strata_status is a read-only tool. So the
    card numbering can differ from setup's once an AMD engine is installed. Say so if you would rather have setup's
    numbering there.
  • #1156 removes the Windows gate in hip_vision. The planner follows it without a change here; one assertion in
    test_amd_cards_are_listed_on_windows ("no images") and the Windows rows of test_amd_plans_follow_setup would
    then need updating.

Tests

python -m unittest tools/test_strata_mcp.py: 27 pass (23 before, 4 new), on Windows 11, Python 3.14.7. No GPU and no
download; the hardware is mocked, and Linux / Windows are both run by patching WIN.

  • test_amd_plans_follow_setup: Linux AMD + vision: cpu plans; yes / gpu refused; Windows AMD text plans;
    Windows AMD images refused; Windows AMD gpus refused. Every case checks that nothing was started.
  • test_amd_is_recognized_without_backend: the AMD-only PC with backend left out or auto; a PC with an NVIDIA card
    keeps vision: yes.
  • test_amd_image_rule_is_setups: amd_images equals setup.hip_vision for every value on both systems, and so does
    the built-in rule.
  • test_amd_cards_are_listed_on_windows: a supported card is recommended with the AMD engine; an integrated Radeon is
    named with setup's reason; the engine probe is not run.

python tools/test_setup_amd.py: 30 pass.

Not tested on a real AMD card: this PC has an RTX 5070 Ti and an integrated Radeon (listed as not supported, as it
should be). The issue's own request (backend: hip, vision: cpu, confirm: false) was replayed here on Windows: it
is refused for Windows only, and the same request without vision returns a plan.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1227 **Author:** [@BGonnermann](https://github.com/BGonnermann) **Created:** 10/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `mcp/amd-install-plan-990` --- ### 📝 Commits (1) - [`775a323`](https://github.com/Niko1221/Strata/commit/775a32350f789d9af6952fd41a1a4efe30566902) mcp: the install plan follows setup's AMD rules - Windows AMD and vision=cpu on Linux are planned (#990) ### 📊 Changes **3 files changed** (+161 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `docs/MCP_SERVER.md` (+5 -0) 📝 `tools/strata_mcp.py` (+49 -22) 📝 `tools/test_strata_mcp.py` (+107 -0) </details> ### 📄 Description Fixes #990. ## The problem `strata_install` (the MCP server's install planner) kept its own copy of the AMD rules, and the copy was older than setup's: - `backend: hip` on Windows was refused ("runs on Linux only"), although setup installs the ready-made Windows AMD engine since 0.1.34. - Any `vision` other than `no` with `backend: hip` was refused, although `--vision cpu` works on Linux AMD since 0.1.32. - The hardware check listed AMD cards on Linux only, so on Windows an AMD-only PC got no recommendation. ## The change | Where | Change | |---|---| | `Strata.amd_images()` (new) | Asks `setup.py`'s own `hip_vision` what `--vision` gives on an AMD card, so the plan and setup cannot drift apart. The same rule is built in for when `setup.py` does not import. Setup's warning is kept out of stdout. | | `install_plan` | The Windows guard is gone. `vision: cpu` plans where setup supports it. `vision: yes` / `gpu` on an AMD card is still refused, because setup would only switch images off; the message now names `vision=cpu`. `gpus` with an AMD card on Windows is refused, where setup stops too. | | `install_plan`, no `backend` given | On an AMD-only PC setup picks the AMD engine by itself, so the same image rule applies there. Before, `vision: yes` passed the plan and setup dropped the images silently. | | `_hardware` | AMD cards are listed on Windows from setup's `amd_gpus_windows()` (display adapters and registry). | | `recommend` | An unsupported AMD card is named with setup's reason instead of "AMD cards run on Linux only"; the AMD note says what the platform gets. | | Tool descriptions, `docs/MCP_SERVER.md` | Updated to match. | ## Two things to know - On Windows the hardware check does not call `amd_gpus()`: with an AMD engine installed that runs `strata-device --list-devices` and copies runtime files beside it, and `strata_status` is a read-only tool. So the card numbering can differ from setup's once an AMD engine is installed. Say so if you would rather have setup's numbering there. - #1156 removes the Windows gate in `hip_vision`. The planner follows it without a change here; one assertion in `test_amd_cards_are_listed_on_windows` (`"no images"`) and the Windows rows of `test_amd_plans_follow_setup` would then need updating. ## Tests `python -m unittest tools/test_strata_mcp.py`: 27 pass (23 before, 4 new), on Windows 11, Python 3.14.7. No GPU and no download; the hardware is mocked, and Linux / Windows are both run by patching `WIN`. - `test_amd_plans_follow_setup`: Linux AMD + `vision: cpu` plans; `yes` / `gpu` refused; Windows AMD text plans; Windows AMD images refused; Windows AMD `gpus` refused. Every case checks that nothing was started. - `test_amd_is_recognized_without_backend`: the AMD-only PC with `backend` left out or `auto`; a PC with an NVIDIA card keeps `vision: yes`. - `test_amd_image_rule_is_setups`: `amd_images` equals `setup.hip_vision` for every value on both systems, and so does the built-in rule. - `test_amd_cards_are_listed_on_windows`: a supported card is recommended with the AMD engine; an integrated Radeon is named with setup's reason; the engine probe is not run. `python tools/test_setup_amd.py`: 30 pass. Not tested on a real AMD card: this PC has an RTX 5070 Ti and an integrated Radeon (listed as not supported, as it should be). The issue's own request (`backend: hip`, `vision: cpu`, `confirm: false`) was replayed here on Windows: it is refused for Windows only, and the same request without `vision` returns a plan. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:40:39 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3324
No description provided.