Repository navigation
Engine management stays responsive and shuts down reliably - #41
Conversation
|
Addressed both blocking findings in 2f78b8c and b5cee58:
For the non-blocking overlap, 8fd4080 removes this branch's competing broker cancellation edit. PR #42 must merge first. A temporary merge was conflict-free, retained #42's helper/tests, and passed broker native/Linux/Windows vet, full tests and relay race stress. No #42 implementation was duplicated in this branch. The PR description now records all observed unconstrained normal-suite failures by name, without claiming they are pre-existing. Full engine-manager race and GOMAXPROCS=2 normal suites passed, as did desktop gates, node-settings/TUI tests, formatting and headers. Standalone broker vet still requires #42; this prerequisite is explicit rather than reported as green. Other non-blocking production/contract/version observations needed no additional runtime changes. |
Adapt NVIDIA#180 to share bounded status observations and discard them after lifecycle or health changes. Slow readiness no longer blocks start, stop, or port changes. Model sweeps include status and operation waits in their deadline and return HTTP 503 on timeout so peers retain their last-good lists. Preserve the fork's CLI detection, capability snapshots, and concurrent engine shutdown. The existing unreleased engine-manager 1.4.0 bump already covers this fix relative to v0.8.0. Co-authored-by: Kaylee Lubick <klubick@nvidia.com> Signed-off-by: Jared Ping <13906915+JaredP94@users.noreply.github.com>
Adapt NVIDIA/Personal-AI-Router@27b342a: omit percentages for verification, opaque install commands, and the fork's oMLX disk-image copy. Keep measured download progress and terminal outcomes. Desktop clears the previous percentage for both local and remote install stages; the TUI displays stages and failure reasons without fabricated numbers. The broker and remote stream relay optional progress fields verbatim. Regenerate the service contract and document the omission rule. Existing unreleased engine-manager 1.4.0 and TUI 1.2.1 bumps cover these fixes relative to v0.8.0. Co-authored-by: ckelseynv <143756939+ckelseynv@users.noreply.github.com> Signed-off-by: Jared Ping <13906915+JaredP94@users.noreply.github.com>
Adapt NVIDIA#81 with a narrow read-only permission relay for this fork, which has no upstream engine-settings subsystem. Local non-loopback bind overrides require engine_allow_lan_bind, default false, read from node-settings for every request and denied on errors or timeout. Remote starts remain loopback-only. Add persistent typed get/set methods and regressions for denial, revocation, malformed replies, persistence and relay failures. Make existing broker probe cancellation ownership explicit to Go vet, with no behavior change. Bump node-settings to 3.2.0 for the additive setting; existing unreleased engine-manager and broker minor bumps cover their changes relative to v0.8.0. Co-authored-by: Mallikh Kalkere <mkalkere@users.noreply.github.com> Signed-off-by: Jared Ping <13906915+JaredP94@users.noreply.github.com>
Port NVIDIA/Personal-AI-Router@72d5605: prepare-shutdown and EOF must wait for one sweep rather than probing foreign listeners twice. Preserve this fork's concurrent engine stops and retry only failed process or command stops that can succeed on a later call. Cover sweep deduplication using lifecycle revisions rather than elapsed-time ratios, concurrent joining, and retry after a failed stop command. The existing unreleased engine-manager 1.4.0 bump covers this fix relative to v0.8.0. Co-authored-by: Terve <ntervalon@nvidia.com> Signed-off-by: Jared Ping <13906915+JaredP94@users.noreply.github.com>
The detached-daemon test observed a marker written before the start CLI exited. Shutdown could cancel the CLI before cmd.Wait returned, leaving the successful-command flag unset and skipping the official stop command despite a live detached daemon. Preserve command exit errors and clean up commands that actually executed, including canceled or nonzero exits, while excluding spawn failures. Synchronize the original readiness-phase test on a real readiness request and add a deterministic cancellation-before-CLI-exit regression. Also wait for the crash report itself in the separate watcher test instead of racing its earlier stopped-state publication. The detached cases pass -race -count=20 in simultaneous processes with broker relay load. Existing unreleased engine-manager 1.4.0 covers this fix relative to v0.8.0. Signed-off-by: Jared Ping <13906915+JaredP94@users.noreply.github.com>
8fd4080 to
b3dda21
Compare
Description
Engine status no longer holds the lifecycle lock during slow readiness/identity probes. Delayed observations cannot undo a start, stop, or port change, and a model inventory sweep that exceeds its budget returns HTTP 503 so peers retain their last-good lists.
Install verification, opaque commands, and oMLX disk-image copying now report stages without invented percentages. Real download progress remains visible; desktop (local and remote) and TUI render unmeasured stages sensibly.
Local non-loopback
bindoverrides require the persisted, live-readengine_allow_lan_bindopt-in (default false). Remote starts remain loopback-only. Shutdown callers join one concurrent engine sweep, and cancellation cannot skip daemon cleanup just because the start CLI had not returned yet.References: NVIDIA#84, NVIDIA#180, NVIDIA#13, NVIDIA#81, NVIDIA/Personal-AI-Router@27b342a, and NVIDIA/Personal-AI-Router@72d5605.
Scope
The original five focused implementation commits cover:
Three signed-off review follow-up commits:
opDone) while the passive readiness request is still blocked. Hold final intent persistence so even fast startup remains observable. Release the probe and await real startup separately, with unconditional fixture cleanup. The short entry assertion no longer times spawning, readiness, and persistence together.StopAllcleanup immediately after construction. Replace the single 300ms daemon TCP check with the existing bounded polling helper. A fatal setup/readiness assertion can no longer leave the hour-long control CLI running.6b58e5downs the canonical helper and cancellation tests. A temporary, uncommitted merge of PR Isolate cross-process tests, fix the failing broker tests, and add CI #42 was conflict-free; brokersupervisor.goexactly matched PR Isolate cross-process tests, fix the failing broker tests, and add CI #42. No PR Isolate cross-process tests, fix the failing broker tests, and add CI #42 implementation or tests are copied into this branch.Version decision relative to v0.8.0: node-settings 3.1.0 → 3.2.0 for the additive setting; reuse existing unreleased engine-manager 1.4.0, broker 2.5.0 and TUI 1.2.1 bumps. The follow-up engine changes are test-only. No changelog/release-asset changes.
Validation
Fresh worktree from
origin/fix/engine-manager-batch; its ownnpm ci --no-audit --no-fund, no dependency symlink. macOS arm64, isolated temporary fixtures only; no real engine installation/uninstallation or user engine/configuration paths modified.Current follow-up verification:
go test -race -count=100 -run '^(TestStatus|TestStartDoesNotWaitForPassiveProbe|TestModelsResult_CanceledCaller)' ./...— passed.go test -race -count=20 -run '^TestStopAllStopsDetachedCommandDaemon' ./...— passed, including a fresh run after all temporary fault injections were removed.go test -race -count=1 ./...— passed (126s). FullGOMAXPROCS=2 go test -count=1 ./...— passed (125s). The unconstrained normal run failed; see the complete list below. These passes do not prove those failures pre-existing.go test -count=1 ./...— passed. Broker standalone fullgo test -vet=off -count=1 ./...— passed.gofmt -l .clean; nativego vet ./...,GOOS=linux go vet ./..., andGOOS=windows go vet ./...— passed.go test -count=1 ./..., and permission-relaygo test -race -count=20 -run '^TestEngineSettingReadRelay$' ./...— passed. The merge was aborted afterward; no integration commit is pushed.supervisor.go:538/:523about cancellation ownership. PR Isolate cross-process tests, fix the failing broker tests, and add CI #42 resolves it. This is not reported as a passing standalone vet gate.git diff --checkclean.Regression/failure-path evidence for the follow-ups:
StopAllfailed as intended; process inspection found zero surviving fixture control-CLI processes. The injection was removed before final checks.Observed unconstrained normal-suite failures (not asserted to be pre-existing)
The failed run included loopback connection/readiness timeouts and the following test failures. No production probe was weakened and no test was removed. A subsequent full constrained normal run and a full race run passed; neither establishes baseline causality.
TestStopReclaimsOurOrphanOnManagedPortTestStopDoesNotReclaimSameExternalImageTestStopDeclinesForeignListenerWithActionableErrorTestStopRejectsAdoptedProcessEngineTestStopReconcilesAdoptedProcessAfterExternalStopTestStopKeepsAdoptedProcessRunningWhileEndpointIsUnhealthyTestCommandStopFailureSucceedsWhenEndpointIsConfirmedDownTestCommandStopFailureRestartsHealthMonitoringTestCommandStopReportsStoppedOnlyAfterEndpointClosesTestRunOpInstallAutostartTestLMStudioDeleteModelRemovePathTestDeleteModelRestartAfterBouncesRunningEngineTestDeleteModelWithoutRestartAfterDoesNotBounceTestDeleteModelRestartFailureFailsTheActionTestModelLifecycleTestModelSurface_PinGateIsUnconditionalTestModelsTestModelsResultTestModelsResultLoadedTestModelsResultNoLoadedActionOmitsKeyTestSweepLoadedSeedsThenEmitsOnChangeTestInstallFlowReportsOnlyMeasurablePercentsTestPullEngineErrorBecomesRPCError(localandpeer-endpoint)The review's other non-blocking observations required no production changes: revision fencing/shared-probe cancellation/shutdown joining, model deadlines, optional progress propagation, live-read fail-closed permission, and version decisions remain as reviewed. Timing failures are recorded rather than labeled pre-existing without evidence.
Limits: Linux/Windows vet is static/compile coverage, not runtime certification. Live-engine, multi-node, and the separate
services/testssuite were not run. A fresh optional second-model review attempt timed out; it is not counted as approval.Risk
percentis absent; matched consumers render the stage instead of retaining the preceding download percentage.Checklist