Skip to content

fix: align multipart listing response with S3 - #1384

Merged
TylerHillery merged 1 commit into
masterfrom
tyler/fix/s3-multipart-response-shape
Sep 10, 2026
Merged

fix: align multipart listing response with S3#1384
TylerHillery merged 1 commit into
masterfrom
tyler/fix/s3-multipart-response-shape

Conversation

@TylerHillery

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Small follow-up to #1346 that corrects the ListMultipartUploads response shape to match the S3 API by returning Bucket instead of Name and removing KeyCount.

@TylerHillery
TylerHillery requested a review from a team as a code owner September 10, 2026 17:39
Copilot AI lite review requested due to automatic review settings September 10, 2026 17:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are small, match the stated S3-compatibility goal, and include direct test coverage verifying the updated response shape.

Pull request overview

This PR is a compatibility fix to make the ListMultipartUploads response produced by the S3 protocol handler match the AWS S3 API shape more closely, following up on earlier listing changes from #1346.

Changes:

  • Renamed ListMultipartUploadsResult.Name to ListMultipartUploadsResult.Bucket.
  • Removed ListMultipartUploadsResult.KeyCount from the multipart listing response.
  • Updated unit tests to assert the new response shape (and the absence of the old fields).
File summaries
File Description
src/storage/protocols/s3/s3-handler.ts Adjusts the multipart listing response payload to use Bucket and omit KeyCount to align with S3.
src/storage/protocols/s3/s3-handler.test.ts Adds assertions validating Bucket is present and Name/KeyCount are not returned.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — straightforward fix aligning the ListMultipartUploads response shape with the real S3 API.

Reviewed the listMultipartUploads response construction in s3-handler.ts: confirmed NameBucket rename and removal of the non-existent KeyCount field match AWS's ListMultipartUploadsResult schema (KeyCount is only part of ListObjectsV2, not multipart listing). Checked that the accompanying test assertions correctly verify Bucket is set and Name/KeyCount are absent.

Extended reasoning...

Overview

The PR touches a single response-shaping code path in src/storage/protocols/s3/s3-handler.ts: the object literal returned by listMultipartUploads. It renames Name to Bucket and deletes an erroneous KeyCount field, with a matching test update in s3-handler.test.ts.

Security risks

None. This is purely a response schema correction for an S3-compatibility endpoint — no auth, crypto, or data-exposure logic is touched. The field values themselves (bucket name, counts) were already being computed correctly; only the field naming/presence changes.

Level of scrutiny

Low. This is a small, mechanical, self-contained diff with clear intent (align with the real AWS S3 XML schema for ListMultipartUploadsResult), and it's accompanied by targeted test assertions that lock in the new behavior. No CODEOWNERS file was found restricting this path, and the bug hunter reported zero findings.

Other factors

The change is easily verifiable against public AWS API documentation (ListMultipartUploadsResult uses Bucket, not Name, and has no KeyCount field — that's specific to ListObjectsV2). Test coverage was updated in the same commit to assert the new field and the absence of the removed ones, which is appropriate for a fix of this size.

@TylerHillery
TylerHillery merged commit a13e574 into master Sep 10, 2026
27 checks passed
@TylerHillery
TylerHillery deleted the tyler/fix/s3-multipart-response-shape branch September 10, 2026 17:45
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 34509609861

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage remained the same at 82.684%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 14076
Covered Lines: 12097
Line Coverage: 85.94%
Relevant Branches: 8591
Covered Branches: 6645
Branch Coverage: 77.35%
Branches in Coverage %: Yes
Coverage Strength: 678.8 hits per line

💛 - Coveralls

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.

4 participants