Skip to content

[miniflare] Honor start_after when listing R2 objects in Local Explorer - #17119

Merged
petebacondarwin merged 2 commits into
cloudflare:mainfrom
tw4:fix/local-explorer-r2-start-after
Nov 23, 2026
Merged

petebacondarwin merged 2 commits into
cloudflare:mainfrom
tw4:fix/local-explorer-r2-start-after

Conversation

@tw4

@tw4 tw4 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #17039.

Listing R2 objects through the Local Explorer ignored start_after, so resuming a listing from a saved key (e.g. cf r2 objects list --local --start-after first) returned that key again.

The param wasn't declared on the local-only /r2/buckets/{bucket_name}/objects path in scripts/openapi-filter-config.ts, so it got stripped during query validation and listR2Objects never saw it. I added it to the filter config, regenerated openapi.local.json and the generated types with generate:api, and now pass it to the R2 simulator as startAfter. The simulator already handles it together with cursor, using whichever key sorts later.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: local behaviour now matches the existing R2 list objects API docs.

Devin Review

The Local Explorer R2 list objects endpoint dropped the start_after query
parameter, so resuming a listing from a saved key returned that key again.
Declare the parameter in the OpenAPI filter config, regenerate the
Local Explorer types, and forward it to the R2 simulator.

Fixes cloudflare#17039
@tw4
tw4 requested a review from workers-devprod as a code owner November 22, 2026 06:58
@changeset-bot

changeset-bot Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 44e1c69

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
miniflare Patch
@cloudflare/deploy-helpers Patch
@cloudflare/dev-helpers Patch
@cloudflare/pages-shared Patch
@cloudflare/remote-bindings Patch
@cloudflare/runtime-types Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-plugin Patch
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

Hi @tw4. Thanks for taking the time to contribute to Workers SDK.

This PR has been automatically closed because you are not currently a registered (vouched) collaborator for this repository.

AI tools now let our team generate proposed code changes quickly. Reviewing changes, checking that they solve the right problem, and maintaining code quality over time still take substantial care and effort. We therefore limit PRs to registered collaborators so we can focus that effort where it is most useful.

For the majority of external contributors, the most effective way to help is through issues: describing a problem or use case, providing a minimal reproduction, investigating its cause, or helping us verify a fix. Those contributions help us understand what needs to change and are very welcome.

We will take an initial look at this PR and decide whether it is something we want to invest time in reviewing and maintaining. We may reopen it if we decide to proceed, but we cannot guarantee that it will be reopened or receive a full review.

@github-actions github-actions Bot closed this Nov 22, 2026
@github-project-automation github-project-automation Bot moved this from Untriaged to Done in workers-sdk Nov 22, 2026
@workers-devprod
workers-devprod requested review from a team and petebacondarwin and removed request for a team November 22, 2026 06:59
@workers-devprod

workers-devprod commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

devin-ai-integration[bot]

This comment was marked as resolved.

The R2 simulator picked the later of cursor and startAfter with a UTF-16
string comparison, while the list queries order keys by UTF-8 bytes. With
keys such as fullwidth letters followed by emoji, pagination kept
returning the same page.
@github-project-automation github-project-automation Bot moved this from Done to Untriaged in workers-sdk Nov 22, 2026
@clanky-the-clanker

clanky-the-clanker Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

This pull request's reviews are posted as pull request reviews: see the review of 44e1c69b.

@pkg-pr-new

pkg-pr-new Bot commented Nov 22, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@17119

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@17119

@cloudflare/codemods

npm i https://pkg.pr.new/@cloudflare/codemods@17119

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@17119

@cloudflare/containers-shared

npm i https://pkg.pr.new/@cloudflare/containers-shared@17119

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@17119

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@17119

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@17119

miniflare

npm i https://pkg.pr.new/miniflare@17119

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@17119

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@17119

@cloudflare/runtime-types

npm i https://pkg.pr.new/@cloudflare/runtime-types@17119

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@17119

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@17119

@cloudflare/vitest-plugin

npm i https://pkg.pr.new/@cloudflare/vitest-plugin@17119

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@17119

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@17119

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@17119

wrangler

npm i https://pkg.pr.new/wrangler@17119

commit: 44e1c69

@petebacondarwin

Copy link
Copy Markdown
Contributor

clanker review

@clanky-the-clanker clanky-the-clanker Bot 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.

✅ Approved — No issues found. The start_after fix and the UTF-8 key comparison are correct, small and tested.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🔒 Security: ✅ LGTM

No issues found.


📖 AGENTS.md: ✅ LGTM

No issues found.


📋 Code Quality: ✅ LGTM

No issues found.


⚡ Performance: ✅ LGTM

No issues found.


📝 Documentation: ✅ LGTM

No issues found.


Reviewed commit: 44e1c69b

@workers-devprod workers-devprod 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.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Nov 23, 2026
@petebacondarwin
petebacondarwin merged commit 086706d into cloudflare:main Nov 23, 2026
88 of 89 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

fix(r2): local object listing ignores --start-after

3 participants