fix: align main with hero_proc/hero_service template — service_base!() macro, git dep, full service.toml #42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "audit-41"
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?
Summary
Three small fixes uncovered by §1 of #41 (
mainend-to-end verification against the canonical references).fix(server): use service_base!() macro—lab infocheckflaggedhero_logic_serveras missing the macro; it was hand-rolling the exact constants the macro emits. Diff −17 +2.fix(deps): hero_admin_lib as git dep, not relative path— rootCargo.tomlhad a relative path dep to a hero_website_framework sibling that doesn't exist in the canonical lab coderoot.cargo metadatafailed out of the box. Switched to the git dep bothhero_procand thehero_servicetemplate use.fix(service.toml): mirror hero_proc — each per-crate file is the full service— each per-crateservice.tomllisted only its own binary.hero_proc's pattern (cli/server/admin all carry the same[[binaries]]list, differing only in[service.crate]) is whatlabreads from<bin> --info --json.lab service --installworked but--startresolved through the CLI binary and bailed (kind = cli, not a long-running service) because it never saw the server/admin entries. All three files now list the full inventory.Test plan
cargo build --workspace— cleancargo metadatafrom canonical coderoot at~/hero/code/hero_logic— clean (was failing on missinghero_website_frameworksibling)lab infocheck—3 crate(s) clean, 0 finding(s) total(was 1 finding before)lab service hero_logic --install— clean install, all three binaries reportbinaries=3 [cli, server, admin]from--info --json(was failing every--infocheck before)/health,/openrpc.json(57 methods),/.well-known/heroservice.jsonall pass on rpc.sock and admin.socklab service hero_logic --start— still bails (out of scope: needs an entry inhero_skills/crates/lab/src/service/service_manager.rs::SERVICE_MAP; see #41 §1 comment)system.pingJSON-RPC — still 404s (out of scope:hero_rpc_serverdoesn't registersystem.*builtins; onlyhero_rpc2does)Closes part of #41 §1.
The path dep `hero_admin_lib = { path = "../hero_website_framework/crates/hero_admin_lib" }` required a hero_website_framework sibling beside hero_logic. Out-of-box `cargo metadata` (and therefore `lab infocheck`/`lab service --install`) failed in the canonical lab coderoot at `~/hero/code/` because the sibling isn't cloned there — only services lab manages directly. Switch to the git dep pattern hero_proc and the hero_service template both use: hero_admin_lib = { git = "https://forge.ourworld.tf/lhumina_code/hero_website_framework.git", branch = "development" } Builds clean (4.7s incremental), preserves the same hero_admin_lib surface, and lets `cargo metadata` succeed without a hand-cloned sibling. Refs hero_logic#41 §1 + §2 (hero_proc + hero_service alignment).Closed without merge button — branch was fast-forwarded directly onto
mainper request (no PR review needed for these three alignment fixes). All commits now at6499aaconmain.Pull request closed