fix(jobs): map nu to nushell so action_set deserializes correctly #13

Merged
mahmoud merged 1 commit from development_fix_nu_interpreter into development 2026-04-27 06:03:11 +00:00
Owner

Fixes the bug surfaced while verifying issue #9.

What was wrong

hero_codescalers_server was passing interpreter: "nu" to hero_proc.action_set. hero_proc serde rejects that with:

unknown variant `nu`, expected one of `bash`, `sh`, `rhai`, `python3`, `bun`, `node`, `nushell`, `exec`, `ai`, `mcp`

Anyhow context wrapping was hiding this — callers only saw <feature> enqueue failed with no underlying cause.

Fix

Two changes:

  • jobs::enqueue normalizes "nu" to "nushell" before passing to ActionBuilder. One site catches all 12 callers (users.rs / services.rs / template.rs).
  • main.rs::rpc_handler returns format!("{:#}", e) instead of e.to_string() so future serde mismatches surface their full chain.

Verified

On kristof4 — user.bridge_ping now succeeds; job ran with the canonical codescaler tags (codescaler, codescaler_, codescaler_kind_, codescaler_target_).

Closes the bug found in #9.

Fixes the bug surfaced while verifying issue #9. ## What was wrong hero_codescalers_server was passing interpreter: "nu" to hero_proc.action_set. hero_proc serde rejects that with: ``` unknown variant `nu`, expected one of `bash`, `sh`, `rhai`, `python3`, `bun`, `node`, `nushell`, `exec`, `ai`, `mcp` ``` Anyhow context wrapping was hiding this — callers only saw `<feature> enqueue failed` with no underlying cause. ## Fix Two changes: - jobs::enqueue normalizes "nu" to "nushell" before passing to ActionBuilder. One site catches all 12 callers (users.rs / services.rs / template.rs). - main.rs::rpc_handler returns format!("{:#}", e) instead of e.to_string() so future serde mismatches surface their full chain. ## Verified On kristof4 — user.bridge_ping now succeeds; job ran with the canonical codescaler tags (codescaler, codescaler_<actor>, codescaler_kind_<kind>, codescaler_target_<t>). Closes the bug found in https://forge.ourworld.tf/lhumina_code/hero_codescalers/issues/9.
hero_proc's serde rejects "nu" with: unknown variant `nu`, expected one of
`bash`, `sh`, `rhai`, `python3`, `bun`, `node`, `nushell`, `exec`, `ai`, `mcp`.
Anyhow's context wrapping was hiding this; callers only saw "<feature>
enqueue failed" with no underlying cause.

Two changes:
- jobs::enqueue normalizes "nu" to "nushell" before passing to ActionBuilder.
  Catches all 12 callers (users.rs, services.rs, template.rs) at one site.
- main.rs::rpc_handler returns format!("{:#}", e) instead of e.to_string()
  so future serde mismatches surface their full anyhow chain.

Verified on kristof4: user.bridge_ping now succeeds; job ran with codescaler
tags as designed.

#9
mahmoud merged commit 539c18f51f into development 2026-04-27 06:03:11 +00:00
mahmoud deleted branch development_fix_nu_interpreter 2026-04-27 06:03:19 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_codescalers!13
No description provided.