Make Base tests ignore inherited runtime env#496
Merged
Conversation
This was referenced Jun 7, 2026
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
Root Cause
When
basectl test basedelegates tobin/base-test, it exports the resolved Base project runtime environment. The Python setup dry-run tests and BATS fixtures then inherited variables such asBASE_PROJECT_VENV_DIR,BASE_BIN_DIR, and optional platform-tools state. That made tests inspect the real Base venv or assert against host-specific PATH shapes instead of their isolated fixtures.Validation
git diff --checkbash -n bin/base-testbash -n cli/bash/commands/basectl/subcommands/setup_common.shenv BASE_PROJECT=base BASE_PROJECT_ROOT=/Users/rameshhp/work/base BASE_PROJECT_MANIFEST=/Users/rameshhp/work/base/base_manifest.yaml BASE_PROJECT_VENV_DIR=/Users/rameshhp/.base.d/base/.venv PYTHONPATH=/Users/rameshhp/work/base/lib/python:/Users/rameshhp/work/base/cli/python /Users/rameshhp/.base.d/base/.venv/bin/python -m pytest cli/python/base_setup/tests/test_artifacts.py -qenv -u BASE_HOME -u BASE_BIN_DIR -u BASE_CLI_DIR -u BASE_BASH_DIR -u BASE_BASH_COMMANDS_DIR -u BASE_LIB_DIR -u BASE_BASH_LIB_DIR -u BASE_SHELL_DIR -u BASE_OS -u BASE_HOST -u BASE_SHELL -u BASE_PLATFORM_TOOLS_HOME -u BASE_PLATFORM_TOOLS_BIN_DIR -u BASE_PROFILE_VERSION -u BASE_ENABLE_BASH_DEFAULTS -u BASE_ENABLE_ZSH_DEFAULTS -u BASE_DEBUG -u BASE_BASH_COMMAND_NAME -u BASE_BASH_COMMAND_DIR -u BASE_BASH_COMMAND_SCRIPT -u BASE_BASH_BOOTSTRAP_SOURCE -u BASE_PROJECT -u BASE_PROJECT_ROOT -u BASE_PROJECT_MANIFEST -u BASE_PROJECT_VENV_DIR -u VIRTUAL_ENV bats cli/bash/commands/basectl/tests/check.bats cli/bash/commands/basectl/tests/runtime-shell.bats cli/bash/commands/basectl/tests/setup.bats cli/bash/commands/basectl/tests/update-profile.bats/Users/rameshhp/work/base/bin/basectl test baseCloses #493