Skip to content

chore: use rate limit API directly instead of DO#886

Open
o-az wants to merge 4 commits intomainfrom
o-az/rate-limit-binding
Open

chore: use rate limit API directly instead of DO#886
o-az wants to merge 4 commits intomainfrom
o-az/rate-limit-binding

Conversation

@o-az
Copy link
Copy Markdown
Member

@o-az o-az commented Apr 28, 2026

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

Bundle Size Report

Metric Size Δ Change
Total 4.2 MB -1.4 KB (-0.0%)
Gzip 1.2 MB -442.0 B (-0.0%)
Brotli 1.1 MB -346.0 B (-0.0%)
Chunk changes (>1KB)
Chunk Change
assets/export-rate-limit.js (removed) -177.3 KB
assets/router.js +1.3 KB
assets/manifest.js (new) +173.8 KB

Compared against main branch (baseline from 4/27/2026, 4:02:54 PM)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

Cloudflare Deployments

App Environment Status Preview
explorer devnet [X] Failed -
explorer mainnet [X] Failed -
explorer testnet [X] Failed -
fee-payer devnet [>>] Skipped No changes
fee-payer moderato [>>] Skipped No changes
fee-payer privy [>>] Skipped No changes
og - [>>] Skipped No changes
perf - [>>] Skipped No changes
tokenlist - [>>] Skipped No changes

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e783038de

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}),
])
const result = await consumeRateLimit({
limiter: env.EXPLORER_EXPORT_RATE_LIMIT,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Update binding types for EXPLORER_EXPORT_RATE_LIMIT

This call now passes env.EXPLORER_EXPORT_RATE_LIMIT into a RateLimit parameter, but the committed generated bindings still type that env var as a durable object namespace, so pnpm --filter explorer check:types fails with TS2741 (limit is missing). That blocks the required type-check/precommit path until worker types are regenerated (or the binding type is otherwise updated) in the same change.

Useful? React with 👍 / 👎.

"new_sqlite_classes": ["ExplorerExportRateLimit"]
"name": "EXPLORER_EXPORT_RATE_LIMIT",
"namespace_id": "421701",
"simple": { "limit": 20, "period": 60 }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve prior CSV export rate window

Setting simple: { "limit": 20, "period": 60 } weakens the previous throttle from 20 exports per 10 minutes to 20 per minute (up to 200 in the same 10-minute span). For CSV export endpoints this is a substantial policy change that can increase expensive query load and abuse potential unless explicitly intended.

Useful? React with 👍 / 👎.

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