fix(services): surface-fixes from heroci --download validation (lib.nu mycelium import + non-sudo setcap) #230
No reviewers
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!230
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_mik_heroci_validation_fixes"
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?
Two latent bugs surfaced when the full mycelium → router stack came up on heroci via
service_<name> start --downloadfor the first time (session 73, 2026-05-07).lib.nu —
svc_mycelium_ensurecallsmycelium ensureunresolvedsvc_mycelium_ensure(lib.nu:1100) calledmycelium ensurebut lib.nu itself did not import../clients/mycelium.nu. In Nu, command lookup happens in the defining module's scope, so even when a sibling service_*.nu imports the mycelium client, that import does NOT carry into svc_mycelium_ensure's body.service_router startblew up atCommand 'mycelium' not foundthe first time it calledsvc_mycelium_ensure.Fix:
use ../clients/mycelium.nu *at the top of lib.nu so the resolution works for every caller.service_mycelium.nu —
^sudo setcapfails when sudo binary absentsession 73's session-merged PR #229 factored capability-setting into
svx_apply_capabilityand unconditionally called^sudo setcap. heroci runs as root with no sudo binary installed (single-user TF Grid container), so the call failed withCommand 'sudo' not found.Fix: branch on
(^id -u | str trim) == "0"— when the caller is already root, call^setcapdirectly; otherwise keep the existing^sudo setcappath for ordinary multi-user installs.Validation
Both fixes verified end-to-end on heroci: hero_proc + mycelium + hero_router all came up clean from --download artifacts after these landed (no source on disk, no FORGE_TOKEN at boot).
The remaining heroci 502 is unrelated — hero_router binds on 127.0.0.1:9988 (or []:9988 with --address) but the TF Grid name_proxy backend points at the public IPv4. Tracked at lhumina_code/home#227 for session 74 (DO from-nothing demo).
Signed-off-by: mik-tf