Conversation
Two engine-manager changes: - download() executed any HTTPS artifact whose manifest had no sha256 pin. A manifest without a digest means any host serving that URL yields code execution, so fail closed instead: return an error naming the computed digest so the author can pin it. Operators who accept unverified downloads can opt in with NVPAIR_ALLOW_UNPINNED_DOWNLOADS=1. The checksum-mismatch error names the same escape hatch, so a stale pin is not a dead end. The bundled Ollama and LM Studio fetch URLs are rolling, so their manifests stay unpinned and install through the escape hatch; the pin exists for manifests that add one. - stop() sent one graceful signal and then waited forever, so an engine that ignored SIGTERM was never stopped. It waits the manifest's stop grace (default 5s) and escalates to a forced kill of the whole process group/tree, which reaches engines that forked helper processes. Both waits are bounded, so a forced kill that itself fails cannot hang shutdown either. A test drives a process that ignores SIGTERM and asserts stop ends it after the grace. Signed-off-by: woodsonl <65194841+woodsonl@users.noreply.github.com>
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.
Description
Unpinned downloads fail closed.
download()executed any HTTPS artifactwhose manifest carried no
sha256. A manifest without a digest means any hostthat serves that URL yields code execution on the machine. It now returns an
error naming the computed digest, so the manifest author can pin it, and the
checksum-mismatch error names the same escape hatch so a stale pin is not a
dead end. Operators who accept unverified downloads can opt in with
NVPAIR_ALLOW_UNPINNED_DOWNLOADS=1. The bundled Ollama and LM Studio fetchURLs are rolling, so their manifests carry no pin and install through that
opt-in; the check exists so a manifest can add one.
Engine stop escalates.
stop()sent one graceful signal and then waitedforever, so an engine that ignored
SIGTERMwas never stopped. It now waitsthe manifest's stop grace (default 5s) and escalates to a forced kill of the
whole process group or tree, which reaches engines that forked helper processes
such as model runners. Both waits are bounded, so a forced kill that itself
fails cannot hang shutdown either.
Release intent
Changelog title
Engine installs require a pinned digest, and stop escalates
Changelog body
Engine downloads without a pinned
sha256in their manifest are now refused bydefault; an operator can opt in to unverified downloads explicitly. Stopping an
engine that ignores the graceful signal now escalates to a forced kill after
the manifest's grace period instead of waiting indefinitely.
Bumps
Scope
Included: the download pin check and its opt-out, the stop escalation, the
manifest pins, and the tests for both.
Excluded: the install and stop commands themselves are unchanged apart from the
pin check and the added escalation step.
Validation
go build ./...andgo test ./...inservices/nvpair-engine-managerservices/nvpair-engine-manager/remediation_test.goandlaunch_test.gocover the changed install and stop paths.
Risk
Behavior change for operators with unpinned manifests: a download that used to
succeed now fails until the manifest is pinned or the opt-out is set. The
grace-period escalation force-kills an engine that has not exited; that is the
intended behavior and matches what Windows already did.
Checklist
git commit -s), certifying the Developer Certificate of Origin.services/versions.jsonis written by automation — do not edit it by hand.