Skip to content

fix(engine-manager): report install steps without fake percentages - #145

Open
ckelseynv wants to merge 2 commits into
developfrom
fix/indeterminate-install-progress
Open

ckelseynv wants to merge 2 commits into
developfrom
fix/indeterminate-install-progress

Conversation

@ckelseynv

@ckelseynv ckelseynv commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Engine installs sat at a hardcoded 75% for the whole install step, and verified was hardcoded at 50%, so the bar went 100% → 50% → 75%. The install step runs opaque commands (tar/unzip for Ollama, LM Studio's vendor installer) with no streamed output, so real progress isn't measurable. This PR stops inventing numbers: those steps are now reported as indeterminate, and the UI shows just the stage ("Installing").

  • nvpair-engine-manager: emitInstallProgress omits percent from engine:install-progress when it is 0 (indeterminate), matching the existing pull-progress convention (wirePercentIncluded). verified and both installing paths now send 0. Real download byte progress and terminal frames (done/already-installed = 100, failed = -1) are unchanged. A download without Content-Length now shows "Downloading" instead of "0%".
  • nvpair-tui: renders (N%) only for a measured percent (previously would show (0%), and already showed (-1%) on failure).
  • Desktop: the bridge projected a missing percent through numberValue, which returns 0, so the UI would have shown "Installing · 0%". Both install projections (local applyEngineManagerProgress, remote applyRemoteEngineProgress) now map a missing or zero percent to undefined via measuredPercent, so BackendHeader and WelcomeEngineRow render the stage alone. Pull keeps its existing mergePullProgressPercent behavior.
  • Failure frames: reportInstallFailed now goes through the shared install emitter, and the TUI shows the failure reason (install <engine> failed: <error>).
  • Docs: spec.md / README.md mark percent optional on engine:install-progress, engine:pull-progress, and engine:remote-progress, and state the shared rule once.

Audited components

  • Producer: nvpair-engine-manager (install.go, executor.go, progress.go).
  • Remote relay: controlstream.go / remote.go already omit percent 0; unchanged.
  • Broker: relays engine:* verbatim; unchanged.
  • Consumers: desktop modular-state.ts updated (local and remote install projections); BackendHeader.tsx / WelcomeEngineRow.tsx render the stage alone once percent is undefined; model-pull UI is unaffected; nvpair-tui updated.

Testing

  • go test ./... in services/nvpair-engine-manager and services/nvpair-tui
  • New Go tests: indeterminate install frame omits percent; full fetch+run install emits a measured percent on download, none on verified/installing, 100 on done, and no unexpected stages
  • New desktop tests: local and remote install frames drop to percent: undefined after a 100% download (verified failing without the fix)
  • New TUI tests: percentSuffix and installStatus
  • npm run lint, npm run typecheck, npm run dead-code:check, npm run service-contracts:check, npm run test:unit in desktop/

Changelog title

Engine install no longer shows a fake percentage

Changelog body

  • Installing an engine no longer sits at a made-up 75%. Download progress still shows a real percentage; the install step itself now shows "Installing" with no number.

Bumps

  • services: patch
  • nvpair-cluster-manager: none
  • nvpair-engine-manager: patch
  • nvpair-errors: none
  • nvpair-job-scheduler: none
  • nvpair-manual-nodes: none
  • nvpair-node-info: none
  • nvpair-node-scanner: none
  • nvpair-node-settings: none
  • nvpair-proxy: none
  • nvpair-tui: patch
  • nvpair-ui-broker: none
  • nvpair-workload-manager: none

The verified and installing stages of an engine install emitted hardcoded
50/75 percents, so the UI sat at 75% for the whole opaque install command.
Treat percent 0 as indeterminate for install progress (matching pull) and
omit it from engine:install-progress, so the UI shows the stage alone.
Download byte progress and the terminal 100/-1 frames are unchanged.

The TUI now renders (N%) only for a measured percent.

Signed-off-by: Chris Kelsey <[email protected]>
The bridge projected a missing install percent through numberValue, which
returns 0, so the UI showed "Installing · 0%" after the engine-manager
stopped sending the fake 75. Map a missing or zero install percent to
undefined on both the local and remote install paths, and assert the
projected payload in tests.

Also from review: tighten the install-flow test (measured download frame,
no unexpected stages), document the shared percent rule for all progress
notifications, route the failed install frame through the shared emitter,
and have the TUI show the install failure reason with tests for its
progress formatting.

Signed-off-by: Chris Kelsey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant