Document lab user init prerequisite in service skills (PATH_ROOT requirement) #272
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_skills#272
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?
Context
From the hero_logic#41 §1 audit.
Services that use
herolib_core::base::paths::path_root()(transitively viaresolve_socket_dir → path_var → path_root) panic at startup ifPATH_ROOTisn't set:Nothing in
hero_service.md,hero_service_toml_info.md, orhero_service_check_fix.mdmentions this. A friend setting up a fresh dev environment hits the panic without warning.Note:
hero_proc#109(now merged) helps for hero_proc-managed daemons — they pick up~/hero/cfg/env/*.envon supervisor startup. But directcargo runinvocations still needPATH_ROOTin shell env, andlab user initis the canonical way to populate~/hero/cfg/.Tasks
Option A — Document the prerequisite
Add a one-liner near the top of
hero_service_check_fix.md§7 (smoke test):Option B — Fallback in
path_root()Make
path_root()fall back to$HOME/herowhenPATH_ROOTunset, with atracing::warn!rather than a panic. Lives inherolib_core::base::paths::path_root(hero_lib repo).My lean: both. Option B handles the friendly-default case; Option A keeps the explicit setup story documented.
Acceptance
lab user initprerequisite.path_root()has a safe fallback.lab service … --startwithout hitting the unexplained panic.Direction locked: improve panic message — no fallback, no skill update
@timur's call (2026-05-20): "always die principle. no fallback." Users should follow standards; we shouldn't paper over missing setup with implicit defaults.
Action: a single change to the
herolib_core::base::paths::path_root()panic message. Make it actionable:(Wording can vary — the key bits are: mention
labfirst as the preferred path, thenlab user initas the manual fallback. No code-level fallback to $HOME/hero.)Skill update is NOT in scope. The improved panic message itself is the discoverability fix; the skill text doesn't need to call this out separately.
Option A (document) and Option B (path_root() fallback) from the issue body are both superseded by this.