feat(skills): service_os wasm_build + --wasm flag on service_complete #128
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!128
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_mik_wasm_build"
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?
Adds the Dioxus WASM shell build into hero_skills so DEPLOYMENT_NU_HERO_OS.md §6 (
cd ~/code/hero_os; make build-wasm; make install-assets-release) becomes a single nu invocation.Changes
New
service_os wasm_buildexportRuns
make build-wasm(orscripts/build-wasm.shfallback) inside the cloned hero_os repo, then copiesdist/share/hero_os/public/into~/hero/share/hero_os/public/.Flags:
--root— install assets under/root/hero/share/(sudo)--update—forge mergebefore building--reset— wipetarget/dx/for a cold rebuild (preserves cargo cache)--restart— also restart hero_os via hero_proc so the new bundle is picked upservice_complete --wasmRuns
service_os wasm_build --restartat the end of phase 2. Gated behind opt-in because the build is 20-30 min on a cold dx cache and not always wanted on iterative redeploys. Skipped under--core(which has no hero_os in its set anyway).Quick path with WASM
Replaces both step 4 (
service_complete) and the §6 manual block in the runbook.Validation
nu -c "use tools/modules/services *"parses cleanly; runtime needs a hero_os clone + Dioxus toolchain to actually exercise.Tracker
home#185.
Signed-off-by: mik-tf
Pre-merge audit caught one bug — pushed
424a3ba:cdleaking cwd. The barecd $repo_path; ^make build-wasminsidewasm_buildwould leak the working-directory change back to the caller after the function returned. Operators runningservice_complete --wasmin an interactive nu shell would have ended up in~/code/hero_osafterwards, breaking subsequent commands that assume cwd is unchanged. Fixed by wrapping each build invocation indo { cd ...; ^make ... }so thecdis scoped to thedo-block environment only.Caught during prod-readiness audit before merge: the bare `cd $repo_path` inside wasm_build would leak the cwd change back to the caller's shell context after the function returned. Wrapped each build invocation in `do { cd ... ; ^make/^bash ... }` so the cd is scoped to the do-block environment only. This was a real bug — operators running `service_complete --wasm` in an interactive nu shell would have ended up in ~/code/hero_os afterwards, silently breaking subsequent commands that assume cwd is unchanged.Squash-merged to
developmentas6d1f725. Branch deleted.elseon new line after}in packages.nu #147Pull request closed