Skip to content

🤖 ci: use nix devshell PATH for mux bash hooks#34

Merged
ThomasK33 merged 1 commit into
mainfrom
operator-3qf7
Feb 10, 2026
Merged

🤖 ci: use nix devshell PATH for mux bash hooks#34
ThomasK33 merged 1 commit into
mainfrom
operator-3qf7

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Feb 10, 2026

Copy link
Copy Markdown
Member

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 • Model: openai:gpt-5.3-codex • Thinking: xhigh • Cost: $1.22

@ThomasK33 ThomasK33 force-pushed the operator-3qf7 branch 2 times, most recently from 40cce36 to 56a5aad Compare February 10, 2026 13:45
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Please review this change for correctness and any edge cases.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 56a5aad668

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .mux/tool_env Outdated
Comment thread .mux/tool_env Outdated
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Implemented your feedback:

  • resolve flake root from stable workspace/project root context so subdirectory invocations still use the devshell
  • fail fast when cache refresh is required but nix develop cannot regenerate PATH

Please take another look.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1417983067

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .mux/tool_env Outdated
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Follow-up applied:

  • devshell setup failures are now propagated at top-level (tool_env returns non-zero when sourced, exits non-zero if executed)

Please take another look.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be074d7a3f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .mux/tool_env
---
_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 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Adjusted top-level error propagation to preserve the devshell setup exit code.
Please take another look.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33 ThomasK33 added this pull request to the merge queue Feb 10, 2026
Merged via the queue into main with commit efdf548 Feb 10, 2026
8 checks passed
@ThomasK33 ThomasK33 deleted the operator-3qf7 branch February 10, 2026 14:12
@ThomasK33

Copy link
Copy Markdown
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant