Repository navigation
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
I traced the new scalar gate against current doParseField semantics and I think the type-level check is a little too broad. |
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
The external report was independently reproduced: RED expected nested Rule: scalar-capable structs use the parser only when that field has its own key/default; keyless prefixed pointers recurse. Focused/full |
Fixes #440
Problem
With
UseFieldNameByDefault, scalar structs such asurl.URLwere recursively parsed a second time after the tagged value had already been decoded. This letHOSTandPATHoverwrite URL internals, and madeRequiredIfNoDefdemand exported implementation fields.Fix
Avoid recursive parsing when the field type has already been handled by a scalar parser.
RED evidence
url.URLbecamehttp://evil/usr/binbecauseHOSTandPATHoverwroteHostandPath.RequiredIfNoDefdemanded internalurl.URLfields such asSCHEME,OPAQUE, andHOST.Verification
go test ./... -count=1go test -race -shuffle=on -count=1 ./...go build ./...go vet ./...Scope
Two files: parser logic and regression tests.