Merged
Conversation
This was
linked to
issues
Dec 19, 2025
Closed
There was a problem hiding this comment.
Pull request overview
This PR introduces version 0.9.3 of envstack with significant new features, particularly an interactive shell mode (envshell), alongside improvements to encryption handling, environment variable management, and documentation. The changes also include renaming test.env to project.env for better clarity about its purpose.
- Added interactive shell feature with platform-specific shell detection and configuration
- Improved encryption library handling to gracefully manage missing cryptography dependencies
- Enhanced environment variable management with platform-specific prompt variables (PS1/PROMPT)
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/envstack/envshell.py | New module implementing interactive shell wrapper with platform-specific shell detection |
| bin/envshell | New executable entry point for the envshell command |
| bin/envshell.bat | Windows batch wrapper for envshell |
| lib/envstack/cli.py | Added --shell flag, envshell() function, and updated argument parsing |
| setup.py | Version bump to 0.9.3 and added envshell console script entry point |
| lib/envstack/init.py | Version bump to 0.9.3 |
| lib/envstack/encrypt.py | Improved handling of missing Fernet library and removed Base64Node wrapper from key generation |
| lib/envstack/env.py | Changed Source.data to use defaultdict and added error handling to write method |
| lib/envstack/util.py | Removed required keys validation for more flexible YAML structure |
| lib/envstack/node.py | Added defensive str() conversion to prevent errors on non-string node values |
| lib/envstack/wrapper.py | Updated comment to mark communicate() code as dead code for reference |
| env/default.env | Added PS1 prompt for Unix systems and PROMPT for Windows, updated Windows ROOT path |
| env/project.env | New template file replacing test.env with updated ENVPATH using STACK variable |
| env/test.env | Removed (replaced by project.env) |
| tests/test_node.py | Updated test to reference project.env instead of test.env |
| tests/test_env.py | Updated tests to skip PS1 in comparisons and renamed test.env references to project.env |
| tests/test_cmds.py | Updated all tests for new PS1 variable, Windows ROOT path, and project.env naming |
| README.md | Clarified ENV vs STACK terminology and fixed encryption/decryption documentation |
Comments suppressed due to low confidence (1)
lib/envstack/wrapper.py:135
- The comment indicates this is dead code but it's still present in the codebase. If this code is truly unreachable after the exception handling above, it should be removed rather than kept with a comment. Dead code adds confusion and maintenance burden. If it's needed for reference, consider moving it to documentation or commit history instead.
stdout, stderr = process.communicate() # dead code, kept for reference
while stdout and stderr:
self.log.info(stdout)
self.log.error(stderr)
exitcode = process.poll()
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request introduces several new features and improvements to the
envstackproject, with a focus on adding an interactive shell mode, enhancing environment variable handling, updating encryption logic, and improving documentation and test coverage. The most significant changes are grouped below.New Interactive Shell Feature:
envshellcommand and--shelloption toenvstack, allowing users to launch an interactive shell with the environment stack loaded. This includes a newEnvshellWrapperclass that detects and configures the shell appropriately for different platforms (lib/envstack/envshell.py,lib/envstack/cli.py,setup.py). [1] [2] [3] [4] [5]Environment Variable and Configuration Updates:
PS1for Unix,PROMPTfor Windows) toenv/default.envand updated corresponding test expectations. Also updated the WindowsROOTpath. [1] [2] [3] [4] [5] [6] [7]env/project.envfile as a template for project-specific environment settings.env/test.env, to reduce redundancy or simplify environment configuration.Encryption and Security Improvements:
Fernet = Noneand handling related logic more gracefully inlib/envstack/encrypt.py. Also, changed key generation to avoid using theBase64Nodewrapper and improved error logging. [1] [2] [3] [4] [5]CLI and Core Logic Enhancements:
Sourceclass inlib/envstack/env.pyto use adefaultdict(dict)forself.data, and improved error handling when writing environment files. [1] [2] [3]Documentation Updates:
README.mdto clarify the difference betweenENV(tier) andSTACK(namespace), and improved instructions for encrypting and decrypting environment files. [1] [2]Version Bump:
0.9.2to0.9.3in bothlib/envstack/__init__.pyandsetup.py. [1] [2]