feat(service_embedder): D-05 --download wiring + rule-of-3 lib refactor + dispatcher fix #216

Merged
mik-tf merged 3 commits from development_mik_service_embedder_download into development 2026-05-06 14:45:08 +00:00
Owner

Summary

Consumer-side wiring for D-05's third and final ONNX service: hero_embedder. Producer side is hero_embedder#36 (build-linux.yaml port + bundled libonnxruntime.so + matrix musl→gnu).

After both PRs land, coverage projects to 17/15+ services on --download. D-05 ONNX rollout complete (editor + voice + embedder all CI-artifact deployable).

Commits

  1. bcb9c65refactor(lib): factor svc_install_onnx_runtime_download into lib.nu (rule of 3)

    • Voice + editor were carrying byte-identical helpers. With embedder about to add the 3rd copy, factor into shared svc_install_onnx_runtime_download in lib.nu taking onnx_version and ci_target as args.
    • Behaviour unchanged.
  2. 0748020feat(service_embedder): add --download / --version (D-05 third ONNX service)

    • Constants: SVX_ONNX_VERSION=1.25.1, SVX_CI_TARGET=x86_64-unknown-linux-gnu (lockstep with hero_embedder/buildenv.sh).
    • svx_embedderd_action: prefer the bundled libonnxruntime.so.<ver> over the system /usr/local/onnxruntime install when it's on disk.
    • install --download: fetches all 5 binaries + the bundled .so via the new shared helper.
    • start --download / --version: pipe through to install.
    • ORT preflight (svx_ort_require) is skipped under --download because the bundled .so is the source of truth, not the system install (lets fresh VMs deploy without service_embedder install_ort first).
  3. 610e9b1fix(dispatcher): forward --download/--version to embedder install/start

    • Closes the dispatcher gap surfaced session 62 for the embedder service. Mirrors commit 908c775 for the other 9 services.

How to test

After hero_embedder#36 is merged + tagged:

use nutools/modules/services/service_embedder.nu
service_embedder install --download --reset           # direct form
service embedder install --download --reset           # alias form (after dispatcher fix)

Verify on heroci: 5 binaries (hero_embedderd, hero_embedder, hero_embedder_server, hero_embedder_ui, hero_embedder_proxy) + libonnxruntime.so.1.25.1 land in ~/hero/bin/.

Refs

## Summary Consumer-side wiring for [D-05](https://forge.ourworld.tf/lhumina_code/hero_demo/src/branch/development/decisions/D-05-onnx-cross-compile.md)'s third and final ONNX service: `hero_embedder`. Producer side is [hero_embedder#36](https://forge.ourworld.tf/lhumina_code/hero_embedder/pulls/36) (build-linux.yaml port + bundled libonnxruntime.so + matrix musl→gnu). After both PRs land, coverage projects to **17/15+** services on `--download`. D-05 ONNX rollout complete (editor + voice + embedder all CI-artifact deployable). ## Commits 1. `bcb9c65` — `refactor(lib): factor svc_install_onnx_runtime_download into lib.nu (rule of 3)` - Voice + editor were carrying byte-identical helpers. With embedder about to add the 3rd copy, factor into shared `svc_install_onnx_runtime_download` in `lib.nu` taking `onnx_version` and `ci_target` as args. - Behaviour unchanged. 2. `0748020` — `feat(service_embedder): add --download / --version (D-05 third ONNX service)` - Constants: `SVX_ONNX_VERSION=1.25.1`, `SVX_CI_TARGET=x86_64-unknown-linux-gnu` (lockstep with `hero_embedder/buildenv.sh`). - `svx_embedderd_action`: prefer the bundled `libonnxruntime.so.<ver>` over the system `/usr/local/onnxruntime` install when it's on disk. - `install --download`: fetches all 5 binaries + the bundled `.so` via the new shared helper. - `start --download / --version`: pipe through to install. - ORT preflight (`svx_ort_require`) is **skipped under `--download`** because the bundled `.so` is the source of truth, not the system install (lets fresh VMs deploy without `service_embedder install_ort` first). 3. `610e9b1` — `fix(dispatcher): forward --download/--version to embedder install/start` - Closes the dispatcher gap surfaced session 62 for the embedder service. Mirrors commit `908c775` for the other 9 services. ## How to test After [hero_embedder#36](https://forge.ourworld.tf/lhumina_code/hero_embedder/pulls/36) is merged + tagged: ```nu use nutools/modules/services/service_embedder.nu service_embedder install --download --reset # direct form service embedder install --download --reset # alias form (after dispatcher fix) ``` Verify on heroci: 5 binaries (`hero_embedderd`, `hero_embedder`, `hero_embedder_server`, `hero_embedder_ui`, `hero_embedder_proxy`) + `libonnxruntime.so.1.25.1` land in `~/hero/bin/`. ## Refs - https://forge.ourworld.tf/lhumina_code/hero_demo/issues/54 - https://forge.ourworld.tf/lhumina_code/hero_embedder/pulls/36
Voice + editor were carrying byte-identical svx_install_onnx_runtime_download
helpers (only the underlying SVX_ONNX_VERSION + SVX_CI_TARGET constants
varied). With hero_embedder about to add the third copy, factor the helper
out of the per-service modules into shared lib.nu as
svc_install_onnx_runtime_download — taking onnx_version and ci_target as
explicit args. Returns the on-disk path of the installed .so.

