installer-setup WS-F: thread single npu_opt_in through suggest+apply; gate NPU intro on present+healthy#1134
Merged
Merged
Conversation
… gate NPU intro on present+healthy suggest_models() hardcoded npu_opt_in=True while apply_setup used the real value, so the picker could advertise an NPU slot apply_setup then skipped. Thread ONE npu_opt_in through both, and fold NPU health into that single boolean at every decision point so the picker never advertises a lane apply will skip. - suggest_models gains npu_opt_in (default False) → derive_device; callers pass the real value. - New profile_derive.npu_healthy(hw): present AND npu.validated is True (the #1097 hardware.json fact). Present-but-broken (False) and unvalidated (None) are both unhealthy. - setup_ui: the "npu" enable offer shows ONLY when present + healthy; a present-but-broken NPU gets a new "npu_broken" remedy step instead of the offer. npu_opt_in threads into the capability slot picker (NPU-only stt). - --auto (build_auto_selections) and answer-file npu.opt_in: auto both resolve to present-AND-healthy via npu_healthy. Closes #1109 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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
Part of the guided Hal0 Installer Setup redesign (Wave 3 / WS-F, decision Q15).
suggest_models()hardcodednpu_opt_in=Truewhileapply_setupused the real value, so the picker could advertise an NPU slot thatapply_setupthen skipped. This threads ONEnpu_opt_inthrough both suggest + apply, and folds NPU health into that single boolean at every decision point — so the picker never advertises a lane apply will skip.Changes
suggest.py—suggest_modelsgainsnpu_opt_in(defaultFalse), threaded straight intoderive_device(the SAME valueapply_setupuses). Stops hardcodingTrue.profile_derive.py— newnpu_healthy(hw): single source of truth =present AND npu.validated is True(the installer-setup WS-B: persist authoritative hardware.json at install (incl. NPU functional result) #1097hardware.jsonfact — passthrough / render-group GID reachable). Present-but-broken (validated is False) and never-validated (None) are both unhealthy.setup_ui.py— thenpuenable-offer step shows only when present + healthy; a present-but-broken NPU gets a newnpu_brokenremedy step (explains the amdxdna passthrough / libxrt-npu2 fix) instead of the enable offer.npu_opt_inalso threads into the capability-slot picker so the NPU-onlysttslot advertises the NPU lane only once opted in.setup_copy.py— adds thenpu_brokenpane copy.setup_command.py/answers.py—--auto(build_auto_selections) and the answer-filenpu.opt_in: autoboth now resolve to present-AND-healthy vianpu_healthy, so an unvalidated / broken NPU never auto-advertises a lane apply skips.apply_setup's slot-creation / enable / context-clamp region (issue #1108) is untouched: NPU health is carried by the singlenpu_opt_inboolean rather than re-checked in the slot loop.Acceptance criteria
npu_opt_inflows through suggest + apply (picker never advertises a device it will skip)npu.opt_infeeds the single threadednpu_opt_in;autoresolves to present-AND-healthyTests
Added:
npu_healthytruth-table,suggest_modelsdevice threading (stt lane on/off),plan_stepspresent-healthy→npuvs present-broken→npu_broken,npu_brokenpane copy, and answer-fileauto→ present-AND-healthy / off-when-broken / off-when-absent.ruff format/ruff check/ruff format --checkclean. Fullpytest: 4681 passed; the 18 failures + 1 error are all pre-existing onorigin/main(confirmed viagit stash) — hermes venv, comfyui phase4, proxmox host detection, container spec dispatch, config-url-proxy, models-preview, settings-store, and the_StubProbe.probe(validate_npu=…)fixture gap from #1118 (setup-plan / emit-answers CLI). No new failures.Closes #1109
🤖 Generated with Claude Code