Skip to content

Fix cross-branch pollution bug in SchemaConverter recursion detection#841

Merged
adwsingh merged 1 commit intosmithy-lang:mainfrom
rationull:schemaconverter-recursive-fix
Aug 8, 2025
Merged

Fix cross-branch pollution bug in SchemaConverter recursion detection#841
adwsingh merged 1 commit intosmithy-lang:mainfrom
rationull:schemaconverter-recursive-fix

Conversation

@rationull
Copy link
Contributor

Issue #, if available:
I did not file an issue.

Description of changes:
SchemaConverter would incorrectly identify member schemas as recursive when the shape graph contains multiple branches hitting the same target shape, downstream of the member shape.

This change "pops" the "top of stack" shape on the way out of isRecursive(), avoiding this cross-branch pollution.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

SchemaConverter would incorrectly identify member schemas as recursive
when the shape graph contains multiple branches hitting the same target
shape, downstream of the member shape.

This change "pops" the "top of stack" shape on the way out of
isRecursive(), avoiding this cross-branch pollution.
@adwsingh adwsingh merged commit dec1677 into smithy-lang:main Aug 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants