Repository navigation
fix(workspace): scrub ambient NIX_CONFIG in host Nix version probe - #1217
Merged
Merged
Conversation
A malformed ambient NIX_CONFIG on a self-hosted runner's service environment makes `nix --version` fail with a config parse error before printing the version, so the detect log captures the error instead of the version the diagnostic aims to record. This test drives the "Detect host Nix" step against a stub `nix` that rejects a malformed NIX_CONFIG, and asserts the log shows the version, not the parse error. Refs: #1216
The direnv-mode "Detect host Nix" step captured `nix --version 2>&1` (#1198) with the runner's ambient NIX_CONFIG in effect. On a self-hosted runner whose service environment carries a malformed NIX_CONFIG (exo-fleet's meatgrinder), nix rejects the config before printing the version, so the detect log recorded a config parse error instead of the version. Run the probe with `env -u NIX_CONFIG` so the captured string is the version even when the runner environment is broken, keeping the `2>&1` fold as a fallback for other failure shapes. Refs: #1216
This was referenced Jul 20, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1216 (found during rc5 consumer-lane validation): the direnv-mode "Detect host Nix" step captured
nix --version 2>&1(#1198) with the runner's ambientNIX_CONFIGin effect. On a self-hosted runner whose service env carries a malformedNIX_CONFIG(exo-fleet's meatgrinder, live evidence in exo-pet/exo-fleet#230 run 29738048251), nix errors on the config before printing the version, so the log records a parse error instead of the version the probe exists to capture.The probe now runs
env -u NIX_CONFIG nix --version 2>&1(env -uoverNIX_CONFIG=to stay shellcheck-clean, SC1007), keeping the stderr fold for other failure shapes. Scope: the probe line only — has-nix detection, the gated install, and "Configure host Nix" are untouched. Single action copy (scaffold template; no devkit-own twin, not manifest-synced — verified).TDD
238cf1a6: stub nix errors on malformed ambient NIX_CONFIG before--version— reproduces the exact meatgrinder log symptom.fe97f457: 24/24 intests/test_setup_toolchain_env.py.Requires an rc6 cut after merge; live proof = exo-fleet lane re-bump on meatgrinder.
Refs: #1216