fix(cli): make every run-mode flag this-process-only#839
Merged
Conversation
Completes the audit started in #835: all ~40 remaining `export BASHUNIT_*` sites in the flag-parse loops (and the entrypoint's early scan) now assign without the export attribute and strip an inherited one with `export -n`. Every reader — runner, reporters, parallel workers — lives in the main shell or its subshells, which inherit unexported variables; exec'd children (nested bashunit runs) must not silently inherit the parent's output mode, strictness, parallelism, timeouts, seeds or report paths. Verified no exec'd consumer exists for any converted flag. The leak-probe acceptance test now covers fifteen flag/probe pairs; each probed name is paired with the matching parent flag because the branch's `export -n` is also what clears an export attribute stamped by an allexport .env load. Env-var configuration is unchanged. Closes #837 Claude-Session: https://claude.ai/code/session_01JSeB8UzLCpqst55hAK6dED
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.
🤔 Background
Related #837
#835 fixed five exported flags leaking into nested bashunit runs; the flag-parse loops still exported ~40 more, silently reconfiguring any bashunit invocation spawned by a script under test.
💡 Changes
export BASHUNIT_*flag site (main parse loops + entrypoint early scan) to assign +export -n; audited each flag's readers — all in-process, no exec'd consumer existsexport -nalso clears allexport-.envattributesBASHUNIT_*=… bashunit) unchangedhttps://claude.ai/code/session_01JSeB8UzLCpqst55hAK6dED