Commit efdf548
authored
🤖 ci: use nix devshell PATH for mux bash hooks (#34)
## Summary
Enable Mux bash tool invocations to use the project's Nix dev shell
toolchain by caching and exporting a devshell PATH in `.mux/tool_env`.
## Background
This workspace had an outdated system `kind` binary (`v0.10.0`) on PATH,
which defaulted to old Kubernetes node images (`kindest/node:v1.20.2`).
We want Mux command execution to consistently use flake-provided tools
instead.
## Implementation
- Added `mux_use_nix_devshell_path()` to `.mux/tool_env`.
- Uses a workspace-scoped cache file
(`/tmp/mux-nix-path-<workspace-tag>`) to avoid collisions between
concurrent workspaces.
- Refreshes the cache when missing/empty, or when `flake.nix` /
`flake.lock` is newer than the cache file.
- Uses atomic cache writes (`mktemp` + `mv`) and fail-fast assertions
when a usable cache cannot be produced.
- Calls the function before defining/running existing helper functions
so every Mux `bash` tool call picks up the devshell PATH.
## Validation
- `make verify-vendor`
- `make test`
- `make build`
- `make lint`
- `bash -n .mux/tool_env`
- `kind version` (from Mux bash shell, now resolves to Nix `kind
v0.31.0`)
- `kubectl version --client` (from Mux bash shell, now resolves to Nix
`v1.35.0`)
## Risks
Low risk. Change is scoped to Mux bash hook environment setup and does
not modify application runtime logic. Main behavioral change is PATH
precedence in Mux-invoked bash commands; this is intentional and
constrained to workspace shell execution.
---
_Generated with [`mux`](https://github.com/coder/mux) • Model:
`openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$1.22`_
<!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh
costs=1.22 -->1 parent ce23fa8 commit efdf548
1 file changed
Lines changed: 74 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
5 | 79 | | |
6 | 80 | | |
7 | 81 | | |
| |||
0 commit comments