fix(terminal): pass docker_extra_args through _terminal_env_map (#28863) - #29236
Closed
Jiahui-Gu wants to merge 1 commit into
Closed
fix(terminal): pass docker_extra_args through _terminal_env_map (#28863)#29236Jiahui-Gu wants to merge 1 commit into
Jiahui-Gu wants to merge 1 commit into
Conversation
…Research#28863) terminal.docker_extra_args from config.yaml was silently dropped because the gateway/run.py _terminal_env_map, cli.py env_mappings, and hermes_cli/config.py _config_to_env_sync bridges all omitted the key. terminal_tool already reads TERMINAL_DOCKER_EXTRA_ARGS and DockerEnvironment appends the parsed list to docker run args, so the documented hardening escape hatch (--read-only, --security-opt, custom --tmpfs) was a no-op without any warning. Adds docker_extra_args to all three bridges plus a regression-pin test mirroring the docker_run_as_host_user / docker_env guards. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Collaborator
Contributor
Author
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
Fixes #28863.
terminal.docker_extra_argsfromconfig.yamlwas silently dropped —terminal_tool._get_env_configandDockerEnvironmentboth consume the env var, but the three bridges that copy config-yaml keys into env vars (gateway/run.py::_terminal_env_map,cli.py::env_mappings,hermes_cli/config.py::_config_to_env_sync) were missing the entry. So users settingterminal.docker_extra_argsviaconfig.yamlorhermes config setsaw no effect.Fix
gateway/run.py: adddocker_extra_args → TERMINAL_DOCKER_EXTRA_ARGSto_terminal_env_mapcli.py: same mapping inenv_mappings(keeps cli ↔ gateway key sets in sync — otherwise the existing drift guard test fails)hermes_cli/config.py: same in_config_to_env_syncsohermes config set terminal.docker_extra_args ...writes to.envlike the sibling keysStatic verification: all three maps now contain
docker_extra_args; cli ↔ gateway key set diff is empty.Test plan
test_docker_extra_args_is_bridged_everywhereintests/tools/test_terminal_config_env_sync.py: mirrors the existingdocker_run_as_host_user/docker_envfour-point pins (cli / gateway / save / terminal_tool)🤖 Generated with Claude Code