GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||
GeezerVison is showing github.com — cloudflare-export: R2 bucket enumeration fails open — a 500/malformed buckets response publishes r2Buckets: [] in a status:ok document, and pagination past 100 buckets is silently dropped · Issue #2574 · developing-today/code Closed Labels app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientqueue/queuedHas a queued queue tasksource/creatorFiled by the new-issue-creator jobstatus/needs-triageNot yet triaged; needs a first looktask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests Descriptioncloudflare-export: R2 bucket enumeration fails open — a 500/malformed buckets response publishes
|
| Scenario | Result |
|---|---|
Buckets endpoint returns HTTP 500 (result: null) while GraphQL storage data exists |
status: "ok" document with r2Buckets: [] (count 0) and r2-storage metric used: 5 GB — the document contradicts itself |
Buckets endpoint returns 200 with a malformed result (no .buckets) |
status: "ok", r2Buckets: [] |
Buckets endpoint returns 100 buckets with result_info: { total_count: 150, total_pages: 2 } |
status: "ok", r2Buckets lists exactly those 100 — the other 50 buckets are absent with no marker |
| Control: 200 with 2 buckets | r2Buckets: ["alpha", "beta"] — normal path works |
This exporter is deliberately fail-closed everywhere else in the same file: classifyR2/foldKv/firstSum throw unparseable on a missing groups field ("a missing/null groups field is shape drift, not zero operations"), and the r2-storage metric carries an explicit lowerBound: true marker when its group count saturates the query limit. The bucket enumeration is the one place that breaks that contract:
latest.json) cannot distinguish "enumeration failed" from "account has no buckets".lowerBound.result.buckets shape does not publish as an empty bucket list in a status: "ok" document: it either fails the run with the file's existing failure-document taxonomy, or the document explicitly marks the enumeration as failed/unknown — triage pins which.result_info page count) so accounts with more than 100 buckets are fully listed, or the document carries an explicit truncation marker analogous to r2-storage's lowerBound.cloudflare-quota-export.test.mjs covers: buckets-endpoint 500, malformed buckets body, and a multi-page bucket list; the existing tests stay green.Searched this run: cloudflare-export, r2Buckets, "r2 buckets enumeration" — no open or recently closed issue covers the buckets enumeration path. #2287 is the separate Workers-AI alerting ask; #1048 (the collector's origin issue) specified the storage total, not this enumeration's failure/pagination behaviour.
🤖 Agent note · filed
Fixed and opened PR #4902 — fix(cloudflare-export): fail closed and paginate R2 bucket enumeration (#2574).
This resumes task 5387's branch (queue/5387-2574-r2-bucket-enumeration, 7d7806e9) rather than restarting: the fix was already implemented there with tests, but no PR had ever been opened, so the work sat orphaned. I merged current main into the branch (clean), re-verified the tests, and opened the PR.
result.buckets, a full page with no pagination metadata, or a later-page failure now publishes r2Buckets: null + r2BucketsDetail (page + reason) instead of a silent [] or a truncated list; 401/403 still throws the existing token-scope error.result_info.total_pages is followed.node --test pm-stack/cloudflare-export/cloudflare-quota-export.test.mjs — 33 pass / 0 fail (seven new cloudflare-export: R2 bucket enumeration fails open — a 500/malformed buckets response publishes r2Buckets: [] in a status:ok document, and pagination past 100 buckets is silently dropped #2574 cases: 500, malformed body, multi-page, later-page failure, malformed later page, full-page-no-metadata, 401/403 contract).Merge pull request #4902 from developing-today/queue/5387-2574-r2-buc…
agent-note:v1
state: reviewed (coverage loop-back)
Coverage pass 2026-11-03, loop-back review: this issue was re-reviewed (drift / overlap / already-handled / stale / blockers / ordering) so every open issue in the four repos is reviewed and in the system. Verdict: still live; in the system as task 8121 (triage, queued, priority 50) in repo-health-code-pilot. Labels audited and synced. If it is already handled at current main, its triage closes it with evidence; if oversized, the triage files the split; blockers belong on this issue.
Found via: coverage loop-back 2026-11-03