Repository navigation
fix: quote boolean and numeric env values in compose template - #267
Merged
Merged
Conversation
Docker's YAML parser coerces bare booleans and numbers in a service environment map (e.g. true becomes "True"), so the generated agent and infer CLI received the wrong values. Quote every boolean/numeric env value the way the ports already were, and add a regression test that parses the rendered compose and asserts all environment values are strings.
edenreich
reviewed
Jul 14, 2026
Co-authored-by: Eden Reich <[email protected]>
inference-gateway-releaser Bot
added a commit
that referenced
this pull request
Jul 14, 2026
## [0.48.0](v0.47.1...v0.48.0) (2026-07-14) ### ✨ Features * bump Go version to 1.26.4 ([#279](#279)) ([4945a28](4945a28)) * generate OTel-aligned telemetry configuration from extended spec.telemetry ([#281](#281)) ([47c5b3d](47c5b3d)) ### 🐛 Bug Fixes * quote boolean and numeric env values in compose template ([#267](#267)) ([6198824](6198824)) ### 📚 Documentation * add missing CLI flags to README generate/init flag tables ([#275](#275)) ([db0a842](db0a842)) * document spec.telemetry OpenTelemetry generation ([#277](#277)) ([bd75c08](bd75c08)), references [#259](#259) * fix project structure diagrams and universal files section ([#274](#274)) ([17bad1b](17bad1b)), closes [#272](#272) * mark Service Injection code examples as illustrative with template references ([#278](#278)) ([69b9806](69b9806)) * remove missing example ref, document all examples ([#273](#273)) ([4e30aff](4e30aff)), closes [#268](#268) * update Template System and Architecture section with accurate Context struct and file mapping ([#276](#276)) ([352d084](352d084))
Contributor
|
🎉 This PR is included in version 0.48.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
What
The generated
docker-compose.yamltemplate quoted someenvironmentvalues (ports, URLs) but left booleans and numbers bare:
A2A_ARTIFACTS_ENABLE: true,A2A_ARTIFACTS_SERVER_PORT: 8081,A2A_ARTIFACTS_RETENTION_MAX_ARTIFACTS: 10INFER_*toggles (...: true/...: false)This PR quotes every boolean/numeric env value so it renders as a string,
matching how the ports were already handled.
Why
Per Docker's own docs, values in a service
environmentmap that YAMLwould read as non-strings must be quoted:
Left bare, the YAML parser types them as bool/int and docker compose
coerces them (e.g.
truebecomes"True"), so the agent and the inferCLI receive the wrong value.
docker compose configsurfaces exactlythis class of issue.
Smoke test
docker/Bashwere not in the action's allowed tools, so the earlierrun could not execute
docker compose config. I reproduced that checklocally another way: rendered the template across every branch
combination (go agent, no-agent, artifacts, rust+redis,
rust+redis+artifacts), parsed each output with a YAML parser, and
asserted every
environmentvalue resolves to a string tag - the sameinvariant
docker compose configenforces. Before the fix, 16-19 valuesper file were typed
!!bool/!!int; after, all are!!str. The YAMLwas already structurally valid, so this was the only issue found.
Tests
TestDockerComposeTemplate_ArtifactsWiringto expect the quoted forms.TestDockerComposeTemplate_EnvironmentValuesAreStrings, which parses the rendered compose and fails if any env value is a bare bool/number, so this cannot silently regress.go test ./...,go vet ./..., andgo buildall pass.Note for maintainers
If you want the Claude Code / Infer orchestrators to self-validate
compose files in future runs,
docker(or a scopedBash(docker compose config:*)) would need to be added to their allowedtools. That config lives centrally in
inference-gateway/.github(
repos.yaml), not in this repo's thin caller workflows, so it is out ofscope here.