mux: bootstrap the Node.js runtime under the module root instead of ~/.local/share/coder-mux
- Dominant language
- HCL
- Stars
- 79
- Forks
- 161
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 38
Description
Follow-up from https://github.com/coder/registry/pull/1095 (review body finding on `scripts/install.sh.tftpl:27`).
When the workspace image has no `node`, `ensure_node` bootstraps a pinned Node.js runtime into `$HOME/.local/share/coder-mux/node-v-linux-`, and `start.sh.tftpl` looks it up at the same path. #1095 established `$HOME/.coder-modules/coder/mux` as the module root for the install, logs and scripts, but left the runtime at this pre-existing ad-hoc path, so troubleshooting and cleanup are split across two locations (AGENTS.md: module-managed runtime data must live under the per-module root).
Proposed change: bootstrap into `${INSTALL_PREFIX}/node/node-v-linux-` (or a sibling directory under the module root), update the start script's `use_bootstrapped_node` lookup, the `CODER_SCRIPT_BIN_DIR/node` symlink target and the README note. Workspaces that already have a runtime under `~/.local/share/coder-mux` would download it once more on the next start; alternatively check the old path and move it.
> Xum acted on behalf of @ibetitsmike when filing this issue.
Contributor guide
Assessment
This issue has not been assessed yet.