[nu-demo] service_osis.nu does not populate contexts registry or pass HERO_CONTEXTS/HERO_SEED_DIR #129
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
hero_osis --contexts root,default,geomind,incubaid,threefoldspins up per-domain servers for each context, but:context.listRPC only returns[root]. The UI Contexts dropdown therefore only shows Root.Skipping seed for unregistered geomind/base(same for other non-root contexts) — most seed content is never applied.Root cause
hero_osis's--contextsCLI flag ensures per-context directories and spins up per-domain OServer instances, but it NEVER writes the context list into.core/registry.toml. Thecontext.listRPC and the seed step both read from that registry, so anything not in it is invisible.Additionally,
service_osis.nu's default action spec does not includeHERO_CONTEXTSorHERO_SEED_DIRin the env, so even if the operator sets them at the shell, the action launched by hero_proc doesn't see them.Demo workaround (applied 2026-04-23)
context.addRPC explicitly for each non-root context (default/geomind/incubaid/threefold) to populate the registry.service_osis.nuto includeHERO_CONTEXTSandHERO_SEED_DIR.Proper fix
(a)
hero_osis --contexts <list>should populate.core/registry.tomlwith all specified contexts on startup — not just create directories.(b)
service_osis.nushould accept--contextsand--seed-dirflags (or env) and pass both through to the action env so hero_proc launches the server with them.Filed 2026-04-23 nu-shell demo bring-up. Signed-off-by: mik-tf
make demotarget — provision + install + seed + verify a fresh Hero OS demo VM in one command #163Fixed by both parts (a) and (b):
Part (a) — hero_rpc commit
f299402ondevelopment.OServer::registernow ensures every registered context is persisted to~/hero/var/osisdb/.core/registry.toml. PreviouslyOServer::newcalledensure_default()(root only); per-domain registers for non-root contexts silently created storage directories but never appeared incontext.listRPC, so the seed step refused to seed them ("Skipping seed for unregistered geomind/base").Idempotent — existing entries left untouched, only missing ones added.
save_default()is fail-soft (warns, doesn't abort registration) so filesystem hiccups don't tank a domain spawn that would otherwise work fine.Part (b) — hero_skills commit
3f8b700ondevelopment.service_osis.nusvx_server_actionreads HERO_CONTEXTS and HERO_SEED_DIR from the operator's shell env and forwards each to the action's env block when set. Previously the action env hardcoded{RUST_LOG: "info"}, so any operator-set HERO_CONTEXTS was invisible to hero_osis once hero_proc launched it.Combined runtime flow — the chain that wasn't working:
Closes home#151 transitively — combined with hero_router commit
fe1cbd6(home#125, X-Hero-Context passthrough), the full context-switching flow now works end-to-end.Verification:
cargo fmt,cargo clippy --all-targets -- -D warnings, 13/13 hero_rpc_server tests pass.nu -c 'source service_osis.nu'parses cleanly, env passthrough smoke test confirmed both vars reach the action when set.Meta-tracker: home#193.
Signed-off-by: mik-tf
make demotarget — provision + install + seed + verify a fresh Hero OS demo VM in one command #31