You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aed93b6
Browse filesBrowse the repository at this point in the historyBrowse files
<!-- pair-release-intent:v1 -->
### Changelog title
Manual nodes persist across restarts
### Changelog body
- Manually added nodes are restored after the broker or manual-node
worker restarts.
### Bumps
- services: patch
- nvpair-cluster-manager: none
- nvpair-engine-manager: none
- 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: none
- nvpair-ui-broker: patch
- nvpair-workload-manager: none
<!-- /pair-release-intent:v1 -->
## Description
Closes#58.
Move manual-node durability into `nvpair-ui-broker` so headless
TUI/service nodes keep manual peers across broker and worker restarts.
Successful add/remove operations update the existing
`configs/manual-nodes.json`, and a restarted manual-nodes worker is
repopulated automatically.
This version is rebased and adapted to the current `develop`
architecture after the TUI overhaul. The obsolete Electron-owned
store/replay path is removed so the broker is the single persistence
owner.
## Scope
- persist successful manual-node adds/removes in the broker
- replay durable manual nodes into replacement workers
- resolve stable discovered node IDs back to manual aliases for removal
- remove Electron-owned persistence/replay logic
- keep the existing JSON-RPC methods and on-disk file location
- declare a patch bump for `nvpair-ui-broker` through release intent; do
not edit `services/versions.json` manually
## Validation
- `cd services/nvpair-ui-broker && go test ./...` — passed
- `cd desktop && npm run typecheck` — passed
- `cd desktop && npm run lint` — passed
- `cd desktop && npm run test:unit --
modular/modular-supervisor-readiness.test.ts` — 4 passed
- `cd desktop && npm run test:unit` — 39 files, 231 tests passed
- `cd desktop && npm run dead-code:check` — passed with zero findings
- `cd desktop && npm run service-contracts:check` — passed with no
unignored drift
- `node scripts/spdx-headers.mjs` — 1027 checked, 0 missing
- `git diff --check` — passed
## Risk
The JSON-RPC surface and persisted file schema are unchanged. Existing
`manual-nodes.json` entries remain readable. The ownership change
removes the duplicate Electron persistence path and makes
broker/TUI-only deployments durable as well.
## Checklist
- [x] I have read the Contributing Guidelines.
- [x] Every commit is signed off, certifying the Developer Certificate
of Origin.
- [x] New or existing tests cover the change.
- [x] Relevant documentation is updated.
- [x] I checked the diff, changed filenames, and commit messages for
credentials, private data, internal URLs, internal issue identifiers,
and generated artifacts.
- [x] I recorded the validation commands and results above.
- [x] I declared version bumps in the release-intent block above.
`services/versions.json` is written by automation and is not edited in
this PR.
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
Copy file name to clipboardExpand all lines: desktop/docs/services-parity.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ history.
21
21
| Process supervision | Complete | Electron starts only `nvpair-ui-broker`; the broker supervises all workers |
22
22
| Discovery | Complete | Broker discovery snapshots drive available nodes and node state |
23
23
| Node telemetry | Integrated with direct poll | Electron polls advertised `/v1/node-info` (plain HTTP); remote OS and some remote telemetry are backend-limited |
24
-
| Manual nodes | Complete with local persistence | Broker owns probingand proxy registration; Electron persists entries for replay|
24
+
| Manual nodes | Complete with local persistence | Broker owns probing, durable entries, restart replay, and proxy registration|
Relayed to `nvpair-manual-nodes`. `node/add` (`{ address, name?, tls_port?, mtls? }`) registers a user-added node and probes it; `node/remove` (`{ id }`) drops it; `nodes/list` returns the tracked manual nodes. Manually added nodes also surface in the shared `discovery:get-nodes` / `discovery:nodes-changed` snapshot — the broker merges `nvpair-manual-nodes`' `node/discovered|updated|removed` into the same store the scanner feeds. A `nvpair-manual-nodes` restart loses the in-memory entries because neither that worker nor the broker persists an authoritative copy, so clients must re-add manual nodes after a restart. Error `-32000 "manual-nodes not available"` when no manual-nodes worker is supervised.
541
+
Relayed to `nvpair-manual-nodes`. `node/add` (`{ address, name?, tls_port?, mtls? }`) registers a user-added node and probes it; `node/remove` (`{ id }`) drops it; `nodes/list` returns the tracked manual nodes. Manually added nodes also surface in the shared `discovery:get-nodes` / `discovery:nodes-changed` snapshot — the broker merges `nvpair-manual-nodes`' `node/discovered|updated|removed` into the same store the scanner feeds. The broker persists successful `node/add` operations to `configs/manual-nodes.json` in the per-user data directory and replays them into a replacement `nvpair-manual-nodes` worker after startup. Successful `node/remove` operations update the same durable list. Error `-32000 "manual-nodes not available"` when no manual-nodes worker is supervised.
542
542
543
543
**Manual → proxy bridge.** When the broker supervises both `nvpair-manual-nodes` and a proxy, it also bridges a manual node whose engine is reachable into that proxy via `node/add-manual` (host/port from the node's per-engine status), so inference can route to it through `ollama-proxy:node/select` / `lmstudio-proxy:node/select` just like a relay-discovered node. This is per-engine: a node whose `ollama_*` status is up is bridged into `ollama-proxy` (host/port from `ollama_port`), and one whose `lmstudio_*` status is up into `lmstudio-proxy` (from `lmstudio_port`) — a node running both is bridged into both. Manual nodes are by definition the ones that never appear via the daemon's `_nvpair-node` discovery, so this explicit add is what makes them routable. The bridge tracks reachability: an engine that goes down (or a node that is removed, or whose prober crashes) is pulled back out with `node/remove-manual`. A proxy that isn't supervised → that leg is a no-op; manual nodes still appear in the discovery snapshot as before.
544
544
@@ -622,7 +622,7 @@ Attach to a pre-existing endpoint:
622
622
RPC (custom service, port, name, or TXT), and no way to advertise anything
623
623
other than the detected engines.
624
624
-**node-info control surface.** node-info is spawned and torn down with the broker, and the broker pushes it only two things over stdin: the log level, and this node's cluster principal (`nodeinfo:set-cluster-identity`, sent on spawn and on every membership or pin-set change, because node-info holds no cluster dir and so cannot read membership itself). Otherwise it's hands-off: the broker registers its port with the daemon (which enriches over plain HTTP) but doesn't pass through TLS material (`--cert` / `--key` / `--client-ca`) or a custom `--port`, and exposes no RPC to query or reconfigure it. It runs with its own defaults plus those two pushes.
625
-
-**Manual-node persistence across restarts.**`nvpair-manual-nodes`keeps its entries only in memory and the broker holds no authoritative copy, so a manual-nodes crash-and-restart loses the user's manual nodes (the broker evicts the orphaned entries from the snapshot; clients must re-add them).
625
+
-**Manual-node persistence across restarts.**`nvpair-manual-nodes`remains an in-memory worker; the broker owns `configs/manual-nodes.json`, clears stale live projections when the worker exits, and replays the durable entries into its replacement.
626
626
-**Per-event push semantics.**`discovery:nodes-changed` always carries the full current snapshot, not a delta. For small N this is fine and lets the client treat the payload as authoritative without state reconciliation. `errors:update` is likewise a full snapshot.
627
627
-**BYO-TLS node-info discovery.** The daemon enriches peers over plain HTTP per the consolidated transport policy (node-info is plain on the broker path). Reading a node-info served over operator-configured BYO-TLS / mTLS is not supported through the broker; discovery works for the plain-HTTP case (the common one).
628
628
-**Per-worker log-level granularity.**`log/set-level` fans the broker's single level out to every running child, but there's no way to set a different level per worker — it's one level for the whole process tree.
0 commit comments