Skip to content

fix: rename JSON test fixtures with .. in filename - #680

Open
priyankshah217 wants to merge 1 commit into
aws:mainfrom
priyankshah217:fix/test-fixture-double-dot-paths
Open

fix: rename JSON test fixtures with .. in filename#680
priyankshah217 wants to merge 1 commit into
aws:mainfrom
priyankshah217:fix/test-fixture-double-dot-paths

Conversation

@priyankshah217

Copy link
Copy Markdown

Summary

Three JSON-test-suite fixtures in transport/http/protocol/internal/json/testdata/test_parsing/ contain .. in their filenames:

  • n_number_-1.0..json
  • n_number_-2..json
  • n_structure_angle_bracket_..json

golang.org/x/mod/zip's CheckFilePath rejects any path component containing .., so module proxies that validate zip contents server-side — notably Athens — fail to fetch and cache this module:

time="2026-06-24T07:44:47Z" level=info msg="unzip /tmp/athens013433241/pkg/mod/cache/download/github.com/aws/smithy-go/@v/v1.27.2.zip: malformed file path \"transport/http/protocol/internal/json/testdata/test_parsing/n_number_-1.0..json\": double dot"

This blocks consumers of github.com/aws/smithy-go (and transitively aws-sdk-go-v2) in any environment whose GOPROXY runs Athens or another x/mod/zip-based validator.

Fix

Drop one of the trailing dots in each filename so the paths pass module zip validation:

  • n_number_-1.0..jsonn_number_-1.0.json
  • n_number_-2..jsonn_number_-2.json
  • n_structure_angle_bracket_..jsonn_structure_angle_bracket_.json

These fixtures originate from Nicolas Seriot's JSON Parsing Test Suite, where the ..json suffix encodes the malformed numeric/structural input under test. The file contents are unchanged; only the on-disk names change.

Test plan

  • Verified grep -r finds no Go code references to these fixture filenames — they are discovered by directory walk in the parsing tests, so renaming does not affect test selection.
  • Verified no other files in the repo have .. in any path component.
  • CI green on this PR.

🤖 Generated with Claude Code

The JSON-test-suite fixtures n_number_-1.0..json, n_number_-2..json,
and n_structure_angle_bracket_..json contain `..` in their filenames.
golang.org/x/mod/zip's CheckFilePath rejects any path component
containing `..`, which causes module proxies such as Athens to fail
when fetching and caching this module:

    unzip ...smithy-go/@v/v1.27.2.zip: malformed file path
    "transport/http/protocol/internal/json/testdata/test_parsing/n_number_-1.0..json":
    double dot

Drop one of the trailing dots in each filename so the paths pass
module zip validation. These fixtures are loaded by directory walk
in the parsing tests, so no code references need updating.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@priyankshah217
priyankshah217 requested review from a team as code owners June 25, 2026 05:55
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.

1 participant