template build: locate_nutools_source only checks $PATH_ROOT/code/hero_skills/nutools — operator-hostile #292
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#292
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?
Problem
crates/lab/src/installers/nu.rs::locate_nutools_source()falls back to a single hardcoded path under$PATH_ROOT/code/hero_skills/nutools. When an operator runsprovisioning.template.applyfromhero_codescalers(daemon runs asrootwithPATH_ROOT=/root/hero), this resolves to/root/hero/code/hero_skills/nutools— which does not exist on the herodev box. The repo is checked out under/home/<developer>/hero/code/hero_skills/, not under/root/.Result: every template build aborts at the nu-install step unless the operator sets
HERO_NUTOOLS_DIRmanually pointing at a developer home.hero_codescalers#27worked around this on the daemon side by scanning/home/*/hero/code/hero_skills/nutoolsat apply time and exportingHERO_NUTOOLS_DIR. That fixes the symptom but the discoverability is now lab daemon-side metadata duplicated across callers.Suggested fixes (any one is enough)
include_dir!()and extract to the target on install. Self-contained, no operator config required.$PATH_ROOT/code/hero_skills/as part oflab flow template initso the fallback path actually exists.locate_nutools_source()to scan additional candidate roots (/home/*/hero/code/,/Users/*/repos/, etc.) before bailing.(1) is the most portable. (2) is the smallest diff and makes the existing fallback work as documented.
Repro
Fails with:
could not locate nutools/ source — set HERO_NUTOOLS_DIR or clone hero_skills into $PATH_CODE/.