fix: propagate Docker policy to file tools - #65367
Open
0112358DEUS wants to merge 1 commit into
Open
Conversation
Contributor
|
Thanks for tracing the file-first environment path. The file-tools change matches the existing terminal creation path, but the same policy-propagation bug remains in a sibling lazy factory. Problems
Suggested changes
Automated hermes-sweeper review. |
1 task
19 tasks
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
Propagate Docker policy fields from
terminal_tool._get_env_config()through the file-tool environment creation path.When a file tool created the Docker environment first,
tools/file_tools.pyomitted policy fields thatterminal_tool._create_environment()consumes. The consumer therefore fell back to its defaults, silently ignoring explicit configuration such asdocker_persist_across_processes: false.This forwards:
docker_env(default{})docker_extra_args(default[])docker_persist_across_processes(defaulttrue)docker_orphan_reaper(defaulttrue)The defaults match the terminal-tool path exactly, and
.get()preserves explicitfalseand empty collection values.Tests
Added deterministic propagation/default tests, including the original
docker_persist_across_processes=Falsefailure mode.CI-parity per-file runner:
Additional checks:
python3 -m py_compile tools/file_tools.py tests/tools/test_file_tools_container_config.pygit diff --checkNo Docker daemon is required for these tests.