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

Skip to content

installer-setup: hal0 setup --plan dry-run preview#1121

Merged
thinmintdev merged 1 commit into
mainfrom
feat/1116-setup-plan
Jul 6, 2026
Merged

installer-setup: hal0 setup --plan dry-run preview#1121
thinmintdev merged 1 commit into
mainfrom
feat/1116-setup-plan

Conversation

@thinmintdev

Copy link
Copy Markdown
Contributor

Closes #1116

Summary

Adds hal0 setup --plan (alias --dry-run): resolves the answer file (or
--auto defaults) into a concrete Selections the SAME way the real run
would, then prints a "will create" table and writes NOTHING — no slot TOML,
no first-run sentinel, no pulls, no extension installs. This is the safe
preview / CI-gate surface from handoffs/hal0-setup-answers-spec-2026-07-05.md
§2 and §8.

  • New src/hal0/cli/setup_plan.py (kept separate from setup_command.py to
    minimize merge conflicts with the sibling --emit-answers PR installer-setup: hal0 setup --emit-answers round-trip #1117 touching
    the same callback): resolves selections via load_answers (when
    --answers is given) or build_auto_selections (otherwise), then renders:
    • Model store path + free space (shutil.disk_usage, warns below 10 GiB)
    • NPU opt-in
    • Slots table: name, port, resolved model, device/profile ("auto→derive"
      when not explicit), and a port-in-use check (socket bind probe)
    • Extensions to enable
    • ComfyUI capability defaults, if any
  • src/hal0/cli/setup_command.py: one new --plan/--dry-run typer.Option
    and one early-return branch — before any run_install/apply_setup call.
  • Resolution failures (e.g. a bad answer file) print the error and exit
    non-zero, so --plan is a usable CI gate. An answer file's strict: true
    flag additionally promotes the port-in-use check from a warning to an
    error exit.

Test plan

  • uv run ruff format src tests — 635 files unchanged
  • uv run ruff check src tests — all checks passed
  • uv run ruff format --check src tests — 635 files already formatted
  • uv run pytest tests/install/test_setup_plan.py tests/cli/ -q — 265 passed, 3 pre-existing hermes-venv failures (unrelated)
  • uv run pytest tests/ -q --ignore=tests/e2e — 4620 passed, 14 known pre-existing failures (hermes venv/wrapper, comfyui phase4, proxmox host detection, container spec, config-url-proxy, models-preview, settings-store) — none touch files this PR changes
  • --plan --auto prints the table and makes zero filesystem writes
  • --plan --answers <good file> prints resolved slots
  • --plan --answers <bad file> exits non-zero with the validation error
  • port-in-use is detected and flagged (and errors under strict: true)

🤖 Generated with Claude Code

Resolve the same Selections the real run would (via load_answers or
build_auto_selections) and print a "will create" table — slots, extensions,
ComfyUI defaults, model-store free space, port-in-use — writing NOTHING.
This is the safe preview / CI-gate surface from the setup-answers spec §2/§8.

Closes #1116.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@thinmintdev thinmintdev force-pushed the feat/1116-setup-plan branch from ffe2bd3 to 822a6ac Compare July 6, 2026 04:31
@thinmintdev thinmintdev merged commit e30485e into main Jul 6, 2026
3 checks passed
@thinmintdev thinmintdev deleted the feat/1116-setup-plan branch July 6, 2026 04:41
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: hal0 setup --plan dry-run preview

1 participant