feat(services): add service_compute lifecycle module #169
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_skills!169
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_service_compute_lifecycle"
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?
Summary
Adds a Nushell lifecycle module for the
hero_computefour-binary stack — install / start / stop / status / reset — wired throughservices/mod.nu. Modeled onservice_codescalers.nu, with the privileged-service shape (--rootmandatory at start) fromservice_mycelium.nu.Related Issue
Closes #154
Changes
tools/modules/services/service_compute.nu(766 lines). Install pulls system packages, downloads cloud-hypervisor v43.0 + my_hypervisor v0.1.2, delegates the mycelium runtime install toservice_mycelium, and runscargo build --releasefor the four hero_compute binaries. Start registers the three daemon actions (hero_compute_server,hero_compute_ui,hero_compute_explorer) with hero_proc and prints a summary block with sockets/URLs/test plan. Mode and master_ip are threaded into per-action env (HERO_COMPUTE_MODE,HERO_COMPUTE_MASTER_IP).tools/modules/services/mod.nu— one-lineexport use service_compute.nunext toservice_codescalers.Deviations from the spec (called out for review)
--releaseflag inverted to--debug(Nushell does not allow type annotations on switch flags, so--release: bool = trueis not expressible). Default is release;--debugopts into a debug build.--instancesupport omitted entirely. hero_compute owns/dev/kvmand the mycelium TUN — multi-instance is not a real use case.--debugis not threaded throughstart → install. Runservice_compute install --debugfirst if a debug build is wanted.Test Results
This is a Nushell module; runtime exercising requires
/dev/kvm,--root, and network access — can't be run from CI today. Static checks:nu -c 'use ./tools/modules/services/service_compute.nu'— clean parse.nu -c 'use ./tools/modules/services/mod.nu *'— clean parse.help service_compute install/start/stop/status/reset— all signatures render cleanly.End-to-end install/start/stop/status verification is manual smoke-testing on a KVM-enabled root host (Step 9 of the spec).
Notes for the reviewer
The CI workflow (
.forgejo/workflows/build.yaml) only runsscripts/test.sh, which checks SKILL.md frontmatter — it does not parse-checktools/modules/services/*.nu. A regression in this module would slip past CI. Worth a follow-up to addnu -c 'use ./tools/modules/services/mod.nu *'as a smoke step.