Let a model sweep reset only the runtimes it actually captured - #4806
Merged
Conversation
…4774) #4796 gave the model sweep the reset and the per-backend capture/restore #4774 asked for, but it refuses the whole sweep when any sweepable runtime's launch line cannot be captured. `captureLlamaServerConfig` returns null whenever llama-server is stopped or was started outside PortOS — so one externally-started daemon now cancels every Ollama and LM Studio model queued alongside it, where before the sweep simply measured them. Gate the reset on having CAPTURED that runtime's launch line rather than on `isTuningSweepable` alone, and stop refusing: - A model sweep measures an uncapturable runtime under whatever is running, as it did before the reset existed. A reset renders the cleared launch line, which wipes knobs the user set on the LLMs page — only a caller holding what was running there may do that, and nothing was captured to put back. - A tuning sweep still refuses. Varying the launch line is its entire job, so an uncapturable runtime leaves it nothing to do. The asymmetry is the point. Also drops the now-dead `run.launchState` compatibility alias and the "nothing to restore" branch in `restoreUnderClaim`, which is unreachable: only captured backends reach the restore map. Adds coverage for the model-sweep dimension #4774 named — two llama targets with different stored tunings each getting the complete tuning its record names, one capture per runtime for the whole queue, a mixed llama+Ollama sweep resetting only llama, the uncapturable-runtime fallback, and a multi-runtime restore where one daemon throws and the other still comes back.
atomantic
force-pushed
the
claim/issue-4774
branch
from
August 22, 2026 03:14
cc441b8 to
f06fa32
Compare
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
#4796 landed the mechanism this issue asked for while this branch was in flight. It gave the model sweep the reset and the per-backend capture/restore — but it also made the sweep refuse outright when any sweepable runtime's launch line cannot be captured.
captureLlamaServerConfigreturnsnullwhenever llama-server is stopped or was started outside PortOS, so one externally-started daemon now cancels every Ollama and LM Studio model queued alongside it, where before the sweep simply measured them. This PR rebases onto that work and closes the gap.isTuningSweepablealone. A reset renders the cleared launch line, which wipes knobs the user set on the LLMs page — only a caller holding what was running there may do that, and an uncapturable runtime left nothing to put back.run.launchStatecompatibility alias and the unreachablenothing to restorebranch inrestoreUnderClaim— only captured backends reach the restore map.Server-side only:
server/services/localModelAssessmentSweep.jsand its suite.Test plan
cd server && npx vitest run services/localModelAssessmentSweep.test.js— 50 pass, including six new cases for the model-sweep dimension A model sweep merges each llama model's tuning onto the previous one's launch line #4774 named: two llama targets each get the complete tuning its record names; one capture per runtime covers the whole queue; a mixed llama+Ollama sweep resets only llama; an uncapturable runtime measures the rest of the queue instead of refusing; it is never reset and reports norestoreError; a two-runtime restore where one daemon throws still brings the other back and names the failing one.server/services/llamaServerManager.test.js("clears the knobs a reset tuning does not name, so variants cannot accumulate").cd server && npx vitest run— full suite green (1564 files, 32773 tests).Closes #4774