Skip to content

fix: compare escaped query pairs in generated protocol tests - #383

Merged
jterapin merged 5 commits into
mainfrom
ruby-3.1-minimum-aws-part-2
Oct 22, 2026
Merged

jterapin merged 5 commits into
mainfrom
ruby-3.1-minimum-aws-part-2

Conversation

@jterapin

@jterapin jterapin commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

Generated protocol specs can fail on JRuby for correctly escaped Unicode query values. CGI.parse returns matching bytes with different encoding labels, causing the comparison to fail.

This clears the JRuby protocol-test blocker for moving AWS SDK for Ruby V4 to public development.

Fix

Compare escaped query pairs directly, without CGI decoding. Preserve duplicate counts, allow different ordering and additional pairs, and check required or forbidden parameter names.

Testing

Passed on MRI 3.4.9, JRuby 9.4.15, and JRuby 10.0.7:

  • Smithy generator specs: 517 examples per runtime.
  • Generated endpoint and protocol specs: 76 and 117 examples per runtime.
  • Earlier AWS V4 protocol validation using local Smithy: 1,106 examples per runtime, including RestJsonQueryStringEscaping.

Zero failures. Existing pending tests unchanged.

Repository-wide RuboCop: 374 files, zero offenses. git diff --check passed.

🤖 This PR description was drafted with AI assistance and reviewed by @jterapin. ✨

Compare serialized query pairs directly, preserving duplicate counts while allowing order differences and additional pairs. Check required and forbidden names in their escaped form. Cover Unicode, escaping, duplicates, ordering, and parameter presence with generated-assertion regression tests.
@jterapin
jterapin marked this pull request as ready for review October 22, 2026 15:23
@jterapin
jterapin requested review from a team as code owners October 22, 2026 15:23
@jterapin
jterapin merged commit 13bc7ee into main Oct 22, 2026
51 checks passed
@jterapin
jterapin deleted the ruby-3.1-minimum-aws-part-2 branch October 22, 2026 18:12
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.

3 participants