refactor: remove --start/--stop from hero_* binaries; nushell owns full lifecycle #102
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#102
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
Per recent architectural decision (@despiegk): Nushell (
tools/modules/services/service_*.nu+ sharedlib.nuhelpers) is the single source of truth for Hero service lifecycle. The--start/--stopflags that everyhero_*binary currently carries are redundant glue — they duplicate what the nu layer already does viahero_proc_sdk/proc service set/proc service start, and they create a second "canonical" spec that drifts against the nu modules.The consolidation in
5df145f Refactor service lifecycle management into shared lib.nu helpersalready moved lifecycle dispatch into nu helpers. This issue covers the next step: tearing the now-dead--start/--stopcode out of each service binary.Closes #100 and #101 (which proposed the opposite direction).
Current state
service_*.numodules no longer callhero_<svc> --start/--stop. They dispatch viaproc service set/proc service startinlib.nuhelpers (svc_start,svc_stop,svc_start_preflight,svc_status). Verified: only remaining refs inservice_biz.nuare comments and a help-text line.hero_*binary still ships--start/--stopmatchingbuild_service_definition()and callinghero_proc_sdk::lifecycle::restart_service/stop_service.claude/skills/hero_proc_service_selfstartdocuments the--start/--stopCLI pattern as the recommended design. This skill becomes obsolete under the new direction.Target state
hero_*binaries are plain foreground daemons. No--start/--stopflags. They read their config, bind their sockets, and run until SIGTERM'd.service_*.nu.run/start/stop/installtargets.makestays for build/test/lint only (or goes away entirely per-service — TBD).claude/skills/hero_proc_service_selfstartis retired;claude/skills/nu_service+nu_service_usebecome the canonical lifecycle docs.Per-repo checklist
Each repo gets its own issue + PR. Order is opportunistic — deletions are low-risk since nu modules no longer call these flags.
--start/--stopfromsrc/main.rs; dropbuild_service_definition()if unused elsewhereDeferred (not yet carrying the flags): hero_office, hero_osis.
Deferred (no service binary yet): hero_agent, hero_claude, hero_compute, hero_shrimp.
Makefile → nu script consolidation
Parallel track. Each repo currently has a
Makefilewithinstall,build,run,test,fmt,lint,clean. The lifecycle pieces (run, anything calling the service binary with--start) move into the service'sscripts/nu_service.nu(already per-repo pattern).build/test/fmt/lintstay inmakefor now — decision on full retirement deferred.Scope guardrails
--start,--stop,build_service_definition(), anyclapentries for those flags, related docs.rust_shutdownsignalsskill).service_<name>.nu install | start | status | stopmust still work end-to-end on Hetzner.Rollout sequencing
hero_whiteboard(smallest lifecycle surface, already validated by the since-closed PR #101).hero_whiteboard --startbefore deleting.claude/skills/hero_proc_service_selfstartonce 3+ services are through.Refs: #75, closed #100, closed #101.
we are too broad here, the idea is not just to copy everything from makefiles, we need to stay elegant