Go from Zinit to Hero_proc #29
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_aibroker#29
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?
check & fix where needed this repo based on
skills
/hero_crates_best_practices_check
/hero_sockets
/hero_proc_service_selfstart
Implementation Spec for Issue #29: Go from Zinit to Hero_proc
Objective
Replace all Zinit-based process management with Hero Proc, using
hero_proc_sdkfor self-start/self-stop lifecycle. Bothhero_aibroker_serverandhero_aibroker_uibinaries will support--startand--stopflags instead of subcommands that delegate toHeroLifecycle(which wraps zinit). Fix socket compliance issues and remove TCP fallback code.Current State
hero_rpc_server::HeroLifecyclewrapping zinit for lifecyclehero_rpc_serverandzinit_sdkdependencies"web"instead of"openrpc")Requirements
hero_rpc_server+zinit_sdkwithhero_proc_sdk--start/--stopflags in both binaries"openrpc"Implementation Plan
Step 1: Update workspace dependencies (Cargo.toml)
Step 2: Update server crate deps + CLI (hero_aibroker_server)
Step 3: Update UI crate deps + CLI (hero_aibroker_ui)
Step 4: Fix discovery manifest and health endpoint (routes.rs)
Step 5: Remove TCP support from core library (socket.rs)
Step 6: Update Makefile
Step 7: Update buildenv.sh
Step 8: Verify with cargo check/clippy
Acceptance Criteria
--start/--stopflags work for both binaries via hero_proc"protocol": "openrpc"make start/make stopwork with new patterncargo checkandcargo clippypassTest Results
cargo check: clean (no warnings)cargo clippy: clean (no warnings)Implementation Summary
Changes Made
Dependencies (Cargo.toml)
hero_rpc_server,zinit_sdk,openfrom workspacehero_proc_sdkto workspace and both binary cratesServer (
hero_aibroker_server/src/main.rs)Run/Start/Stop/Serve/Status/Logs/Ui/Zinit) with--start/--stopflagsHeroLifecycleusageself_start()usinghero_proc_sdk(ServiceBuilder, ActionBuilder)self_stop()with status pollingUI (
hero_aibroker_ui/src/main.rs).requires(&["hero_aibroker_server"])dependencySocket compliance (
routes.rs,api/mod.rs)"protocol": "web"→"protocol": "openrpc""OK"→ JSON{"status": "ok", "service": "hero_aibroker_ui", "version": "..."}Core library (
socket.rs,lib.rs)SocketMode::Tcp,Listener::Tcp,from_env_or_default)Listener/SocketModere-exports from lib.rsBuild (
Makefile,buildenv.sh)run/start/stop/rundevtargets for--start/--stoppatternlogs/status/run-ui/start-ui/stop-ui/logs-uitargets3385from buildenv.shVerification
zinit,zinit_sdk, orhero_rpc_serverremain in codebasecargo checkpasses cleancargo clippypasses cleanImplementation committed:
7205b11Browse:
7205b11