Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #656 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 309 310 +1
Lines 39213 39286 +73
=========================================
+ Hits 39213 39286 +73
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
CaliLuke
force-pushed
the
codex/enum-value-equality
branch
from
October 11, 2026 18:07
613a777 to
d696afb
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.
CheckEnumForDuplicatescompares onlyyaml.Node.Value. Sequence and mapping nodes have empty scalar values, so distinct arrays and objects are reported as duplicates. The same comparison conflates values such as1and"1", while missing numerically equal values such as1and1.0.Compare JSON values recursively, preserving array order and ignoring object member order. Keep scalar types distinct, normalize numeric values exactly, and return the original nodes for each duplicate occurrence. Resolve YAML aliases while rejecting cyclic and non-JSON values from this comparison.
The regression tests cover arrays, objects, nested values, mixed scalar types, equivalent numeric forms, integers beyond floating-point precision, aliases, malformed nodes, and cyclic inputs. The original implementation fails the value regression matrix; the corrected implementation passes it.
Validation:
go test ./utils -count=1andgo test -race ./utils -count=1pass. Caller-level regression tests using the duplicate-enum rule pass for OpenAPI 3.1 and 3.2 documents in both JSON and YAML.The full suite passes except
json/FuzzAppendJSONString/seed#5on Go 1.27.2: its invalid-UTF-8 expectation differs from the standard JSON encoder. The same failure reproduces on unchanged v0.41.6; this patch does not modify the JSON writer.