Skip to content

fix(cli): make every run-mode flag this-process-only#839

Merged
Chemaclass merged 1 commit into
mainfrom
fix/837-flag-export-audit
Jul 19, 2026
Merged

fix(cli): make every run-mode flag this-process-only#839
Chemaclass merged 1 commit into
mainfrom
fix/837-flag-export-audit

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 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

  • Convert every remaining 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 exists
  • Extend the leak-probe acceptance test to fifteen flag/probe pairs, kept 1:1 so export -n also clears allexport-.env attributes
  • Env-var configuration (BASHUNIT_*=… bashunit) unchanged

https://claude.ai/code/session_01JSeB8UzLCpqst55hAK6dED

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
@Chemaclass Chemaclass added the bug Something isn't working label Jul 19, 2026
@Chemaclass Chemaclass self-assigned this Jul 19, 2026
@Chemaclass
Chemaclass merged commit 25468a2 into main Jul 19, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the fix/837-flag-export-audit branch July 19, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant