fix self start #1
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?
first check /code_manage_development_branch
then make sure that we have $servicename_ui and $servicename
the last one is the cli which uses the $servicename_sdk
check all carrefully and fix what needs to be fixed
check /hero_proc_service_selfstart
and that we cleanly start in makefile
Implementation Spec: Fix Self-Start for
hero_matrixchatObjective
Wire up the
hero_proc_sdkself-start/self-stop pattern to bothhero_matrixchat_serverandhero_matrixchat_ui, and update the Makefile to use--start/--stopflags so that services are managed cleanly through Hero Proc rather than via raw background processes and ad-hoc shell scripts.Current State (Findings)
hero_matrixchat(CLI)hero_matrixchat_sdk. No--start/--stopneeded here (it is the CLI tool).hero_matrixchat_sdkhero_proc_sdkdependency needed.hero_matrixchat_servermain.rshas no--start/--stopflags. Nohero_proc_sdkdependency.hero_matrixchat_uimain.rshas no--start/--stopflags. Nohero_proc_sdkdependency.Makefilerun/stopscripts/run.shandscripts/stop.sh— raw background process management, not hero_proc.Makefilestart/stopvia hero_procCargo.toml[workspace.dependencies]— each crate declares its own. Nohero_proc_sdkentry anywhere.Requirements
hero_proc_sdkas a workspace-level dependency in the rootCargo.toml.hero_proc_sdktohero_matrixchat_server/Cargo.tomlandhero_matrixchat_ui/Cargo.toml.--startand--stopCLI flags tohero_matrixchat_server/src/main.rswithself_start()andself_stop()async functions.--startand--stopCLI flags tohero_matrixchat_ui/src/main.rswithself_start()andself_stop()async functions, where the UI service declaresrequires: ["hero_matrixchat_server"].start,stop,run-server, andrun-uitargets to the Makefile that use--start/--stopflags.hero_matrixchat_serverandhero_matrixchat_ui.Files to Modify
Cargo.toml(workspace root)[workspace.dependencies]withhero_proc_sdkgit dependencycrates/hero_matrixchat_server/Cargo.tomlhero_proc_sdk = { workspace = true }crates/hero_matrixchat_server/src/main.rs--start/--stopflags +self_start()/self_stop()functionscrates/hero_matrixchat_ui/Cargo.tomlhero_proc_sdk = { workspace = true }crates/hero_matrixchat_ui/src/main.rs--start/--stopflags +self_start()/self_stop()functions (withrequires: ["hero_matrixchat_server"])Makefile--start/--stoptargetsImplementation Steps
hero_proc_sdkto workspace Cargo.toml — add[workspace.dependencies]section with git sourcehero_proc_sdktohero_matrixchat_server/Cargo.toml—hero_proc_sdk = { workspace = true }hero_matrixchat_server/src/main.rs—--start/--stopargs +self_start()/self_stop()async functionshero_proc_sdktohero_matrixchat_ui/Cargo.toml—hero_proc_sdk = { workspace = true }hero_matrixchat_ui/src/main.rs—--start/--stopargs +self_start()/self_stop()async functions (withrequires: ["hero_matrixchat_server"])run/stopscripts withstart/stop/run-server/run-uihero_proc targetscargo check --workspaceAcceptance Criteria
cargo check --workspacepasses with no errorshero_matrixchat_server --helpshows--startand--stopflagshero_matrixchat_ui --helpshows--startand--stopflagsmake startcalls--starton both binariesmake stopcalls--stopon both binarieshero_matrixchat_uiself-start declaresrequires: ["hero_matrixchat_server"]Test Results
Full output
Implementation Complete
Changes Made
Cargo.toml(workspace root)[workspace.dependencies]section withhero_proc_sdkgit dependency (forge.ourworld.tf/lhumina_code/hero_proc.git, branch: development)crates/hero_matrixchat_server/Cargo.tomlhero_proc_sdk = { workspace = true }crates/hero_matrixchat_server/src/main.rs--startand--stopCLI flags toArgsself_start()async function: registers action + service with Hero Proc, health check via Unix socket~/hero/var/sockets/hero_matrixchat_server.sockself_stop()async function: stops service via Hero Proccrates/hero_matrixchat_ui/Cargo.tomlhero_proc_sdk = { workspace = true }crates/hero_matrixchat_ui/src/main.rs--startand--stopCLI flags toArgsself_start()async function: registers action + service with Hero Proc, health check via TCP port 3790, declaresrequires: ["hero_matrixchat_server"]self_stop()async function: stops service via Hero ProcMakefilerun/start: now callshero_matrixchat_server --start+hero_matrixchat_ui --startstop: now calls--stopon both binariesrun-server,run-ui,restarttargetsdev(foreground debug run) andrundev(no Hero Proc) for developmentTest Results
Acceptance Criteria
cargo check --workspacepasses with no errorshero_matrixchat_server --helpshows--startand--stopflagshero_matrixchat_ui --helpshows--startand--stopflagsmake start/make runcalls--starton both binariesmake stopcalls--stopon both binarieshero_matrixchat_uiself-start declaresrequires: ["hero_matrixchat_server"]Implementation committed:
c9f0cc4Browse:
c9f0cc4