Repository navigation
fix: validate explicitly selected partial subtrees - #1665
Open
stareezy-1 wants to merge 1 commit into
Open
stareezy-1 wants to merge 1 commit into
stareezy-1 wants to merge 1 commit into
Conversation
Co-Authored-By: OpenAI Codex (GPT-6) <[email protected]>
stareezy-1
marked this pull request as ready for review
October 9, 2026 08:19
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.
Fixes Or Enhances
Fixes #1293: selecting a nested struct through
StructPartialcurrently records the parent name but continues filtering every child by an exact name, so the selected struct's fields are never validated.Track complete selections separately from traversal prefixes. A complete selection validates its descendants while sibling and explicitly selected leaf filtering remain intact. Existing
diveand other validation tags remain authoritative. No wildcard, range, or new selector syntax is added.Tests cover nested pointers, overlapping selections, slice/map elements, empty selections and validator-pool reuse.
go test -race ./...and the CI-pinned golangci-lint v2.13.1 pass. The new regression fails on upstream before the fix.Draft for review of the nested-selection behavior change.
AI disclosure required by CONTRIBUTING.md: Codex (GPT-6) assisted with this change.