Repository navigation
fix(deployment): quote ConfigMap values with %q, as the go agents already do - #79
Merged
Merged
Conversation
…eady do
A rendered ConfigMap value is an arbitrary string — a JSON document, a
comma-joined list, a sentence. This template wrapped it in hand-written
quotes, so the first " inside a value closed the string early and the rest
of it became YAML. The render then refused its own output:
configmap.yaml: yaml: line 6: did not find expected key
and deleted the tree it had just written, leaving nothing to read, which is
why it took a template comparison rather than a log to find.
service-go and service-go-grpc already render `{{ printf "%q" $value }}`;
only this agent and service-nextjs did not, so the same defect is open there
and is being fixed separately.
The secret template is deliberately untouched: a Secret's `data` holds
base64, which contains nothing that breaks naive quoting, and the go agents
quote it the same way.
The test executes the template directly rather than through the agent's
deployment path, because the fault is the template's quoting and nothing
above it — a test needing core's deployment wrapper to reach this line would
not say where the fault is. It fails on the old template with the same
"not parseable YAML" symptom seen in production, and the assertion is that
the document parses AND each value survives byte for byte.
Found rendering platform-obin's staging deployment for the Lane 3 Catalogue;
the module that hit it is a python-fastapi service whose configuration
carries a JSON value.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
antoinetoussaint-byte
added a commit
to codefly-dev/service-nextjs
that referenced
this pull request
Oct 8, 2026
…eady do (#164) Same defect as codefly-dev/service-python-fastapi#79, found by comparing all four agents' templates. A rendered ConfigMap value is an arbitrary string — a JSON document, a comma-joined list, a sentence. This template wrapped it in hand-written quotes, so the first " inside a value closed the string early and the rest became YAML. The render then refuses its own output configmap.yaml: yaml: line 6: did not find expected key and deletes the tree it just wrote, leaving nothing to read. service-go and service-go-grpc already render `{{ printf "%q" $value }}`. This agent and service-python-fastapi did not, which is why a frontend whose configuration carries a JSON value cannot render. The test executes the template directly, because the fault is its quoting and nothing above it. It fails on the old template with the production symptom and passes on the new one; it asserts the document parses AND that every value survives byte for byte. Co-authored-by: Antoine Toussaint <312536060+antoinetoussaint-byte@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
The defect
A rendered ConfigMap value is an arbitrary string — a JSON document, a comma-joined list, a sentence. This template wrapped it in hand-written quotes:
so the first
"inside a value closed the string early and the remainder became YAML. The render then refused its own output:…and deleted the tree it had just written, leaving nothing to read. That is why this took a template comparison to find rather than a log: the renderer destroys the evidence of its own failure.
Why only here
service-goandservice-go-grpcalready render{{ printf "%q" $value }}. Only this agent andservice-nextjsdid not — the same defect is open there and is being fixed separately, so the frontend has it too.The secret template is deliberately untouched: a Secret's
dataholds base64, which contains nothing that breaks naive quoting, and the go agents quote it the same way.The test
It executes the template directly rather than through the agent's deployment path, because the fault is the template's quoting and nothing above it — a test that needed core's deployment wrapper to reach this line would not say where the fault is.
Verified by experiment, not by reading: on the old template it fails with the same
not parseable YAMLsymptom seen in production; on the new one it passes. It asserts the document parses and that each value survives byte for byte, over a value set covering a JSON document,key: value, a trailing backslash, an embedded newline, an embedded quote, a#, and the empty string.Full suite green.
Where it was found
Rendering platform-obin's staging deployment for the Lane 3 Catalogue. The module that hit it is a python-fastapi service whose configuration carries a JSON value — and core v0.15.0's authority subject fields make such values more common, which is why it surfaced now.
🤖 Generated with Claude Code