- lib.nu: add svc_install_onnx_runtime_download (exported, parameterised
  by forge_loc, tag, sudo, onnx_version, ci_target).
- service_voice.nu: drop svx_install_onnx_runtime_download, call shared
  helper from the --download branch.
- service_editor.nu: same.

Behaviour unchanged.

Signed-off-by: mik-tf
Mirror the canonical ONNX-service consumer shape from service_voice +
service_editor (both already on --download). Closes the D-05 ONNX
rollout: editor + voice + embedder are now all CI-artifact deployable.

Producer side is hero_embedder PR #36 (build-linux.yaml port + bundled
libonnxruntime.so + matrix musl→gnu). Once tagged, this consumer pulls
the 5 binaries and the bundled .so from the release; the embedderd
action env exports ORT_DYLIB_PATH at the bundled .so so ort dlopen
finds it without a system ONNX install.

- Constants: SVX_ONNX_VERSION=1.25.1, SVX_CI_TARGET=x86_64-unknown-linux-gnu
  (lockstep with hero_embedder/buildenv.sh's ONNXRUNTIME_VERSION).
- Helper: svx_libonnxruntime_path resolves __HERO_BIN__/libonnxruntime.so.<ver>.
- svx_embedderd_action: prefer the bundled .so over svx_ort_inspect when
  the bundled file is on disk. Source-built deploys still fall back to
  /usr/local/onnxruntime via svx_ort_inspect.
- install: --download branch fetches all 5 binaries + the .so via the new
  shared svc_install_onnx_runtime_download helper.
- start: --download / --version flags pipe through to install. ORT
  preflight (svx_ort_require) is skipped under --download because the
  bundled .so is the source of truth, not the system install.

Refs lhumina_code/hero_demo#54
Refs decisions/D-05-onnx-cross-compile.md (in lhumina_code/hero_demo)

Signed-off-by: mik-tf
fix(dispatcher): forward --download/--version to embedder install/start
All checks were successful
Build and Publish Skills / build-and-publish (pull_request) Successful in 4s
610e9b19ba
Closes the dispatcher gap surfaced session 62 for the embedder service.
With this, `service embedder install --download` (alias form) works
correctly, matching `service_embedder install --download` (direct module
form).

Mirrors commit 908c775's pattern (which fixed the same gap on biz, books,
browser, editor, foundry, matrixchat, slides, voice, whiteboard).

Signed-off-by: mik-tf
mik-tf merged commit 39ab04d06b into development 2026-05-06 14:45:08 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_skills!216
No description provided.