fix #13

Open
opened 2026-03-21 04:28:56 +00:00 by despiegk · 3 comments
Owner

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

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
Author
Owner

Implementation Spec for Issue #13

Objective

Align hero_foundry's crate naming, binary naming, CLI structure, self-start lifecycle pattern, and Makefile targets with the conventions established in hero_redis.

Gap Analysis

Aspect hero_redis (reference) hero_foundry (current) Gap
Server binary hero_redis_server with HeroLifecycle + LifecycleCommand hero_foundry_server uses HeroServer::run_raw() Needs lifecycle CLI pattern
UI binary hero_redis_ui hero_foundry_admin (wrong name) Rename to hero_foundry_ui
CLI binary hero_redis (core lib) hero_foundry_lib (doesn't use SDK) Rename to hero_foundry, add SDK dep
Makefile hero_proc self-start pattern zinit-based Switch to hero_proc

Implementation Plan

Step 1: Rename hero_foundry_adminhero_foundry_ui

  • Rename directory, package name, binary name
  • Update HeroLifecycle and socket paths
  • Update workspace Cargo.toml

Step 2: Rename hero_foundry_libhero_foundry

  • Rename directory, package name, binary name
  • Add hero_foundry_sdk dependency
  • Update workspace Cargo.toml

Step 3: Convert hero_foundry_server to lifecycle CLI pattern

  • Replace HeroServer::run_raw() with explicit HeroLifecycle + LifecycleCommand + Serve subcommand
  • Match hero_redis_server pattern

Step 4: Update buildenv.sh

  • Update BINARIES list to "hero_foundry_server hero_foundry_ui"

Step 5: Update Makefile to hero_proc self-start pattern

  • Replace zinit-based targets with hero_proc pattern
  • Add: run, start, stop, restart, logs, status, rundev targets

Step 6: Verify compilation and fix remaining references

  • cargo check --workspace
  • Search for old names
  • cargo test --workspace

Acceptance Criteria

  • hero_foundry_admin renamed to hero_foundry_ui
  • hero_foundry_lib renamed to hero_foundry
  • hero_foundry CLI depends on hero_foundry_sdk
  • hero_foundry_server uses HeroLifecycle + LifecycleCommand pattern
  • Makefile uses hero_proc self-start (no zinit)
  • buildenv.sh lists correct binaries
  • cargo check --workspace succeeds
## Implementation Spec for Issue #13 ### Objective Align hero_foundry's crate naming, binary naming, CLI structure, self-start lifecycle pattern, and Makefile targets with the conventions established in hero_redis. ### Gap Analysis | Aspect | hero_redis (reference) | hero_foundry (current) | Gap | |--------|----------------------|----------------------|-----| | Server binary | `hero_redis_server` with `HeroLifecycle` + `LifecycleCommand` | `hero_foundry_server` uses `HeroServer::run_raw()` | Needs lifecycle CLI pattern | | UI binary | `hero_redis_ui` | `hero_foundry_admin` (wrong name) | Rename to `hero_foundry_ui` | | CLI binary | `hero_redis` (core lib) | `hero_foundry_lib` (doesn't use SDK) | Rename to `hero_foundry`, add SDK dep | | Makefile | hero_proc self-start pattern | zinit-based | Switch to hero_proc | ### Implementation Plan #### Step 1: Rename `hero_foundry_admin` → `hero_foundry_ui` - Rename directory, package name, binary name - Update HeroLifecycle and socket paths - Update workspace Cargo.toml #### Step 2: Rename `hero_foundry_lib` → `hero_foundry` - Rename directory, package name, binary name - Add `hero_foundry_sdk` dependency - Update workspace Cargo.toml #### Step 3: Convert `hero_foundry_server` to lifecycle CLI pattern - Replace `HeroServer::run_raw()` with explicit `HeroLifecycle` + `LifecycleCommand` + `Serve` subcommand - Match hero_redis_server pattern #### Step 4: Update `buildenv.sh` - Update BINARIES list to `"hero_foundry_server hero_foundry_ui"` #### Step 5: Update `Makefile` to hero_proc self-start pattern - Replace zinit-based targets with hero_proc pattern - Add: run, start, stop, restart, logs, status, rundev targets #### Step 6: Verify compilation and fix remaining references - `cargo check --workspace` - Search for old names - `cargo test --workspace` ### Acceptance Criteria - [ ] `hero_foundry_admin` renamed to `hero_foundry_ui` - [ ] `hero_foundry_lib` renamed to `hero_foundry` - [ ] `hero_foundry` CLI depends on `hero_foundry_sdk` - [ ] `hero_foundry_server` uses HeroLifecycle + LifecycleCommand pattern - [ ] Makefile uses hero_proc self-start (no zinit) - [ ] `buildenv.sh` lists correct binaries - [ ] `cargo check --workspace` succeeds
Author
Owner

Test Results

  • Total: 183
  • Passed: 183
  • Failed: 0
  • cargo check --workspace
  • cargo test --workspace

Changes Made

Step 1: Renamed hero_foundry_adminhero_foundry_ui

  • Renamed directory crates/hero_foundry_admincrates/hero_foundry_ui
  • Updated package name, binary name, HeroLifecycle service name, socket path (hero_foundry_ui.sock)
  • Updated workspace Cargo.toml

Step 2: Renamed hero_foundry_libhero_foundry

  • Renamed directory crates/hero_foundry_libcrates/hero_foundry
  • Updated package name, binary name, all usage strings
  • Added hero_foundry_sdk dependency

Step 3: Converted hero_foundry_server to lifecycle CLI pattern

  • Replaced HeroServer::run_raw() with explicit HeroLifecycle + LifecycleCommand + Serve subcommand
  • Server now supports: run, start, stop, status, logs, serve

Step 4: Updated buildenv.sh

  • BINARIES updated to "hero_foundry hero_foundry_server hero_foundry_ui"

Step 5: Updated Makefile to hero_proc self-start pattern

  • Replaced zinit-based service management with hero_proc pattern
  • Added targets: run, start, stop, restart, logs, logs-ui, status, rundev, installdev
  • Updated install to use install_binaries from build_lib.sh

Notes

  • No remaining references to old names (hero_foundry_admin, hero_foundry_lib)
  • All pre-existing warnings are unrelated to the changes
## Test Results - **Total**: 183 - **Passed**: 183 - **Failed**: 0 - `cargo check --workspace` ✅ - `cargo test --workspace` ✅ ## Changes Made ### Step 1: Renamed `hero_foundry_admin` → `hero_foundry_ui` - Renamed directory `crates/hero_foundry_admin` → `crates/hero_foundry_ui` - Updated package name, binary name, HeroLifecycle service name, socket path (`hero_foundry_ui.sock`) - Updated workspace `Cargo.toml` ### Step 2: Renamed `hero_foundry_lib` → `hero_foundry` - Renamed directory `crates/hero_foundry_lib` → `crates/hero_foundry` - Updated package name, binary name, all usage strings - Added `hero_foundry_sdk` dependency ### Step 3: Converted `hero_foundry_server` to lifecycle CLI pattern - Replaced `HeroServer::run_raw()` with explicit `HeroLifecycle` + `LifecycleCommand` + `Serve` subcommand - Server now supports: `run`, `start`, `stop`, `status`, `logs`, `serve` ### Step 4: Updated `buildenv.sh` - BINARIES updated to `"hero_foundry hero_foundry_server hero_foundry_ui"` ### Step 5: Updated `Makefile` to hero_proc self-start pattern - Replaced zinit-based service management with hero_proc pattern - Added targets: `run`, `start`, `stop`, `restart`, `logs`, `logs-ui`, `status`, `rundev`, `installdev` - Updated `install` to use `install_binaries` from `build_lib.sh` ### Notes - No remaining references to old names (`hero_foundry_admin`, `hero_foundry_lib`) - All pre-existing warnings are unrelated to the changes
Author
Owner

Implementation committed:

  • 27d0007 — main changes (crate renames, lifecycle CLI, Makefile)
  • 366e527 — fix ALL_FEATURES in buildenv.sh for build_lib.sh compatibility

Browse: 27d0007
Browse: 366e527

Implementation committed: - `27d0007` — main changes (crate renames, lifecycle CLI, Makefile) - `366e527` — fix ALL_FEATURES in buildenv.sh for build_lib.sh compatibility Browse: https://forge.ourworld.tf/lhumina_code/hero_foundry/commit/27d0007 Browse: https://forge.ourworld.tf/lhumina_code/hero_foundry/commit/366e527
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_foundry#13
No description provided.