Force activate_aggressive off for the mutated-hook checks only - #3018
Merged
Conversation
Reported on queenbee#1513. With MISE_ACTIVATE_AGGRESSIVE on, `mise exec` prepends the resolved installs to the very front of PATH -- ahead of the decoy -- instead of inserting them before the retained shims entry. That repairs the mutated hook, so the negative control cannot demonstrate sensitivity and goes red: 26/28 for a developer with the setting on, against a correct production hook. A harness defect, not a hook defect. The real-hook scenarios keep whatever the developer has set. That is their actual session, and the hook does resolve correctly for them either way; it is only the mutation that needs the canonical ordering to mean anything. Forced to 0 rather than unset. activate_aggressive is a real mise setting, so a config file can turn it on with no variable in the environment at all -- `mise settings get activate_aggressive` reports it rather than "Unknown setting" -- and only an explicit 0 overrides that. Verified 28/28 with the variable set to 0, set to 1, absent, and set true via a config file; and the control still goes red against an unmutated hook under both settings, and against empty probe output.
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.
Follow-up to the negative control added in the previous PR. Reported on queenbee#1513. Test harness only — the production hook is untouched and was never affected.
The defect
With
MISE_ACTIVATE_AGGRESSIVEon,mise execprepends the resolved install dirs to the very front of PATH — ahead of the decoy — instead of inserting them before the retained shims entry. Measured:That repairs the mutated hook, so the negative control cannot demonstrate sensitivity and correctly goes red. A developer with the setting on sees 26/28 against a completely correct production hook — a false failure, which is the exact class of harness bug this whole line of work exists to remove.
Confirmed on merged master, both platforms:
AGGRESSIVE=1→ 26/28,AGGRESSIVE=0→ 28/28.The fix
Force
MISE_ACTIVATE_AGGRESSIVE=0for the mutated-hook invocations only.The real-hook scenarios keep whatever the developer has set. That is their actual session, and the hook genuinely resolves correctly for them either way — under aggressive activation the installs are prepended, which is if anything more robust. It is only the mutation that needs the canonical ordering in order to mean anything.
Forced to
0, not unset.activate_aggressiveis a real mise setting —mise settings get activate_aggressivereports it rather thanUnknown setting— so a config file can turn it on with no variable in the environment at all, and only an explicit0overrides that. Anenv -uwould have left that case broken.Verification
Both platforms, at this exact head; test file
sha256-identical across all five repos.shellcheckclean.=0, variable=1, variable absent, andactivate_aggressive = trueset via a config file (the case a bare unset would have missed). 28/28, launchpad 34/34.AGGRESSIVE=0andAGGRESSIVE=1; with the probe output forced empty it goes red too.AGGRESSIVE=1.