Repository navigation
fix(output): enforce flat list structure by disallowing nested details - #1817
Open
SHUBHANSHU602 wants to merge 1 commit into
Open
SHUBHANSHU602 wants to merge 1 commit into
SHUBHANSHU602 wants to merge 1 commit into
Conversation
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.
What kind of change does this PR introduce?
Bug fix in the machine-readable output schema with regression tests.
Issue & Discussion References
Related to #1796 and #1797.
This PR addresses a distinct validation issue in the list-specific output definition. It does not attempt to resolve public-root schema masking.
Problem
The machine-readable output specification requires list output to have a flat structure, with
detailsappearing only at the root.However, the current list definition references the recursive
outputUnitArray, allowing individual list output units to contain nesteddetails.Consequently, both empty and non-empty nested details are incorrectly accepted when validating against the list definition.
Root Cause
The list and hierarchical formats share the same recursive output-unit definition without imposing format-specific nesting constraints.
Proposed Solution
listOutputUnitdefinition that references the existingoutputUnit.detailsproperty within list entries.This approach avoids duplicating the shared output-unit schema.
Testing and Verification
Before the fix:
After the fix:
git diff --checkpassed.Does this PR introduce a breaking change?
Previously accepted nested details are now rejected when validating against the list-specific definition, aligning validation with the documented flat-list requirement.
Hierarchical output validation and public-root branch selection remain unchanged.
Opening this as a draft to discuss the approach and coordinate with the related changes in #1797.