mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3362] [CLOSED] [GUI] Reuse Legacy Model Libraries Through A Valid Native Data Root #4590
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4590
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3362
Author: @medking82
Created: 10/20/2026
Status: ❌ Closed
Base:
main← Head:codex/upstream-legacy-model-data-root📝 Commits (2)
14c2886[GUI] Reuse Legacy Model Libraries Through A Valid Native Data Root1eae837[GUI] Merge upstream main and preserve legacy model libraries📊 Changes
2 files changed (+101 additions, -5 deletions)
View changed files
📝
apps/host/server/store.mjs(+14 -3)📝
apps/host/tests/model-directory-default.test.mjs(+87 -2)📄 Description
Problem and result
With a retained
<Strata Home>/modelslibrary and no existing run configuration for the selected model, the Host can pass that model-library folder as the installer's data root. The installer then plansHOME/models/models/<model>instead of reusingHOME/models/<model>.This fix resolves that exact retained library through
HOME/Strata-data/models, a verified directory alias to the original library. Original weights stay in place and conflicting destinations are refused.Related discussion
Related storage feedback: #3292. This fixes retained legacy libraries; it does not provide general arbitrary-GGUF import or repair every model-recognition case.
Upstream coverage checked
Checked current main
011c9e600a93bbc9fd451c563501b5831c32bbcaon 2026-10-22. The PR is partially covered upstream and remains needed.rememberDataFoldernow writes the selected data folder to Control settings before the packaged install request, resolving the earlier folder-name guard for this flow.modelsdirectory. Original-library reuse acceptance was 0/3.Approach
Merged current main into the existing PR branch without rewriting history. Submitted head:
1eae8377e7c7562b9e47cdf9ed2345679c8564e3. Compared with main, onlyapps/host/server/store.mjsandapps/host/tests/model-directory-default.test.mjsdiffer.Map only the exact legacy library, including saved/environment-selected copies of that path. Windows uses a real Junction; POSIX uses a relative directory symlink. Verify destination physical identity before returning the data root, preserve original bytes, and refuse a conflicting directory or junction.
Keep upstream's
pickModelsDirectory,MODELS_DIR_NOTICE,alignModelsdefault-directory fallback, Control settings ownership and custom-directory behavior.Validation
Windows x64, Node v24.18.0, Python 3.12. Tests used disposable synthetic weight bytes and directories. Commands below omit the windowless runner and use process-local TEMP/TMP under the authorized scratch directory.
Passed:
From
apps/host:8 passed, 0 failed. Includes detected/saved/environment legacy selection, a pre-existing Documents default, original weight bytes and file identity, idempotence, custom/fresh folders, conflicting directories/junctions and unchanged Documents fallback.
Affected upstream regressions:
8 passed, 0 failed. Preserves upstream link-failure fallback, settings merge/idempotence and Documents fallback/normal startup.
Additional disposable acceptance harnesses executed the submitted actual
createNativeControl/store and actual Pythoncheck_data_dir/install_planfunctions: 11 Host scenarios and 11 installer/refusal scenarios passed. Transport, catalog, hardware, setup-table loading and free-space values were explicit fixtures; no install was launched.The Junction maps
HOME/Strata-data/models/IQ3_XXSto the originalHOME/models/IQ3_XXS. The plan reports existing partial-download material in that fixture. Conflict-directory and conflict-junction cases refuse the destination and preserve both libraries.git diff --check 011c9e60 HEADpassed. The final worktree was clean, the remote head was checked before the normal fast-forward push, and no force-push was used.Failed:
The upstream baseline's legacy-reuse acceptance failed 0/3 because the plan used the nested library. All three pass with this fix. The expected merge conflict in
store.mjswas resolved while preserving current upstream behavior. No unresolved failure remains in the listed checks.Not run:
Full npm suite, the excluded
substdrive cases, real model preparation/download/resume or GGUF integrity validation, application UI, GPU inference, macOS/Linux execution, exFAT/UNC or actual link-permission failure. No engine backend source is changed.Upstream Actions remain separate from these local results; workflows awaiting maintainer approval are not counted as test passes.
Limits
Path identity and fixture bytes establish library reuse, not a complete prepared model or a successful real installation. Existing custom folders retain native setup rules. The alias requires permission to create a directory link under Strata Home. Documents-unavailable fallback and unrelated imported-model behavior retain upstream semantics.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.