Skip to content

Fix argument escaping for direct argv backends - #76

Open
hartikainen wants to merge 3 commits into
google-deepmind:mainfrom
hartikainen:fix-argument-escaping
Open

Fix argument escaping for direct argv backends#76
hartikainen wants to merge 3 commits into
google-deepmind:mainfrom
hartikainen:fix-argument-escaping

Conversation

@hartikainen

@hartikainen hartikainen commented Aug 27, 2026

Copy link
Copy Markdown

Direct argv backends receive the POSIX shell quoting produced by ARG_ESCAPER as literal argument data. This one adds ARGV_ESCAPER for local Docker, Vertex, Kubernetes, and exec-form Docker ENTRYPOINT arguments while preserving ARG_ESCAPER for commands interpreted by a shell.

It also replaces subprocess.list2cmdline with POSIX quoting in the tmux path and serializes Docker ENTRYPOINT arguments through json.dumps. The tests cover JSON values across the direct-argv, shell, tmux, and ENTRYPOINT boundaries.

Fixes #75.

@hartikainen
hartikainen force-pushed the fix-argument-escaping branch from 06e7ec7 to 204385c Compare August 27, 2026 19:21
Arguments that require POSIX shell quoting reach Docker, Vertex, and
Kubernetes with literal quote characters because those backends pass the
serialized tokens directly as `argv`. This separates shell-fragment
serialization from direct-`argv` serialization, uses POSIX quoting for
`tmux`, and emits Docker `ENTRYPOINT` arguments through `json.dumps`.
@hartikainen
hartikainen force-pushed the fix-argument-escaping branch from 204385c to 430788e Compare August 27, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ARG_ESCAPER shell-quotes arguments for direct argv backends

1 participant