hero_service::HeroService::rpc/ui() should default-forward PATH_ROOT et al #51
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_rpc#51
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?
Surfaced by s110 hero_logic D-10 closure (hero_proc#102 D-10 sweep).
Problem
hero_service::HeroService::rpc()and::ui()only seedRUST_LOG=infoinenv_vars. When the CLI invokesHeroServices::start(), the resultingActionSpeccarries onlyRUST_LOG. hero_proc spawns daemons with clean env, so under hero_lib30a0b34e's strict PATH_ROOT regime, every spawned daemon panics atherolib_core::base::paths::path_root()(crates/core/src/base/paths.rs:38).This is s109 lesson #19, restated for the
hero_serviceabstraction layer.Current workaround
Each CLI that uses
HeroServiceshas to thread env vars manually:Live example: hero_logic ba74b2b
crates/hero_logic/src/main.rs.Proposed fix
Move the forwarding into
HeroService::rpc()andHeroService::ui()directly — default-seed PATH_ROOT/PATH_VAR/PATH_BUILD/PATH_CODE/HERO_SOCKET_DIR from the parent process env when set and non-empty. The few CLI consumers each strip ~6 lines, and every future consumer benefits without thinking about it.Alternative: a single method
.forward_hero_env()onHeroServicethat does the loop, opted into by callers.Affected consumers (as of 2026-05-17)
hero_proc_sdk::ActionSpecwith its ownforward_env_if_sethelper) — would also benefit if it migrated toHeroServicesOut of scope
The deeper canonical alignment per
hero_service_check_fix/SKILL.md:189is that lab itself (not the CLI's--startflag) should be the lifecycle owner. This issue addresses the legacy CLI path while it exists. Separate META could track migrating the whole workspace off the CLI lifecycle pattern.Refs: hero_proc#102, hero_proc#105.
mik-tf referenced this issue from lhumina_code/hero_demo2026-05-18 03:19:09 +00:00