Skip to content

fix: Protocol tests & implementation for FP numbers in query & headers are wrong - #1142

Merged
jbelkins merged 3 commits into
mainfrom
jbe/fix_header_query_special_numbers
Aug 12, 2026
Merged

fix: Protocol tests & implementation for FP numbers in query & headers are wrong#1142
jbelkins merged 3 commits into
mainfrom
jbe/fix_header_query_special_numbers

Conversation

@jbelkins

@jbelkins jbelkins commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Description of changes

The existing request protocol tests replace the values Infinity, -Infinity, and NaN (the Smithy convention for these values) with the values inf, -inf, and nan (which are how Swift prints them). The Swift SDK implementation passes protocol tests because both the tests and the implementation are wrong in the same way.

To address:

  • The code which replaces the Smithy values for special FP values is removed from the test verification code; this causes 24 protocol tests to fail since the tests now expect the correct values but the implementation isn't compliant.
  • The implementation for headers, query items, and query item lists is fixed so it sends the correct representation for special floating point values. This corrects the protocol tests that started to fail above.
  • Tests are added for query item lists since that case isn't covered in protocol tests.

Also: a little cleanup of Kotlin code warnings.

Scope

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jbelkins
jbelkins marked this pull request as ready for review August 10, 2026 21:34
@jbelkins
jbelkins requested a review from a team as a code owner August 10, 2026 21:34
@jbelkins
jbelkins requested a review from sichanyoo August 10, 2026 21:34
@jbelkins
jbelkins merged commit 7670443 into main Aug 12, 2026
45 checks passed
@jbelkins
jbelkins deleted the jbe/fix_header_query_special_numbers branch August 12, 2026 14:26
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