installer-setup WS-D: co-locate [models].flm_store + free-space validation on chosen mount#1132
Merged
Merged
Conversation
…ation Extends #1095's _persist_store_dir to also seed [models].flm_store co-located under the chosen model store (<store>/flm/models), so NPU/FLM weights stop stranding on the root FS when --models-dir is set. Adds a non-fatal writability + free-space check on the chosen mount, warning (log only) when it's unwritable, on the root filesystem, or below a 10 GiB threshold — mirrors cli.setup_plan's ancestor-walk pattern without importing from it, keeping the two workstreams isolated. Closes #1100 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.
Summary
Closes #1100. Part of the guided Hal0 Installer Setup redesign (Wave 2 / WS-D, decision Q4). Extends #1095's
_persist_store_dir()(which threadsSelections.storage_dirinto[models].store) to also handle the FLM/NPU side of the store:[models].storeand co-locates[models].flm_storeat<store>/flm/models(the convention already documented onModelsConfig.flm_storeand used byinstaller/install.sh), so NPU weights no longer strand on the root filesystem when--models-diris set._validate_store_mount) on the chosen mount: warns (log only, never raises) when the mount isn't writable, sits on the root filesystem, or has less than 10 GiB free — mirroring the ancestor-walk pattern incli.setup_plan._free_space_gibwithout importing from it (isolation guardrail — that file is owned by a sibling workstream).[models].storeand the co-located[models].flm_storealready match; a config that pre-dates this change (store set, flm_store empty) still gets the co-located value seeded on the next persist.storage_dirvalues are ignored, and config-write failures are swallowed so a bad pick never aborts the slot/extension walk.Files changed
src/hal0/install/orchestrate.py—_persist_store_dirextended; new helpers_colocated_flm_store,_validate_store_mount,_free_space_gib,_nearest_existing_ancestor,_is_root_fs,_is_writable.tests/install/test_orchestrate.py— new coverage for co-location, idempotency (including the pre-installer-setup WS-D: co-locate [models].flm_store + free-space validation on chosen mount #1100-config upgrade path), relative/empty no-ops, and each validation warning branch.No changes needed in
src/hal0/config/schema.py—ModelsConfig.flm_store(with its absolute-path validator andeffective_store-style resolution viaconfig.paths.flm_models_dir) already existed and needed no changes.Test plan
uv run ruff format src tests— cleanuv run ruff check src tests— all checks passeduv run ruff format --check src tests— 639 files already formatteduv run pytest tests/install/test_orchestrate.py -q— 20 passed, 1 skipped (host-topology guard skips when tmp and/share a device, e.g. some sandboxes)uv run pytest tests/ -q --ignore=tests/e2e— 4680 passed, 14 failed, 9 skipped, 1 error; confirmed viagit stashthat the same 14 failures + 1 error pre-exist onmain(hermes venv/state-render, comfyui phase4, proxmox host detection, container spec dispatch, config-urls proxy, models-preview, settings-store writability) — unrelated to this change.🤖 Generated with Claude Code