Fix l1-proxy-index conformance test - #1008
Draft
iwahbe wants to merge 2 commits into
Draft
Conversation
The previous codegen failed in four ways when generating the proxy-index
program:
* `Output.CreateSecret({"key": true})` emitted a bare collection
initializer that is only legal as a property assignment, not as a
function argument. Wrap inline object literals in an anonymous record
so the call site stays self-typed.
* Auto-generated config classes used the wire-format property name
directly, leading to a mismatch with the PascalCased traversal codegen.
Emit the C# property in PascalCase and tag it with
`[JsonPropertyName(...)]` so JSON deserialization continues to match
the on-wire key.
* `config.RequireObject<dynamic>(...)` returns a `JsonElement` boxed as
`dynamic`, after which dynamic dispatch (including `Output.CreateSecret`
and lambda Apply) fails. Bind config `any` to `JsonElement` directly
and route attribute traversal through `.GetProperty(...)` for any
variable derived from one of these config bindings.
* Map literals reaching `Output.CreateSecret(...)` lost their key type,
so make traversal pick indexer access for true `MapType` sources.
iwahbe
force-pushed
the
fix-l1-proxy-index
branch
from
August 14, 2026 17:50
558ab82 to
89817e9
Compare
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
l1-proxy-indexconformance test by addressing four codegen issues that prevented the generated dotnet program from compiling and producing the expected outputs.Output.CreateSecret(...)in an anonymous record so they carry their own type at the call site.[JsonPropertyName(...)]to match traversal codegen while preserving JSON wire compatibility.any/dynamic toSystem.Text.Json.JsonElementand emit.GetProperty("name")traversal for any variable transitively derived from such a config binding.MapTypetraversal sources, emit indexer (["key"]) access.Test plan
make test_conformance(including the now-fixedTestLanguage/l1-proxy-index)make test_codegenmake lint_language_host