feat(services): add service_biz.nu #89
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_skills!89
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_service_biz"
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?
Summary
Adds
tools/modules/services/service_biz.nu, a lifecycle module for thehero_bizservice (server + UI) withinstall | start | stop | statussubcommands. Mirrors the Rustbuild_service_definition()athero_biz/crates/hero_biz/src/main.rs:93-179. Three patterns new to the family, all called out in the module header.Related
Changes
tools/modules/services/service_biz.nu— new module (~388 lines). Registershero_biz(server) andhero_biz_uias hero_proc actions plus thehero_bizservice.tools/modules/services/mod.nu— addexport use service_biz.nu.--rootoptional on every command; user-level default.Patterns new to the family (all in the module header)
Server action name =
hero_biz, NOThero_biz_server. First service where the server action drops the_serversuffix. Source of truth is the Rustbuild_service_definition()atmain.rs:103.TOML misleading.
hero_zero/services/hero_biz.tomldeclares only[server]but the CLI'sself_start()registers bothhero_bizandhero_biz_ui. The nu module is the authoritative record.Multi-dep preflight. TOML
depends_on = ["hero_osis_identity", "hero_proxy_ui"].svx_check_osis_identitywarns (does not fail) on missing identity socket.hero_proxy_uigets no preflight — grep confirms no code path inhero_biz/reads from a proxy_ui socket; UIs are surfaced through hero_router's socket discovery as a deployment-level concern, not a boot-time dep.Env wiring
UI action env (verbatim from TOML
[env]block, UI-only consumers):RUST_LOG=infoBASE_PATH=/hero_biz/uiHERO0_BASE_URL=http://127.0.0.1:6666/hero_osis/uiServer action env:
RUST_LOG=infoonly. The Rust source sets nothing else on the server action —BASE_PATHandHERO0_BASE_URLare read only byhero_biz_ui(verified via grep:crates/hero_biz_ui/src/web/server.rs:89,.../hero0/mod.rs:93,.../services/mod.rs:36,50; zero hits incrates/hero_biz/).The
HERO0_BASE_URLbrittleness (hardcoded127.0.0.1:6666loopback TCP) is documented in the module header as a future follow-up onceservice_osis.nulands and exposes a discovery path.Health policy divergences
Mirrored from Rust, not prior nu conventions:
start_period_ms: 5000(prior services used 3000).interval_ms: 2000(prior UI actions used 3000).stop_timeout_ms: 5000(book/whiteboard used 5000 too; consistent).Test Results
End-to-end smoke test on the Hetzner box (under
flockto serialize with the parallel agent's voice test). 13/15 PASS. 2 FAIL are upstream placeholder-backend issues, not module bugs.service_proc start --roothealthyservice_biz install --rootproduced 2 binariesservice_biz start --reset --root— osis_identity preflight fired, both actions registered, summary showsbase path+hero0 urlrpc.sockis a live socketui.sockis a live socketcurl --unix-socket rpc.sockaccepts HTTPcurl --unix-socket ui.sockaccepts HTTPstatusreturns{name: hero_biz, state: running, restarts: 0}BASE_PATH = /hero_biz/uiproc action get hero_biz_ui --root)HERO0_BASE_URLsethero_biz(no_serversuffix)startprints "already running"runningstopunregisters cleanlystatusreturnsservice 'hero_biz' not foundNotes on the 2d / 2f FAILs
hero_biz'srun_server()atcrates/hero_biz/src/main.rs:183-207is explicitly a placeholder:The server process runs and waits for ctrl_c but never binds
rpc.sock— it only creates the parent directory and removes any stale socket file. The module is correct: the action spec matches the Rustbuild_service_definition()exactly, including the socket path. When the hero_biz backend is implemented upstream, the RPC side will light up automatically without any change here. Out of scope for this PR.Full per-step output on issue #86.