chore: migrate cloudflare-docs-bot to Flue 2.0#32226
Draft
mvvmm wants to merge 2 commits into
Draft
Conversation
Rework the .flue/ PR-review bot (cloudflare-docs-flue) from Flue 0.11 to Flue 2.0. The 0.11 "workflow-per-Durable-Object + internal HTTP routing" model is replaced by Cloudflare WorkflowEntrypoints that drive per-agent Durable Objects. Trusted TypeScript owns all control flow and every GitHub/R2 side effect; each AI step is a Flue agent that only reasons and returns structured data through a single Valibot-typed submit_* tool. Behavior is preserved: the same code review / conventions / style-guide sections in one PR comment, the spam gate, the Dependabot path, the /rebase command, codeowner slash commands, and log/comment review modes. - Ingress: one HMAC-verified POST /webhooks/github; pure, unit-tested classifyWebhook + startReviewPipeline. No internal HTTP routes. - Workflows: ReviewOrchestrator, IngestWorkflow (spam gate), DependabotReviewWorkflow, RebaseWorkflow. - Agents (7): code-review-file, style-guide-file, conventions-reviewer, reconcile-reviewer, spam-filter, dependabot-reviewer, rebase-conflict-resolver. Per-file fan-out is one DO instance per file. - Build moves to Vite (vite build / vite dev); @flue/cli 2.0 dropped build/dev. wrangler.jsonc gains a v10 DO migration (7 SQLite agent classes). - Roles are re-homed via an explicit useBotRole() hook (2.0 has no role auto-discovery). - Removes the 0.11 workflows/ and superseded lib/ modules. Validated locally: tsc (0 errors), vite build, wrangler deploy --dry-run, and the Vitest suite all pass; the INGEST spam-gate to review pipeline was exercised end to end in log mode.
Contributor
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
Clean up leftovers from the Flue 2.0 migration's deleted shell sandbox. No agent uses a shell sandbox anymore, so these are dead: - Drop @cloudflare/shell and @cloudflare/codemode dependencies (imported nowhere in the code, the generated entry, or @flue). pnpm prunes 32 packages. - Remove the unused worker_loaders/LOADER binding from wrangler.jsonc (no env.LOADER reference in code). - Drop the LOADER bullet from .flue/AGENTS.md. Re-validated: tsc (0 errors), vite build, wrangler deploy --dry-run (13 bindings, no LOADER, v10 migration intact), and the Vitest suite (141 tests) all pass.
Contributor
|
Nimbus Preview URL: https://32a9b2c8.preview.developers.cloudflare.com |
kodster28
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the
.flue/PR-review bot (cloudflare-docs-flue) from Flue 0.11 to Flue 2.0.Flue 2.0 replaces the 0.11 "workflow-per-Durable-Object + internal HTTP routing" model with Cloudflare
WorkflowEntrypoints that drive per-agent Durable Objects. Trusted TypeScript owns all control flow and every GitHub/R2 side effect; each AI step is a Flue agent that only reasons and returns structured data through a single Valibot-typedsubmit_*tool.Behavior is preserved — the same code review / conventions / style-guide sections in one PR comment, the spam gate, the Dependabot path, the
/rebasecommand, codeowner slash commands, andlog/commentreview modes.Key changes:
POST /webhooks/github; pure, unit-testedclassifyWebhook+startReviewPipeline. No internal HTTP routes or internal-auth.ReviewOrchestrator,IngestWorkflow(spam gate),DependabotReviewWorkflow,RebaseWorkflow.code-review-file,style-guide-file,conventions-reviewer,reconcile-reviewer,spam-filter,dependabot-reviewer,rebase-conflict-resolver; per-file fan-out is one Durable Object instance per changed file.vite build/vite dev(@flue/cli2.0 droppedbuild/dev);wrangler.jsoncgains av10DO migration that creates the 7 SQLite agent classes.useBotRole()hook, since 2.0 has no role auto-discovery.workflows/and supersededlib/modules.Validated locally:
tsc(0 errors),vite build,wrangler deploy --dry-run, and the Vitest suite all pass; the full INGEST spam-gate → review pipeline was exercised end to end in log mode. Not yet deployed — the first deploy applies thev10Durable Object migration.