fix: env null passthrough and reject malformed variable references#21
Merged
Conversation
- environment mapping value of null now emits -e KEY (host passthrough)
instead of the literal -e KEY=None, matching Compose and the list form.
- a malformed braced reference like ${FOO!bar} now raises
UnsupportedComposeError instead of silently dropping the trailing text.
- add operator-arg escaping tests for all six operator forms.
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.
Two post-merge follow-ups from the #20 review.
1.
environmentnull value → host passthroughenvironment: {KEY: }(a null mapping value) is Compose shorthand for "passKEYthrough from the host", identical to the list form- KEY. compose2pod rendered it as-e KEY=None— the literal stringNonereached the container. Now emits-e KEY. Design:planning/changes/2026-07-09.01-env-null-passthrough.md.2. Reject malformed braced references
A braced reference whose text after the name is not a recognized operator (e.g.
${FOO!bar}) was silently encoded as${FOO-}, dropping!bar. It now raisesUnsupportedComposeError(surfaced by the CLI as exit 2), matching the project's "refuses the rest loudly rather than silently dropping behavior" principle. Also adds the previously-missing operator-arg escaping tests for all six operator forms. Design:planning/changes/2026-07-09.02-reject-malformed-variable-references.md.Testing
just test-cipasses at 100% line coverage (123 tests);just lint-ciclean.🤖 Generated with Claude Code