--target root documented in service_mycelium.nu line 521 but rejected by clients/target.nu validator (driver|common|self only) #244
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#244
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?
Symptom
But
service_mycelium.nuline 521 reads:And the doc-comment on the function literally lists
--target: string = "" # driver|common|root.So the user-facing doc says
rootis a valid value, the dispatch function checks for it, but the validator rejects it before the dispatch runs. Drift between docs/dispatch and validator.Surfaced during hero_slides#49 session 86 close-out — anyone following the documented
service mycelium start --target rootrecipe immediately hits this.Resolution options
A. Accept
rootin the validator (alias forself+ sudo)Add
"root"toTARGET_VALUESinclients/target.nu.service_mycelium.nu(and any other service that distinguishes the root case) keeps itslet sudo = ($target == "root")check. Other services that don't need to distinguish keep usingself.B. Drop
rootfrom docs, callers use--target self+ a separate--sudoflagMore invasive but clearer. Splits "which target to address" from "do you have sudo".
C. Drop the documented
rootvalue, callers run as actual rootLeast user-friendly — operators have to su/sudo into root before running the command.
A is the lowest-effort fix; B or C are bigger refactors.
Acceptance
service mycelium start --target rootsucceeds (whichever resolution is taken).driver|common|rootin their--targetdoc-comment (grep"# driver\\|common\\|root"innutools/modules/services/*.nu) align with the chosen behaviour.clients/target.nuTARGET_VALUESand the doc-comments agree.Refs
lhumina_code/hero_skills/nutools/modules/services/service_mycelium.nuline 521lhumina_code/hero_skills/nutools/modules/clients/target.nuline 36 (validator)service <name> <verb>non-functional on origin/development #245Closing as obsolete on origin/development.
The
service_mycelium.nuline 521 this issue references (thelet sudo = ($target == "root")branch + the doc-comment advertisingdriver|common|root) was deleted by commitd1825ad(despiegk, 2026-05-10 08:21) along with 46 otherservice_*.numodules. On current origin/development:nutools/modules/clients/target.nuvalidator restricts--targetto["driver" "common" "self"](line 21).rootas a target value.So the validator and the (gone) caller are now mutually consistent — the drift this issue documents no longer exists on tip.
The underlying broken-dispatcher state is tracked in #245. If the per-service mycelium logic returns (option A in #245), this issue can be re-opened against the restored code; if the migration proceeds (option B/C), the
--target rootsemantics need to be redesigned in thelabRust surface and a fresh issue filed there.Note: anyone still on a runtime clone that hasn't pulled past
d1825adcontinues to hit this bug as documented.Signed-off-by: mik-tf