refactor: make TaskEnvs::resolve accept env iterator parameter#28
Merged
Brooooooklyn merged 2 commits intomainfrom Nov 12, 2025
Merged
Conversation
Change TaskEnvs::resolve to accept environment variables as an iterator parameter instead of reading from std::env::vars_os() directly. This makes tests cleaner and more isolated. Changes: - Update resolve_envs_with_patterns to accept env_vars iterator - Update TaskEnvs::resolve to accept current_envs iterator parameter - Add OsString import from std::ffi - Update production call sites to pass std::env::vars_os().collect() - Refactor all tests to use clean mock environment vectors - Remove all unsafe std::env::set_var/remove_var calls from tests Benefits: - Tests are isolated and don't modify global process environment - No unsafe code needed in tests - Tests can run safely in parallel - More functional and easier to test 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
fengmk2
approved these changes
Nov 12, 2025
Brooooooklyn
approved these changes
Nov 12, 2025
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.

refactor: make TaskEnvs::resolve accept env iterator parameter
Change TaskEnvs::resolve to accept environment variables as an iterator
parameter instead of reading from std::env::vars_os() directly. This makes
tests cleaner and more isolated.
Changes:
Benefits:
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com
remove unnecessary code