mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #5371] [TUI] keep the values the Settings view saved across launches; --set idle-unload writes its config key instead of an engine flag #5407
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#5407
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/5371
Author: @shikaku2
Created: 11/6/2026
Status: 🔄 Open
Base:
main← Head:fix/launch-settings-carry📝 Commits (1)
0077486Launch: keep the values the Settings view saved (sampling defaults, idle unload, thinking budget and the other keys) in the rebuilt run config, and write --set idle-unload=… as the server's config key instead of an engine flag the engine would reject with "unknown argument" (#4985)📊 Changes
2 files changed (+106 additions, -3 deletions)
View changed files
📝
strata_cli/launch/runner.py(+67 -2)📝
tests/terminal/test_launch.py(+39 -1)📄 Description
Problem and result:
a value saved in Strata's own page (About > Settings;
serve/runconfig.pywrites it into the run config of the running start) quietly reverted at the nextstrata launch --preset …. The launcher rebuilds that file from the installed config and carried the hand-edited engine options over from the earlier start, but none of the top-level keys the Settings view writes. My case:idle_unload_s: 300saved into~/.local/state/strata/launch/iq3_xxs-128k.jsonvanished on the next launch; the sampling keys revert the same way, which is the open half of #4985 (0.2.11's arg layers keepuser_argsand the engine options only, not thesamplingblock or the other keys).A second symptom, from the same gap: writing
--idle-unloadinto a preset's Advanced table or--set idle-unload=300sends it to the engine, and no engine binary knows that flag (onlyserve/server.pydoes) — it exitedunknown argument: --idle-unloadseven times in the engine log while the start retried, until the args were cleaned out by hand.After the change the saved values survive the rebuild, and the flag form writes the config key
idle_unload_sinstead of riding to the engine.Related discussion: #4985 (sampling values reset after a restart — closes it), #5178 and #5132 (the arg-layer carry-over this follows).
Approach:
derive_configis the one place a launch builds its private run config, so the fix stays there:carry_settingscopies the Settings-view keys from the config the earlier start wrote (the very file the page edits) into the rebuilt one, with the same "the person's own choice wins" precedencestrata_control/arg_layers.pygives hand-edited engine options. Left out on purpose:mtpand drafting (the launcher decides those,--mtp/--drafting),open_browser(strata launchsets it itself),vram_reserve_mib(already survives as a flag inargswith itsuser_argscopy).lazy_loadis not carried for a picture model — the page itself refuses that combination.take_server_optionsmaps an Advanced-table--idle-unloadto the server's config keyidle_unload_s("off" removes it; a value that is not a number of seconds is refused in plain words). What this command line says beats what an earlier start saved.--setwrites the same config as before; the tests assert the engine args are untouched.Validation (this machine: Linux, AMD RX 9070 16 GiB, engine component 0.1.56 HIP, model Qwen IQ3_XXS at 128K, launched with
strata launch --preset; branch onmain@9f7d977d; Python 3.14, pytest 9.2):python -m pytest tests/terminal/test_launch.py -q→ 124 passed, 3 of them new (RunConfig): the Settings-view keys survive the rebuild;--idle-unloadfrom--set/extra becomesidle_unload_sand never entersargsoruser_args, "off" removes it, a bad word raises a plainLaunchError; and the carry list agrees key-for-key withserve/runconfig.py'sEDITABLE.python -m pytest tests/terminal/test_launch.py tests/terminal/test_launch_precedence_0213.py tests/terminal/test_launch_install.py tests/terminal/test_launch_identity.py tests/terminal/test_launch_speed.py tests/terminal/test_launch_dsv41.py tests/terminal/test_cfg_paths.py tests/terminal/test_drafting.py tests/terminal/test_calibration.py -q→ 313 passed, 1 skipped.python -m pytest tests/terminal -q→ 2,707 passed, 53 skipped, 2 failed; both failures fail identically on the untouched tree (verified withgit stash):test_connections.py::…telemetry…expects an older message wording, andtest_drafting_single.py::…split engine…mtpfailed only from an import shadowed by an unrelatedtestspackage installed in my user site-packages (with that import unshadowed its file passes 22/22). Neither touches this change. No engine builds were run because no C++ file changes.idle_unload_spresent only in the previous launch config (the ordinary web-page state) is kept by the derived config;--idle-unloadadded to the installed preset's extra table lands in neitherargsnoruser_argsandidle_unload_s: 300is written as the config key instead; a fresh launch without saved keys shows no new keys and the preset's own--ram-keep-gib/--vram-reserve-mibextras as before.~/.local/state/strata/launch/iq3_xxs-128k.engine.logshows sevenengine started: … --idle-unload 300lines each followed byunknown argument: --idle-unload.strata launchrestart on this machine after the fix (the current server already runs with the value); the desktop app's own save path (apps/host) is untouched and was not tested here.Limits: the carry needs an earlier launch config of the same name (the web-page case); the first launch of a new preset keeps the installed values. A value carried from the earlier start beats the installed config — the same precedence hand-edited engine options already have.
mtpstays the launcher's decision.Closes #4985.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.