fix repo #7
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 #7 — fix repo
Objective
Audit and fix the
hero_inspectorrepository against three skill checklists: Hero multi-crate best practices, Unix socket mandatory endpoints, and hero_proc service self-start patterns. Most of the infrastructure is already in place; the gaps are targeted and well-defined.Requirements
hero_crates_best_practices_check
hero_inspector_examplescrate is present on disk but commented out of workspaceCargo.toml— uncomment itscripts/build_lib.shheader comment still sayshero_redis(copy-paste leftover) — fix tohero_inspectorbuildenv.shdeclaresVERSION="0.1.0"whileopenrpc.jsonsays"version": "0.2.0"— align to0.2.0hero_sockets
/healthand/.well-known/heroservice.jsonexist ✅GET /manifestendpoint is missing on both server and UI — must be added as alias to discovery manifesthero_proc_service_selfstart
--start/--stopCLI flags exist viaLifecycleCommand✅repo_urlis hardcoded to empty string""in lifecycle construction — must be set to actual repo URL soinstallsubcommand worksImplementation Plan
Step 1: Fix build_lib.sh stale comment
File:
scripts/build_lib.shhero_redisreferences in header comments withhero_inspectorStep 2: Align version in buildenv.sh
File:
buildenv.shVERSION="0.1.0"toVERSION="0.2.0"to matchopenrpc.jsonStep 3: Resolve hero_inspector_examples crate status
File:
Cargo.toml# "crates/hero_inspector_examples"to restore crate to workspace (it already compiles)Step 4: Add GET /manifest to hero_inspector_ui (routes.rs)
File:
crates/hero_inspector/src/server/routes.rs.route("/manifest", get(discovery_handler))alongside existing/.well-known/heroservice.jsonroute inbuild_router()Step 5: Add GET /manifest to hero_inspector_server
File:
crates/hero_inspector_server/src/main.rs/manifestroute tobuild_and_start()router using same manifest dataStep 6 & 7: Wire repo_url/branch on lifecycle (server + UI)
Files:
crates/hero_inspector_server/src/main.rs,crates/hero_inspector_ui/src/main.rsHeroLifecyclewith actualrepo_url = "https://forge.ourworld.tf/lhumina_code/hero_inspector.git"andbranch = "development"Acceptance Criteria
scripts/build_lib.shheader no longer referenceshero_redisbuildenv.shVERSIONmatchesopenrpc.jsoninfo.version(both0.2.0)Cargo.tomlhas no commented-outmembersentriesGET /manifeston both server and UI returns{"protocol":"openrpc",...}hero_inspector_server start/stopreachhero_procwithout "no repo URL" errorhero_inspector_ui start/stopreachhero_procwithout "no repo URL" errorcargo check --workspacepasses cleanlyTest Results
cargo check --workspace
✅ Clean — no errors or warnings
cargo test --workspace
Build Errors (hero_inspector_examples)
cargo test --workspacefails to compile thehero_inspector_examplescrate due to a type rename:The examples reference
HeroInspectorRpcApiClientbut the actual struct is nowHeroInspectorClient. This appears to be a leftover from thezinit_sdk → hero_proc_sdk/ client rename migration.Fix: Update both example files to use
HeroInspectorClientinstead ofHeroInspectorRpcApiClient.Test Results (Final)
cargo test --workspace
✅ All tests pass
All workspace crates compile and test cleanly.
Implementation Complete ✅
Changes Made
All fixes applied based on the three skill checklists:
hero_crates_best_practices_check
scripts/build_lib.sh— fixed stalehero_redisreference in header comments →hero_inspectorbuildenv.sh— alignedVERSIONfrom0.1.0to0.2.0to matchopenrpc.jsonCargo.toml— uncommentedcrates/hero_inspector_examplesworkspace member (it already compiled; was just excluded)crates/hero_inspector_examples/examples/basic_usage.rs— fixedHeroInspectorRpcApiClient→HeroInspectorClient(stale name from previous SDK rename)crates/hero_inspector_examples/examples/health.rs— same fixhero_sockets
crates/hero_inspector/src/server/routes.rs— addedGET /manifestroute (alias to samediscovery_handleras/.well-known/heroservice.json)crates/hero_inspector_server/src/main.rs— addedGET /manifestendpoint +manifest_handlerfunctionhero_proc_service_selfstart
crates/hero_inspector_server/src/main.rs— wiredHeroLifecyclewith realrepo_url = "https://forge.ourworld.tf/lhumina_code/hero_inspector.git"andbranch = "development"crates/hero_inspector_ui/src/main.rs— same lifecycle fix for the UI binaryTest Results
cargo check --workspace✅ cleancargo test --workspace✅ 8 test suites, 0 failuresAcceptance Criteria
scripts/build_lib.shheader no longer referenceshero_redisbuildenv.shVERSIONmatchesopenrpc.jsoninfo.version(both0.2.0)Cargo.tomlhas no commented-outmembersentriesGET /manifestadded to both server and UIhero_inspector_serverlifecycle wired with real repo URL and branchhero_inspector_uilifecycle wired with real repo URL and branchcargo check --workspacepasses cleanlycargo test --workspacepasses cleanlyImplementation committed:
9ffa642Browse:
9ffa642