Thanks to visit codestin.com
Credit goes to github.com

Skip to content

installer-setup WS-F: thread single npu_opt_in through suggest+apply; gate NPU intro on present+healthy#1134

Merged
thinmintdev merged 1 commit into
mainfrom
feat/1109-npu-opt-in
Jul 6, 2026
Merged

installer-setup WS-F: thread single npu_opt_in through suggest+apply; gate NPU intro on present+healthy#1134
thinmintdev merged 1 commit into
mainfrom
feat/1109-npu-opt-in

Conversation

@thinmintdev

Copy link
Copy Markdown
Contributor

What

Part of the guided Hal0 Installer Setup redesign (Wave 3 / WS-F, decision Q15).

suggest_models() hardcoded npu_opt_in=True while apply_setup used the real value, so the picker could advertise an NPU slot that apply_setup then skipped. This threads ONE npu_opt_in through 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.pysuggest_models gains npu_opt_in (default False), threaded straight into derive_device (the SAME value apply_setup uses). Stops hardcoding True.
  • profile_derive.py — new npu_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) #1097 hardware.json fact — passthrough / render-group GID reachable). Present-but-broken (validated is False) and never-validated (None) are both unhealthy.
  • setup_ui.py — the npu enable-offer step shows only when present + healthy; a present-but-broken NPU gets a new npu_broken remedy step (explains the amdxdna passthrough / libxrt-npu2 fix) instead of the enable offer. npu_opt_in also threads into the capability-slot picker so the NPU-only stt slot advertises the NPU lane only once opted in.
  • setup_copy.py — adds the npu_broken pane copy.
  • setup_command.py / answers.py--auto (build_auto_selections) and the answer-file npu.opt_in: auto both now resolve to present-AND-healthy via npu_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 single npu_opt_in boolean rather than re-checked in the slot loop.

Acceptance criteria

  • A single npu_opt_in flows through suggest + apply (picker never advertises a device it will skip)
  • NPU intro shown only when present + healthy
  • Present-but-broken shows the remedy, not the enable offer
  • Answer-file npu.opt_in feeds the single threaded npu_opt_in; auto resolves to present-AND-healthy

Tests

Added: npu_healthy truth-table, suggest_models device threading (stt lane on/off), plan_steps present-healthy→npu vs present-broken→npu_broken, npu_broken pane copy, and answer-file auto → present-AND-healthy / off-when-broken / off-when-absent.

ruff format / ruff check / ruff format --check clean. Full pytest: 4681 passed; the 18 failures + 1 error are all pre-existing on origin/main (confirmed via git 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

… 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]>
@thinmintdev thinmintdev enabled auto-merge (squash) July 6, 2026 05:43
@thinmintdev thinmintdev merged commit 2f18ccf into main Jul 6, 2026
3 checks passed
@thinmintdev thinmintdev deleted the feat/1109-npu-opt-in branch July 6, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

installer-setup WS-F: thread single npu_opt_in through suggest+apply; gate NPU intro on present+healthy

1 participant