check and fix #86
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
can always learn from e.g. ../hero_redis
Implementation Spec: Issue #86 — Hero Books Structure Fix
Objective
Align the
hero_booksworkspace with the canonical Hero service naming convention andhero_proc_service_selfstartpattern as demonstrated by../hero_redis. Specifically:hero_booksCLI binary (usinghero_books_sdk) in the root crate.hero_books_server,hero_books_ui,hero_books_admin) implement theHeroLifecycleself-start/stop pattern correctly.start,stop,run,rundev,logs,logs-ui,logs-admin,restarttargets.buildenv.shBINARIES to include the newhero_booksCLI.Problems Found
1. No
hero_booksCLI binary existshero_docsbinary, nothero_bookssrc/bin/hero_books.rsexistshero_books_client/src/bin/books.rs2. Makefile missing hero_proc lifecycle targets
start(background start via hero_proc)restarttargetlogs,logs-ui,logs-admintargetsrunusesscripts/run-services.shindirection instead of calling binaries directlystopdelegates toscripts/stop.shinstead of calling binaries directlyrundevtarget (currently nameddev)3.
buildenv.shBINARIES missinghero_bookshero_books_server hero_books_admin hero_books_uihero_booksRequirements
src/bin/hero_books.rs— thin CLI usingHeroLifecycleto managehero_books_serverCargo.toml— addhero_books_sdkdep + new[[bin]]entrystart,stop,restart,rundev,logs,logs-ui,logs-adminto Makefilebuildenv.shBINARIES to includehero_booksFiles to Modify / Create
src/bin/hero_books.rshero_booksCLI binaryCargo.tomlhero_books_sdkdep +[[bin]]forhero_booksMakefilescripts/buildenv.shhero_booksto BINARIESREADME.mdImplementation Plan
Step 1 — Verify Development Branch (git only, no code changes)
Dependencies: none
Step 2 — Create
src/bin/hero_books.rsFiles:
src/bin/hero_books.rsDependencies: none
Parallel with: Steps 3, 4, 5
Thin CLI using
HeroLifecyclepointing athero_books_server:Step 3 — Update root
Cargo.tomlFiles:
Cargo.tomlDependencies: Step 2
Parallel with: Steps 4, 5
Add
hero_books_sdkdep + new[[bin]]entry forhero_books.Step 4 — Update
MakefileFiles:
MakefileDependencies: none
Parallel with: Steps 2, 3, 5
Add
start,stop,restart,rundev,logs,logs-ui,logs-admintargets.Step 5 — Update
scripts/buildenv.shFiles:
scripts/buildenv.shDependencies: none
Parallel with: Steps 2, 3, 4
Add
hero_booksto BINARIES.Step 6 — Fix
README.mdFiles:
README.mdDependencies: Steps 2–3 (to know final binary names)
Step 7 — Verify compilation:
cargo checkDependencies: Steps 2–5 complete
Step 8 — Verify self-start pattern:
--helpon each binaryDependencies: Step 7
Acceptance Criteria
cargo buildbuildshero_books,hero_books_server,hero_books_ui,hero_books_admin,hero_docshero_books --helpshows subcommands:run,start,stop,status,logsmake start/make stop/make restart/make run/make rundevall workmake logs/make logs-ui/make logs-adminworkbuildenv.shBINARIES includeshero_booksNotes
hero_booksCLI is a thin lifecycle manager — wrapsHeroLifecyclepointing athero_books_server. Does NOT run a server itself.hero_books_adminis retained alongsidehero_books_ui(they serve different audiences).hero_proc_sdkinhero_books_serveris correct — used to self-register with hero_proc; do NOT remove.../hero_redis(both Makefile structure and binary pattern).Test Results
Details
All library unit tests completed successfully. The test suite compiled cleanly (3m 45s build time) with no test failures.
Implementation Summary
All changes have been implemented and verified (
cargo checkpasses).Changes Made
src/bin/hero_books.rshero_booksCLI binary: thin lifecycle manager forhero_books_serverusingHeroLifecycle(start/stop/run/status/logs subcommands)Cargo.toml[[bin]]entry forhero_books, addedhero_rpc_serverandtokiodependenciesMakefileINSTALL_DIRvar,start,stop,restart,rundev,logs,logs-ui,logs-admintargets; keptdevas alias forrundev; updated.PHONYscripts/buildenv.shhero_bookstoBINARIESlistREADME.mdhero_books_client/src/bin/books.rsreferences with correcthero_books/src/bin/hero_books.rsentries; updated CLI Usage sectionVerification
hero_books,hero_books_server,hero_books_ui,hero_books_admin,hero_docshero_books --helpshows lifecycle subcommands:run,start,stop,status,logsHeroLifecycleself-start pattern — no changes neededbuildenv.shBINARIES now includeshero_bookshero_redisreference patternTest Results
Build: ✅ Pass —
cargo checkcompleted successfully, all binaries compile