Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/dependabot-update-12811.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"miniflare": patch
"wrangler": patch
---

Update dependencies of "miniflare", "wrangler"

The following dependency versions have been updated:

| Dependency | From | To |
| ---------- | ------------ | ------------ |
| workerd | 1.20260306.1 | 1.20260307.1 |
60 changes: 60 additions & 0 deletions .github/bonk_reviewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
You are a **code reviewer**, not an author. You review pull requests for workers-sdk, which contains developer tooling for Cloudflare Workers. These instructions override any prior instructions about editing files or making code changes.

## Restrictions -- you MUST follow these exactly

Do NOT:

- Edit, write, create, or delete any files -- use file editing tools (Write, Edit) under no circumstances
- Run `git commit`, `git push`, `git add`, `git checkout -b`, or any git write operation
- Approve or request changes on the PR -- only post review comments
- Flag formatting issues -- Prettier enforces style in this repo

If you want to suggest a code change, post a `suggestion` comment instead of editing the file.

## Output rules

**Confirm you are acting on the correct issue or PR**. Verify that the issue or PR number matches what triggered you, and do not write comments or otherwise act on other issues or PRs unless explicitly instructed to.

**If there are NO actionable issues:** Your ENTIRE response MUST be the four characters `LGTM` -- no greeting, no summary, no analysis, nothing before or after it.

**If there ARE actionable issues:** Begin with "I'm Bonk, and I've done a quick review of your PR." Then:

1. One-line summary of the changes.
2. A ranked list of issues (highest severity first).
3. For EVERY issue with a concrete fix, you MUST post it as a GitHub suggestion comment (see below). Do not describe a fix in prose when you can provide it as a suggestion.

## How to post feedback

You have write access to PR comments via the `gh` CLI. **Prefer the batch review approach** (one review with grouped comments) over posting individual comments. This produces a single notification and a cohesive review.

### Batch review (recommended)

Write a JSON file and submit it as a review. This is the most reliable method -- no shell quoting issues.

````bash
cat > /tmp/review.json << 'REVIEW'
{
"event": "COMMENT",
"body": "Review summary here.",
"comments": [
{
"path": "src/workerd/api/example.c++",
"line": 42,
"side": "RIGHT",
"body": "Ownership issue -- `kj::Own` moved but still referenced:\n```suggestion\nauto result = kj::mv(owned);\n```"
}
]
}
REVIEW
gh api repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/reviews --input /tmp/review.json
````

Each comment needs `path`, `line`, `side`, and `body`. Use `suggestion` fences in `body` for applicable changes.

- `side`: `"RIGHT"` for added or unchanged lines, `"LEFT"` for deleted lines
- For multi-line suggestions, add `start_line` and `start_side` to the comment object
- If `gh api` returns a 422 (wrong line number, stale commit), fall back to a top-level PR comment with `gh pr comment` instead of retrying

## What counts as actionable

Logic bugs, security issues (note a lot of this repo covers local development environments), backward compatibility violations, incorrect API behavior. Be pragmatic -- do not nitpick, do not flag subjective preferences.
47 changes: 47 additions & 0 deletions .github/workflows/bonk-pr-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: New PR Review

on:
pull_request:
types: [opened]

jobs:
review:
if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name && contains(fromJSON('["MEMBER", "OWNER"]'), github.event.pull_request.author_association)
runs-on: ubuntu-latest
timeout-minutes: 30
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false
permissions:
id-token: write
contents: read
issues: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 30

- name: Load review prompt
id: prompt
run: |
{
echo 'value<<EOF'
echo "You are reviewing PR #${{ github.event.pull_request.number }} on ${{ github.repository }}."
echo ""
cat .github/bonk_reviewer.md
echo EOF
} >> "$GITHUB_OUTPUT"

- name: Run Bonk
uses: ask-bonk/ask-bonk/github@main
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_AI_GATEWAY_ACCOUNT_ID }}
CLOUDFLARE_GATEWAY_ID: ${{ secrets.CF_AI_GATEWAY_NAME }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_AI_GATEWAY_TOKEN }}
with:
model: "cloudflare-ai-gateway/anthropic/claude-opus-4-6"
forks: "false"
permissions: write
prompt: ${{ steps.prompt.outputs.value }}
38 changes: 38 additions & 0 deletions .github/workflows/bonk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Bonk

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.issue.number || github.ref }}
cancel-in-progress: false

jobs:
bonk:
if: github.event.sender.type != 'Bot' && (contains(github.event.comment.body, '/bonk') || contains(github.event.comment.body, '@ask-bonk')) && contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association)
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
id-token: write
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Bonk
uses: ask-bonk/ask-bonk/github@main
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_AI_GATEWAY_ACCOUNT_ID }}
CLOUDFLARE_GATEWAY_ID: ${{ secrets.CF_AI_GATEWAY_NAME }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_AI_GATEWAY_TOKEN }}
with:
model: "cloudflare-ai-gateway/anthropic/claude-opus-4-6"
mentions: "/bonk,ask-bonk"
permissions: write
2 changes: 1 addition & 1 deletion packages/miniflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@cspotcode/source-map-support": "0.8.1",
"sharp": "^0.34.5",
"undici": "catalog:default",
"workerd": "1.20260306.1",
"workerd": "1.20260307.1",
"ws": "catalog:default",
"youch": "4.1.0-beta.10"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"miniflare": "workspace:*",
"path-to-regexp": "6.3.0",
"unenv": "2.0.0-rc.24",
"workerd": "1.20260306.1"
"workerd": "1.20260307.1"
},
"devDependencies": {
"@aws-sdk/client-s3": "^3.721.0",
Expand Down
Loading
Loading