vance
90d · built 2026-08-09
90-day totals
- Commits
- 86
- Grow
- 10.0
- Maintenance
- 6.3
- Fixes
- 1.1
- Total ETV
- 17.4
30-day trajectory
Last 30 days vs. the 30 days before. Up arrows on Growth and ETV mean improvement; up arrow on Fixes share means more time on fixes (worse).
↑+85.7 %
vs 21 prior
↓-22.5 pp
recent vs prior
↑+2.0 pp
recent vs prior
Daily performance
Daily ETV, stacked by Growth, Maintenance and Fixes.
Work-mix over time
Share of Growth / Maintenance / Fixes over a rolling 7-day window. Reads as 'where is effort flowing right now'.
Repository spread
Where this developer's commits land. Concentrated work (top1 > 80%) vs polymath spread (top1 < 30%).
| Repo | Commits | ETV |
|---|---|---|
| cloudflare-docs | 78 | 17.4 |
Most impactful commits
Top 20 by ETV in the 90-day window.
- 2.7ETVchore: migrate cloudflare-docs-bot to Flue 2.0 (#32226) * chore: migrate cloudflare-docs-bot to Flue 2.0 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. * chore: remove unused shell-sandbox deps and worker_loaders binding 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. * fix: address code review findings in PR #32226 - CR-fd682f90a024: Detect duplicate conflict write paths, return low-confidence fallback - CR-69dfb2bf8d15: Log markAutoReviewCompleted failures instead of silently swallowing - CR-d73074aa9ae0: Return reviewedFiles:[] on no-result path to match degraded-error path - CR-813507364944: Wrap v.parse in try/catch for invalid spam verdicts, degrade gracefully - CR-e7b3cc098f19: Remove markdown code fences around JSON in reconcile prompt (prompt injection) - CR-f4cb3cbf256a: Make useInstruction unconditional for hook-order stability - CR-e3dccfc0d318: Distinguish 'never called' vs 'invalid submission' in useAgentFinish reminder - CR-5cf837342595: Reorder spam side effects: close before comment for idempotency - CR-4a5b8f875b0f: Add filename as secondary sort key for deterministic file selection * fix: address code review findings in Flue 2.0 migration - Reconcile fallback carries forward untouched-file findings (F3) - Style-guide no-result returns reviewedFiles: [] (F8) - Spam close/comment ordering — best-effort after close (F9) - Rebase apply/notify split — best-effort after applyResolution (F5) - Conventions read timeout/abort (F7) - Halt on delete/modify conflicts in rebase (F4) - Thread expected_head_sha through update-branch (F6) - Mint GitHub token in-DO, drop from initialData (F1) - Update AGENTS.md token note * feat: add /dev/review/:number endpoint for local review testing Fetches the real PR from GitHub, builds the same WebhookClassification a webhook would, and routes through startReviewPipeline — spam gate, Dependabot detection, codeowner checks, the full pipeline. Gated behind DOCS_FLUE_INTERNAL_TOKEN. * fix: address second round of code review findings in PR #32226 * fix: capture publish step result in DependabotReviewWorkflow Early return from step.do("publish") only exits the step callback; the outer run method continued and returned acted: true even when publish was skipped due to head_moved. Capture the step result and return early from run with acted: false when not finalized.github.com-cloudflare-cloudflare-docs · 0fc7a8c3 · 2026-07-28
- 2.2ETVflue: add generic code review alongside style-guide review (#31562) * flue: add generic code review alongside style-guide review Adds a bonk-style generic engineering review that runs in the same orchestrator run as the existing style-guide review and posts findings in the same bot comment, now split into "### Code Review" and "### Style Guide Review" sections. - New code-review skill: reviews all changed files (including code examples in MDX) for bugs, error handling, security, dead code, and maintainability. No style/prose checks; defers CI-caught issues. - New in-process fan-out (lib/code-review-inproc.ts) mirroring the style-guide one: per-file sessions, concurrency 5, cap 20 files. - Code findings add a `critical` severity above warning/suggestion and use the CR- id namespace; reconcile skill preserves it. - Code-review agent gets full-file context via GitHub-API-backed tools (read_repo_file defaults to the PR head SHA, search_repo). - The repo root AGENTS.md is fetched at the head SHA and injected as agent instructions every run, since the Worker has no repo checkout to discover it from. - Orchestrator runs both reviews concurrently (one failing degrades to empty rather than aborting), reconciles per stream, persists { code, style } findings to R2 (legacy bare-array tolerated), and renders one unified comment. Cadence is unchanged: this rides the existing code-review-orchestrator triggers (auto on PRs, /review, /full-review). * flue: address code-review self-review findings Fixes surfaced by the bot reviewing its own PR (#31562): - getRepoFileContent: decode base64 as UTF-8 via TextDecoder (atob alone produced mojibake for non-ASCII content such as em dashes in AGENTS.md); URL-encode path segments; return null only on 404 and throw on other non-2xx so "absent" is distinct from "failed to load". - Fetch the root AGENTS.md from the PR base ref instead of the head SHA. The content is injected into agent instructions, so reading it from the head let a PR poison AGENTS.md to inject instructions into the reviewer. - Render: a degraded (failed) review section now shows a failure note instead of "No issues found", and the status line notes the partial failure; carried-forward findings still render. Orchestrator passes the per-stream failure flags into renderComment. - Render: match acknowledged findings by stable id, not path:line:rule, so two findings sharing those fields are not both dropped. - github-repo-tools.ts: update stale file header (now shared by the Dependabot and code-review agents). * flue: run review fan-outs sequentially to fix DO memory resets Running the code-review and style-guide fan-outs concurrently kept ~10 model sessions live in a single Durable Object isolate and over-ran its 128 MB limit, producing repeated "isolate exceeded its memory limit and was reset" errors (and downstream event-stream append failures). - Run the two fan-outs sequentially instead of via Promise.all, so one fan-out's sessions are reclaimed before the next starts (roughly halves peak heap). Per-stream failure isolation is preserved. - Lower code-review concurrency from 5 to 3, since its sessions are heavier (full-file reads + injected AGENTS.md) than style-guide ones. Trade-off: review wall-clock is now the sum of the two fan-outs rather than the max — acceptable for a background review bot. * flue: split reviewers into separate specialist workflows Move the code-review and style-guide fan-outs out of the orchestrator DO into their own discovered workflows, so each runs in its own Durable Object isolate (own 128 MB budget). This removes the shared-isolate memory contention that caused "isolate exceeded its memory limit and was reset" errors and restores parallel execution. - New workflows code-review-specialist + style-guide-specialist (FlueCodeReviewSpecialistWorkflow / FlueStyleGuideSpecialistWorkflow). Each self-fetches its own diff once (no per-file fetch, no R2 diff staging), stages it into its own workspace, runs the existing in-process fan-out (reused verbatim), and returns findings as its run result. - Orchestrator now decides diff mode only (no file fetch), admits both specialists via admitWorkflow and polls them concurrently via pollRun (the spam-filter pattern). A timed-out/errored specialist degrades to an empty section with its failure flag set; both failing -> failure comment. - Specialists self-heal incremental -> full diff if the base SHA is gone. - Code-review concurrency restored to 5 (own isolate now). - New shared lib/review-specialist.ts: payload contract + helpers. - writeDiffToWorkspace accepts a minimal DiffPullRequest shape. - wrangler v5 migration adds the two new SQLite DO classes. Supersedes the sequential-fan-out workaround; the fan-outs no longer run in the orchestrator DO at all. * flue: remove unused DiffMode import in code-review-specialist * flue: add beta disclaimer note under Code Review heading * flue: lower code-review specialist concurrency to 3 to stay under DO memory limit * flue: cap code review at 10 files and raise specialist poll timeout The code-review specialist timed out on large PRs. AI Gateway showed all model calls succeeding (0 failures) but slow (p90 ~47s, p99 ~103s), so the cause was DO memory pressure plus total wall-clock, not model errors: - A 13-file run at concurrency 5 hard-OOM'd the specialist isolate ("SQL query failed: ... memory limit") and never reached run_end. - Even without OOM, 13 multi-turn file sessions exceeded the orchestrator's 10-minute poll deadline. Fixes: - CODE_REVIEW_MAX_FILES 20 -> 10. Each code-review file is a multi-turn agent session, so this bounds both peak isolate memory and wall-clock. Covers virtually all docs PRs; larger PRs review their 10 largest files. - Orchestrator specialist poll timeout 10m -> 20m, since a legitimate large review is many slow model calls and the specialist runs durably in its own DO. - Concurrency stays at 3 (memory). * flue: free per-file review sessions to fix specialist DO OOM Delete each per-file agent session as soon as it finishes so harness memory is bounded to ~concurrency live sessions instead of growing with the changed-file count. With the leak fixed, restore the code-review cap to 20 files and concurrency to 5, and drop the dead reserveTokens hint. * enable tracing * flue: document code-review architecture in AGENTS.md * flue: reduce review turns, add watchdog, per-file abort, env-overrides Pre-stage added lines + file content into skill args (code-review-inproc.ts, code-review-specialist.ts, SKILL.md): trusted TypeScript now parses the diff and fetches the full file at head SHA before each session opens, eliminating the mandatory setup turns (read manifest → read patch → parse lines → read_repo_file). Cross-file tools remain available for optional lookups. Removes diff workspace staging from the code-review path entirely. Add external cron watchdog (review-watchdog.ts, review-watchdog-decide.ts, run-state.ts): a scheduled handler fires every 2 minutes, detects reviews stuck past a deadline via inflight R2 markers, and re-drives them. Workflows are non-resumable after DO interruptions; the watchdog is the only reliable recovery path. Inflight markers are written at review start and cleared on completion (code-review-state.ts, code-review-orchestrator.ts). Per-file hard timeout now aborts the CallHandle before deleting the session (code-review-inproc.ts, style-guide-inproc.ts): session.delete() rejects while an operation is active, so abort must settle the operation first. Fixes zombie session leak on timeout. Env-overridable concurrency and file timeout (lib/env.ts): both specialists read CODE_REVIEW_CONCURRENCY, CODE_REVIEW_FILE_TIMEOUT_MS, STYLE_GUIDE_CONCURRENCY, STYLE_GUIDE_FILE_TIMEOUT_MS so local dev can run lower values without touching prod defaults. Staged-diff cleanup in style-guide-specialist.ts: removeWorkspacePath in try/finally so the run-scoped SQLite rows are freed after each review. Added removeWorkspacePath to connectors/cloudflare-shell.ts. Wrangler: cron trigger every 2 min, DOCS_FLUE_BASE_URL var for watchdog. Tooling: flue:reset:local script, NODE_OPTIONS on flue:dev, fixed clear-r2-pr-data.ts to cover both state paths and inflight/ prefix. * flue: remove watchdog (never ran; reviews healthy without it) The scheduled watchdog was never functional in prod: Flue drops non-HTTP handlers from app.ts (they require cloudflare.ts), so the cron fired every 2 minutes and logged "Handler does not export a scheduled() function" 30 times per hour without ever invoking runReviewWatchdog(). Reviews stopped getting stuck independently — the skill rewrite + per-file session.delete() + concurrency limits reduced orchestrator interruptions to near-zero. The watchdog's run-state detection and re-admission path were also untested end-to-end, so enabling it carried real risk. Removes: review-watchdog.ts, review-watchdog-decide.ts, run-state.ts, all inflight marker API from code-review-state.ts, all marker call sites from code-review-orchestrator.ts, triggers.crons + vars.DOCS_FLUE_BASE_URL from wrangler.jsonc. Reverts app.ts to canonical export default app. Keeps: markAutoReviewCompleted, renderFailureComment, bypassReviewLimit (all used independently). bin/clear-r2-pr-data.ts inflight/ handling kept for one-time cleanup of orphaned prod R2 markers. * flue: explicitly clear crons in wrangler config An absent triggers key leaves existing cron triggers intact on deploy; triggers.crons=[] forces wrangler to PUT an empty schedule list, actually deregistering the leftover */2 cron. * flue: address ask-bonk review findings (items 1-4) 1. Extract withConcurrency to lib/inproc-utils.ts; import from both code-review-inproc.ts and style-guide-inproc.ts instead of duplicating. 2. Fix read_repo_file tool UTF-8 decoding: use TextDecoder instead of bare atob() so non-ASCII content (em dashes, CJK, smart quotes) is not mojibake. Also encode path segments with encodeURIComponent, matching the getRepoFileContent fix already applied to github.ts. 3. Fix parseAddedLines: skip lines starting with backslash ('\ No newline at end of file') instead of treating them as context lines. Previously this incremented newLine, producing off-by-one line numbers for every subsequent added line in files without a trailing newline. 4. Fix stale comments: code-review-diff.ts, style-guide-inproc.ts, and wrangler.jsonc v4 comment still described the old in-orchestrator-DO architecture; updated to reflect the specialist-DO split. * flue: add holistic code review mode with size-based routing and forced-mode commands Routes code review to one of two strategies based on combined diff size: Fan-out (≤50 KB): per-file sessions, concurrency 5, cap 20 files. Good for smaller PRs; maximum per-file detail, parallel sessions, per-file degradation. Holistic (>50 KB): single session over the entire PR diff in one pass, cap 50 files (lib/code-review-holistic.ts). Enables cross-file reasoning, no per-file setup overhead, faster and more reliable on large PRs where fan-out wedges. New code-review-holistic skill: rich substance from the per-file skill, reframed for whole-PR review, model-owned navigation. Comment heading reflects which ran: 'Holistic Code Review' or 'Fan Out Code Review'. Both paths log inputTokens/totalTokens for calibration. Two new codeowner slash commands: /fan-out-review — forces fan-out regardless of diff size (with warning in the comment that it may be slow/fail on large PRs) /holistic-review — forces holistic regardless of diff size forceReviewMode threads through orchestrate → orchestrator → review-specialist → code-review-specialist, overriding size-based routing when set. Also: selectCodeReviewFiles takes an optional maxFiles param (holistic passes 50, fan-out uses the existing 20 default); per-file usage logging (inputTokens, totalTokens) added to reviewSingleFile; progress logs committed from the previous session also included here. * flue: fix Dependabot routing for /fan-out-review and /holistic-review; fix partial run consuming auto-review slot /fan-out-review and /holistic-review now check getPullRequest().user.login for dependabot[bot] before dispatching, matching the /review and /full-review pattern. Dependabot PRs route to /workflows/dependabot-review without forceReviewMode; regular PRs keep the forced mode. markAutoReviewCompleted now only fires when both codeOutcome.ok and styleOutcome.ok are true. Previously a partial run (one specialist degraded) still consumed an auto-review slot, which blocked the retry the comment promised would happen on the next push. * [Flue] Replace orchestrator poll with R2 rendezvous + finalize-review workflow Remove the 20-minute specialist poll from the code-review orchestrator (root cause of stuck reviews when the orchestrator DO was interrupted mid-wait). Replace with an event-driven finalize pattern: - Orchestrator is now dispatch-only: limit check, placeholder, diffMode, write context.json to R2, admit both specialists fire-and-forget, return. - Each specialist wraps its review in try/catch (degraded result on error), writes its stream result to R2, then races for a conditional-PUT finalize lock (If-None-Match: *). Exactly one specialist wins. - New finalize-review workflow (FlueFinalizeReviewWorkflow, v6 migration): reads context + stream results from R2, head-guards against newer pushes, idempotency-guards against double-finalize, reconciles both streams, persists review JSON, renders and posts the comment, swaps reactions, marks auto-review slot consumed, cleans up the pending namespace. - reviewMode is carried through context.json so finalize always uses the same mode the orchestrator decided on (fixes log-vs-comment split in local dev where DO env views can differ). - dispatchId scoping isolates concurrent same-head dispatches (e.g. auto-review + /full-review arriving simultaneously). - Zero new custom Durable Object bindings beyond the standard Flue workflow class (FlueFinalizeReviewWorkflow in wrangler.jsonc v6). * [Flue] Use kimi-k2.7-code for reconciliation (drop glm-4.7-flash) * [Flue] Write degraded placeholder before review to prevent stuck finalize A specialist DO that is hard-evicted mid-review never reaches the writeStreamResult call at the end, leaving no code.json/style.json for the other specialist to detect and claim the finalize lock — exactly the stuck-review scenario seen on PR #31736. Fix: each specialist now writes { ok: false, degradedResult } to R2 BEFORE starting its review. If the DO is evicted, the placeholder is already there. The placeholder is overwritten with the real result on success. Either way finalize always has two stream results and will run, posting a degraded-section comment rather than staying stuck forever. Also fixes the unused FinalizeContext import lint error. * [Flue] Fix premature finalize: add final:boolean to stream results The placeholder writes added in the previous commit caused a race: both specialists write their degraded placeholders within ~1-2s, the first to write checks the sibling's placeholder (which looks like a valid result), claims the lock, and finalize fires immediately with two ok:false results before either review ran — posting an instant failure comment. Fix: - Add final:boolean to StreamResultPayload (false=placeholder, true=real) - tryClaimFinalize now checks final:true on the sibling — a placeholder (final:false) is not treated as 'done', preventing premature triggering - Orchestrator writes both crash-protection placeholders (final:false) BEFORE admitting specialists so a key exists even if a specialist DO is evicted immediately after admission - Specialists write final:true in their rendezvous tail (removed the redundant per-specialist placeholder writes added previously) * [Flue] Address AI review findings — robustness, safety, correctness, refactors A. Robustness (stuck-review fixes): - Wrap all specialist setup (token, diff fetch) + review in one try/catch; any setup failure now writes a final:true degraded result and triggers finalize rather than throwing and leaving the placeholder stuck at final:false. Extract shared reportSpecialistResult() helper into lib/finalize-rendezvous.ts to eliminate the duplicated rendezvous tail across both specialists. - Orchestrator admit failures overwrite the placeholder with final:true degraded; if both fail, orchestrator itself claims the finalize lock and admits finalize. Drop redundant type casts on the narrowed admit union. - finalize-review post-comment failure now returns {finalized:false} and skips markAutoReviewCompleted and cleanupPending so the next push can retry without burning an auto-review slot on an undelivered comment. - Degraded streams (ok:false) skip reconciliation and carry previous findings forward as active, preventing false resolution of prior issues. B. Defensive R2 / JSON: - Wrap obj.json() in try/catch in readContext, readStreamResult, and tryClaimFinalize; treat corrupted/partial writes as null/not-final. C. Safety: - Guard req in orchestrator with an explicit throw instead of req!. - safeOrigin() helper returns '' on URL parse failure in both specialists. - parseReviewSpecialistPayload validates pr field shapes and DiffMode union (incremental requires fromSha+toSha strings); normalizes baseUrl to a valid absolute http(s) origin via new URL().origin, dropping invalid values. D. Correctness: - Holistic reviewedFiles now built from patched files only, matching the diff actually sent to the model. - clearTimeout called immediately after await handle resolves in both holistic and per-file reviewSingleFile, preventing a late timer from mislabeling a post-resolve error as a timeout. - Finding ID hash widened from 6 to 12 hex chars (24→48 bit) in both CR-/SG- namespaces; line number deliberately kept excluded for cross-commit stability. - withConcurrency clamps limit to Math.max(1, Math.floor(limit)). E. Dev script (bin/clear-r2-pr-data.ts): - WHERE clause tightened to 'diffs/pr-%' and 'inflight/pr-%' (was 'diffs/%'). - Switch execSync string interpolation to execFileSync with argument arrays. - Freshen stale header comment. F. Refactors: - Collapse four near-identical /review /full-review /fan-out-review /holistic-review handlers in orchestrate.ts into one shared helper. - Merge duplicate cloudflare-shell imports in style-guide-specialist.ts. G. Docs: - AGENTS.md: add finalize-review row to workflow table; rewrite request flow to describe dispatch-only orchestrator, R2 rendezvous, final:bool flag, and finalize-review steps; add v6 migration; update slash-command list. * [Flue] v7+v8 migrations: clear specialist DO storage to break OOM death spiral The FlueCodeReviewSpecialistWorkflow and FlueStyleGuideSpecialistWorkflow DOs accumulated SQLite state from previous crashed runs. Each OOM leaves orphaned session data in the DO's storage. After several crashes the accumulated state is large enough that even the Flue alarm recovery handler OOMs on startup (~900ms, repeating every ~30-60s), creating a death spiral where no future review can complete. Fix: two-step migration to reset the storage: v7 — rename bloated instances to *Old (abandons their storage) v8 — recreate the classes with empty storage under the original names The wrangler bindings still point to the original names (FlueCodeReview- SpecialistWorkflow / FlueStyleGuideSpecialistWorkflow), so no code changes are needed. Run history prior to v7 is lost. * Revert "[Flue] v7+v8 migrations: clear specialist DO storage to break OOM death spiral" This reverts commit fa5e960052398ec7520d3804f145948b1edf6c5e. * [Flue] Specialist split: conventions + redirect specialists, N-stream rendezvous, style-guide rule additions - Generalise finalize rendezvous from 2 streams to N streams (EXPECTED_STREAMS constant; tryClaimFinalize loops all siblings in parallel; stream type widened to string; expectedStreams threaded through context, payload, and options) - Add conventions specialist (light AI session, conventions-check skill): checks PR title format, Summary content against fetched template, and redirect checklist when docs files are renamed/deleted - Add redirect specialist (pure TypeScript, no model): derives old+new URLs from file paths, skips format-only moves (foo.mdx → foo/index.mdx), splat-aware __redirects matching, degrades gracefully if file unreadable - Redirects reconcile deterministically in finalize (no LLM); conventions force full diff mode; bothFailed gate remains code+style only - Add previous_filename to PullRequestFile for correct rename handling - Add marketing-language and time-sensitive-content suggestions to style-guide core-content reference; add component should-use suggestions to code-blocks - Render: 4 sections (Code → Conventions → Style → Redirects); pr path renders as PR label; no-findings messages use <sub> (smaller, no emoji); top-level status line unchanged - wrangler.jsonc v7: new_sqlite_classes for both new DO classes - Fix idempotency guard to skip in log mode (guard is comment-mode only) * [Flue] Add /disable-auto-review command Codeowners can comment /disable-auto-review on a PR to stop push-triggered reviews from running. The flag is stored in R2 at diffs/pr-<n>/auto-review-disabled.json (same pattern as ignore-review-limit). Manual /review and /full-review commands (bypassReviewLimit=true) still work normally. The command is acknowledged with a thumbs-up reaction. * [Flue] Remove holistic code review — always fan-out Holistic mode timed out on large PRs (>50 KB diff, single model pass, 15-min hard timeout) producing zero findings. Fan-out is strictly better: bounded per-file sessions, graceful per-file degradation, guaranteed completion on any diff size. - Delete lib/code-review-holistic.ts and .agents/skills/code-review-holistic/ - code-review-specialist.ts: always fan-out; remove routing logic, holistic imports, env reads, forceReviewMode handling - lib/code-review-inproc.ts: remove CODE_REVIEW_HOLISTIC_* constants and re-export; remove reviewMode from both return sites - lib/code-review-results.ts: remove reviewMode field from CodeReviewResult - lib/review-specialist.ts: remove forceReviewMode from payload type + parser - code-review-orchestrator.ts: remove forceReviewMode from payload + specialistBody - orchestrate.ts: remove /fan-out-review and /holistic-review commands - code-review-render.ts: heading always 'Code Review'; remove codeMode from RenderReviewInput; remove /fan-out-review and /holistic-review command rows - finalize-review.ts: remove codeMode from renderComment call - AGENTS.md: remove holistic routing description and command bullets * [Flue] Remove unused CODE_REVIEW_MAX_FILES import in specialist * [Flue] Relax conventions checks — semantic over format Replace rigid format rules (title must start with [Product] or type:, description must have a ### Summary section) with lenient semantic checks: 1. Product/area identified — title OR description names the area; no tag required 2. Description explains the work — any human prose passes; only flag truly empty/placeholder descriptions 3. Scope accuracy — only flag material misrepresentation, not missing details Default to no finding in all three. Only flag clear, significant violations. * [Flue] Tighten scope accuracy check — flag any unmentioned core change * flue: remove unused-imports rule from style guide review * [Flue] Fix 7 bot-review findings 1. Diff parser: use '+++ '/'--- ' (trailing space) so source lines like '++i;' (patch: '+++i;') are not skipped as file headers. Previously any added line beginning with '++' was silently dropped from args.addedLines. 2. admitWorkflow outside catch-all in reportSpecialistResult: if admitWorkflow threw after tryClaimFinalize won the lock, the exception was swallowed, the lock stayed claimed, and finalize was never admitted for that dispatch. Now the R2 write + lock claim are in the try/catch but the admit call is outside it, so admission errors propagate and can be retried. 3. req guard before placeholder post in orchestrator: the 'if (!req)' check was after the GitHub comment mutation, leaving a stuck 'review pending' comment if req was unexpectedly absent. Moved before the placeholder post. 4. Unhandled getPullRequest failure in finalize: a GitHub API error aborted finalize without running cleanupPending, leaving a stale pending namespace. Wrapped in try/catch with cleanup and graceful return. 5. getIssueComments called unconditionally in log mode: botComment is only used in comment mode (idempotency check + post/update). Moved the fetch inside the 'reviewMode === comment' block to avoid a needless GitHub call and failure surface in log mode. 6. markAutoReviewCompleted read-modify-write race: two concurrent finalizes for the same PR could both read the same state, both pass the headSha dedupe check, and overwrite each other, double-incrementing the count. Fixed with an ETag-based conditional PUT (If-Match / If-None-Match: *) with up to 3 retries on conflict. 7. AGENTS.md stale: updated to reflect 4 specialists (added conventions + redirect rows to workflow table, updated description, request flow, R2 state shape, rendered sections, migration history); added /disable-auto-review to slash commands list. * [Flue] Remove redirect specialist from review pipeline The redirect check added noise without enough signal. Removes the entire stream from the 4-specialist pipeline, leaving code, conventions, and style. - Delete workflows/redirect-specialist.ts - EXPECTED_STREAMS: ['code','style','conventions','redirects'] → 3 streams - Remove degradedRedirectsResult() from finalize-rendezvous.ts - Orchestrator: drop redirects placeholder write, specialist admission, admit-results entry, log fields, and return value - finalize-review: drop redirectsPayload read, missing-results guard term, previousRedirectsFindings, reconcileRedirects helper, reconciledRedirects calls, persisted 'redirects' key, renderComment args, and totalActive/ totalIgnored/totalResolved terms - code-review-render: remove redirects/redirectsFailed from RenderReviewInput, drop redirects from counts and anyFailed, remove Section 4 renderSection call, remove Redirects from acknowledged-by-author block - wrangler.jsonc: v8 migration deletes FlueRedirectSpecialistWorkflow DO class - AGENTS.md: update to 3 specialists throughout; remove redirect rows from workflow table, state shape, rendezvous namespace, and render sections; add v8 migration note; remove stale CI policy note about missing redirects - conventions-check SKILL.md + conventions-specialist.ts: remove stale references to redirect checklist in descriptions/comments * [Flue] Address 16 bot-review findings (W1-W16, S1-S8) W1: Wrap session.skill() reconcile call in finalize-review.ts — a thrown rejection now degrades to current findings instead of crashing finalize. W2+S6: Guard handle.abort() in both inproc timer callbacks with Promise.resolve().catch(() => {}) so abort errors don't produce unhandled rejections from setTimeout. W3: Add allExpectedStreams.includes(myStream) guard in tryClaimFinalize so only legitimate expected streams can trigger finalization. W6: Move parseReviewSpecialistPayload inside the try block in all three specialists (code, style, conventions) so a malformed payload degrades gracefully instead of rejecting the workflow. W7: typeof input.pr === 'object' && input.pr !== null guard in parseReviewSpecialistPayload so non-null non-object values don't cause a TypeError before the intended validation error. W8: Validate every expectedStreams element is a string before passing to downstream rendezvous logic. W9: Wrap isAutoReviewDisabled JSON parse in try/catch — corrupt file now returns false instead of propagating. W10: Validate count and shas shapes in markAutoReviewCompleted before arithmetic and array operations to guard against corrupt data. W11: Rewrite AGENTS.md placeholder description — clarify that final:false placeholders guarantee keys exist in R2 but do NOT trigger finalize; tryClaimFinalize still requires every stream to be final:true. W12+S8: Replace getPullRequest API call in orchestrate.ts slash-command handler with body.issue.user.login from the webhook payload, removing a failure mode that could silently misroute Dependabot PRs. W13+W14: Wrap setReviewLimitIgnored and setAutoReviewDisabled in try/catch in orchestrate.ts — R2 write failure now returns a structured error response instead of propagating a 500 that may trigger webhook retries. W16: Guard NaN in withConcurrency — Math.floor(NaN) passes through Math.max and causes Array.from({ length: NaN }) to throw RangeError. Now clamps to 1 when limit is not finite. S1: Use existing GitHubIssueComment type import in finalize-review.ts instead of inline import() expression. S2: Paginate R2 list in cleanupPending — loop while truncated so all keys under the pending prefix are deleted, not just the first page. S3+S4: Fix stale 'four' in orchestrator header comment; renumber duplicate step-4 labels (context write is now 3, placeholders 4). S7: Preserve original error as cause when converting abort into timeout error in style-guide-inproc.ts. * [Flue] Remove conventions section note from rendered comment * [Flue] Address second-round bot findings (8 fixes) W1: Wrap getIssueComments in finalize-review.ts — API failure now treats the run as not-yet-finalized and continues rather than crashing. W2: Wrap cleanupPending at end of success path — cleanup failure no longer rejects the workflow after the comment is already posted; S1: log markAutoReviewCompleted failure instead of silently swallowing it. W3: More precise git file-header skip in diff parser — match on '+++ b/', '+++ a/', '+++ /dev/null', '--- b/', '--- a/', '--- /dev/null' exactly so source lines like '++ something' (patch: '+++ something') inside a hunk are not incorrectly skipped. W6: Count critical findings from conventions and style in the status-line criticalCount so they surface in '🚨 N critical' even though their renderSection calls still use includeCritical=false. W7: Add pr.body, pr.author, and pr.labels element type checks to parseReviewSpecialistPayload — aligns validation with the declared ReviewSpecialistPrMeta contract. W8+W9: Wrap addReactionToComment after setReviewLimitIgnored and setAutoReviewDisabled — reaction failure no longer masks a successful state write; handler returns acted:true and logs the reaction error. S3: Log when myStream is not in allExpectedStreams in tryClaimFinalize so a misconfigured stream name is visible in logs. * [Flue] Fix two bot findings: quoted diff paths + conventions scope input S: Skip git-quoted file headers in diff parser (paths with spaces/special chars produce headers like '+++ "b/my file.ts"' which the previous prefix checks did not match, causing them to be recorded as added lines). W: Pass changedFiles to conventions-check skill so Rule 3 (scope accuracy) can actually evaluate the full set of changed files, not just renamedDocFiles. Builds a compact {filename,status,additions,deletions} list from the already-fetched PR file list; no extra API call needed. Skill updated to document the new input and use it in Rule 3. * [Flue] Separate 'Acknowledged by author' from last review section with hr * [flue] bump wrangler to 4.107.0; regenerate lockfiles via public npm - .flue/package.json: wrangler 4.97.0 → 4.107.0 (required by @cloudflare/vite-plugin@1.43.0) - Cleared ~/.npmrc Cloudflare internal registry redirect; all @cloudflare/* packages now resolve from public npm, fixing 401 noise and broken workerd@1.20260630.1 binary - Regenerated root and .flue lockfiles against public registry * [flue] fix C1/W1/W2/S3 from code review C1 (style-guide-specialist): guard diffDir before cleanup in finally — without the check, a parse failure would rm -rf / on the DO's SQLite filesystem. W1 (finalize-review + code-review-render): add <!-- status: failure --> to renderFailureComment; update idempotency check to treat both pending and failure as retryable states so /review is not permanently blocked after a both-failed run on the same head SHA. W2 (conventions-specialist): hoist session variable and add finally block calling session?.delete() — matches the pattern in the other two specialists and prevents SQLite event-stream data from accumulating across workflow runs. S3 (clear-r2-pr-data): remove dead OR key LIKE 'inflight/pr-%' branch; no code writes under that prefix. * [flue] fix S2/N1/N2 from re-review S2: renumber orchestrator step comments 3,3,4,4 → 3,4,5,6 N1: style-guide-inproc degraded-file error log: event code_review_orchestrator → style_guide_specialist N2: code-review-inproc degraded-file error log: event code_review_orchestrator → code_review_specialist * [flue] fix N4: delete reconciliation session in finalize-review Session created for the three reconcileStream calls was never deleted, leaving its SQLite event-stream data to accumulate across reviews. Matches the session.delete() pattern from the specialist DOs (W2).github.com-cloudflare-cloudflare-docs · e78ea9bd · 2026-07-06
- 1.4ETVfeat: Add flue style guide review bot (#31072) * first pass * fix: pass reviewedFiles to reconciler so incremental reviews correctly resolve fixed findings * [flue] Add wrangler dev script and orchestrator improvements * [flue] Refactor style guide references, improve review quality and speed - Restructure style guide references into always/, conditional/, components/ subdirectories - Update manifest to use granular per-component reference files - Add stale file cleanup to sync-agents script - Improve style-guide-review SKILL.md: add patch parsing, no-enumeration, and no-absence-reasoning instructions - Preserve existing bot comment body when posting pending review update - Add clear-r2-pr-data.ts utility script - Minor orchestrator and spam filter improvements * [flue] Add commands section to code review comment * [flue] Remove import-only component refs, add commands section, fix pending comment body * [flue] Fix duplicate pending status when /full-review is triggered on existing pending comment * [flue] Add /review command for on-demand incremental or full review * [flue] Cap automatic reviews at 2 per PR, bypass for codeowner commands * [flue] Skip spam filter for codeowner-opened issues and PRs * [flue] Remove PR allowlist gating — ready for production * fix: Address PR review feedback — label bug, comment pagination, table cell escaping, wrangler-config example * chore: format flue agent files with prettier * [flue] Restrict code review to codeowner PRs; reduce log noise * fix: prefix unused reviewResponse vars with underscore to satisfy ESLint * [flue] Remove codeowner gate — auto-review all PRs * [flue] Fix duplicate paused message in review limit comment * [flue] Fix duplicate paused message — skip update if already paused * fix: address PR review feedback — section numbers, no-op replace, table sanitization, JSDoc * chore: bump @flue/cli and @flue/runtime to 0.7.1github.com-cloudflare-cloudflare-docs · 52de1c50 · 2026-05-29
- 1.3ETVfix: flue - harden style-guide fan-out, replace wait=result with Durable Streams polling, and refactor domain logic into lib/ (#31436) * [flue] Reduce style-guide fan-out concurrency and scope child hydration by filename - Lower STYLE_GUIDE_CONCURRENCY from 10 to 5 to reduce concurrent DO memory pressure - When a filename is specified, hydrate only manifest.json, pr.json, comments, and the single patch file instead of listing every object in the diffDir prefix - Re-enable and improve fan-out structured logs in code-review-orchestrator: style_guide_fanout_start, style_guide_complete, and per-child dispatch events - Add filename to all style-guide-review log events for per-child observability - Add hydration_start/hydration_complete logs with object counts * [flue] Avoid redundant R2 GETs for manifest.json and pr.json in targeted hydration manifest.json and pr.json are already fetched earlier in the run function (for the fast-fail check and PR metadata read). Reuse their in-memory text instead of re-fetching from R2 inside the targeted diffKeysToLoad branch. Only comments and the patch file are fetched fresh in targeted mode. * style: format * [flue] Fix Body already used error in targeted hydration manifestObj.text() was called at parse time (step 1) and then again inside the cachedDiffResults block. Same for prObj.json() then prObj.text(). R2 response bodies are single-use streams — reading twice throws TypeError. Fix: capture manifestText and prText as strings on first read, reuse them for both parsing and workspace write. * [flue] Log actual error before Flue swallows it as generic 500 Wrap the style-guide-review run body in a top-level try/catch that logs the error message and stack with full context (PR number, filename, diffDir, runId) before rethrowing. Previously any unhandled throw was caught by Flue and surfaced to the parent orchestrator only as a generic 500 internal_error with no child-side log, making the root cause invisible in Workers Observability. * style: format * [flue] Replace ?wait=result fan-out with accepted mode + Durable Streams polling Previously each style-guide child dispatch used ?wait=result, holding a synchronous HTTP request open to the child DO until it completed. If that response path dropped (child finished but parent never received the result), the parent's Promise.all would hang indefinitely. Observed in PR #31422: all 11 child runs completed on the child side, but one parent-side style_guide_child_dispatch_complete was never logged. New approach: - Invoke each child in accepted mode (no ?wait=result); receive runId in 202 - Poll /runs/:runId via Durable Streams long-poll until run_end is observed - Each long-poll subrequest has a bounded lifetime (<=30s per Flue protocol) - Resume from offset after each response so no events are missed - If run_end.isError, throw with the actual error message - If deadline (5 min) exceeded without run_end, return empty result with a timeout log rather than hanging the parent forever New log actions: - style_guide_child_run_admitted - style_guide_child_run_observe_start - style_guide_child_run_observe_complete - style_guide_child_run_observe_failed - style_guide_child_run_observe_timeout - style_guide_child_run_observe_fetch_error - style_guide_child_run_observe_error * style: format * [flue] Apply accepted-mode + Durable Streams polling pattern everywhere Extract shared admitWorkflow() and pollRun() helpers into lib/poll-run.ts so the pattern is consistent across all orchestrators. orchestrate.ts: - Dependabot PR events (3a): fire-and-forget admitted mode — result is not needed by the orchestrate workflow; the dependabot-review workflow handles its own GitHub output - /full-review and /review slash commands (3, 4): same — fire-and-forget; result discarded in original code too - Spam filter (5): admit + poll, since the closed boolean determines whether to run code review. Timeout treated as 'not spam' to avoid blocking review - Code review orchestrator (6): fire-and-forget admitted mode — it posts its own GitHub comment when done; orchestrate does not need to wait code-review-orchestrator.ts: - Replace inline dispatchStyleGuideReview / pollStyleGuideRun with a thin wrapper over the shared admitWorkflow() + pollRun() helpers - Keeps all existing structured log actions intact lib/poll-run.ts (new): - admitWorkflow(): POST to any workflow pathname, return runId from 202 - pollRun<T>(): poll /runs/:runId via Durable Streams long-poll until run_end, with configurable timeout and transient error retry * style: format * [flue] Upgrade model to kimi-k2.7-code across all workflows * [flue] Extract model constants into lib/models.ts Add lib/models.ts with PRIMARY_MODEL and RECONCILIATION_MODEL. Replace hardcoded model strings in all four workflow files. * Revert "[flue] Extract model constants into lib/models.ts" This reverts commit 23ab445bfeb550adeb5f1f719286261c596c8368. * [flue] Extract style-guide result types/schemas into lib/style-guide-results.ts Move StyleGuideFindingFromModelSchema, StyleGuideResultFromModelSchema, StyleGuideFinding, StyleGuideResult, and assignFindingIds out of the workflow file into a shared lib. style-guide-review.ts re-exports the public types; code-review-orchestrator.ts imports directly from lib. * style: format * [flue] Extract style-guide workspace hydration into lib/style-guide-hydration.ts * style: format * [flue] Extract style-guide fan-out mechanics into lib/style-guide-fanout.ts * style: format * [flue] Extract code-review diff/state helpers into lib/code-review-diff.ts and lib/code-review-state.ts * style: format * [flue] Extract code-review comment rendering into lib/code-review-render.ts * style: format * [flue] Extract GitHub webhook parsing helpers into lib/github-webhook.ts * style: format * [flue] Extract spam-filter domain helpers into lib/spam-filter.ts * style: format * [flue] Extract Dependabot review helpers into lib/dependabot-review.ts * style: format * [flue] Fix redundant R2 GETs in full hydration mode and misleading acted:true on dispatch failure --------- Co-authored-by: cloudflare-docs-bot[bot] <cloudflare-docs-bot[bot]@users.noreply.github.com>github.com-cloudflare-cloudflare-docs · ee2cf738 · 2026-06-15
- 1.2ETVfeat: add /rebase command to cloudflare-docs-bot (#32121) * feat: add /rebase and /rebaseWithConflicts slash commands to cloudflare-docs-bot * chore: fix lint errors (unused imports, misleading emoji char class) * fix: address code review findings on rebase workflow * fix: address second round of code review findings on rebase workflow * fix: address third round of code review findings on rebase workflow * fix: address fourth round of code review findings on rebase workflow * fix: handle production-side renames in AI conflict resolution path * fix: separate conflict read/write paths and deduplicate tree updates * fix: address sixth round of code review findings on rebase workflow * fix: distinguish permanent vs transient errors in polling, remove duplicate JSDoc * fix: address human reviewer findings (binary files, conflict assertion, fork detection, dead code) * fix: address final review polish (fork null, JSON parse, rename prompt, commit msg, mode, confidence) * fix: fall back to previousPath for mode lookup on renamed conflict files * feat: drop raw API error from halted-conflict, react 👍/👎 based on outcome * feat: improve AI confidence prompt, surface model reason on downgrade * feat: convert /rebaseWithConflicts resolver to Flue agent with bounded tools and skill * fix: address code review findings on rebase agent and tools * fix: extract paginateCompare, fix rate-limit 403, 300-file guard, in-progress error handling, backtick strip, groot-preview, stale JSDoc * fix: token error handling, Retry-After clamping, marker regex, SHA validation, confidence reason * Fixed SHA regex; reviewed PR #32121. Co-authored-by: mvvmm <mvvmm@users.noreply.github.com> * fix: guard fetch errors, binary conflicts, production file cap, duplicate marker, JSDoc * feat: collapse /rebase and /rebaseWithConflicts into a single /rebase command * chore: remove mode field from rebase workflow payload * fix: integer validation for payload IDs, strip stale metadata in render fallback --------- Co-authored-by: ask-bonk[bot] <ask-bonk[bot]@users.noreply.github.com> Co-authored-by: mvvmm <mvvmm@users.noreply.github.com>github.com-cloudflare-cloudflare-docs · 6dde8fa4 · 2026-07-20
- 0.6ETVfeat: add vitest-evals agent evals for Flue docs bot (#32371) * flue: add vitest-evals agent evals with HTTP harness - Mount 5 reviewable agents at /eval/agents/:name behind DOCS_FLUE_INTERNAL_TOKEN - Custom createHarness adapter: POSTs { kind: 'user', body, initialData } to the agent HTTP endpoint, polls ?view=history until settled, extracts useDataWriter output + tool-call transcript - 10 eval cases across 5 agents: style-guide, conventions, spam-filter, reconcile, code-review - vitest.evals.config.ts: serial execution, 2min timeout, vitest-evals reporter - pnpm run flue:evals: starts dev server, runs evals, tears down - CI evals job in flue-ci.yml (skips forks, uploads results artifact) - @flue/sdk nightly matching other Flue packages * fix: use run-evals.ts script in CI with NODE_OPTIONS and --host - run-evals.ts: add NODE_OPTIONS=--max-old-space-size=8192 and --host flag - run-evals.ts: accept EVALS_CMD env var to switch between evals and evals:json - CI: replace manual server management with pnpm run flue:evals - CI: add if-no-files-found: ignore to upload step * fix: generate ephemeral token when DOCS_FLUE_INTERNAL_TOKEN is not set CI doesn't have the secret configured, so generate a random UUID per run and pass it to both the dev server and the eval runner. This also removes the need for any GitHub secret for the evals job. * fix: require DOCS_FLUE_INTERNAL_TOKEN secret for CI evals Revert ephemeral token generation. The token must be a real secret configured in GitHub repo secrets, matching the value in .flue/.env used for local dev and deployment. * fix: add CLOUDFLARE_API_TOKEN for remote AI binding in CI The @cloudflare/vite-plugin needs CLOUDFLARE_API_TOKEN to start the remote proxy session for the Workers AI binding in non-interactive environments. This secret already exists in GitHub (used by bonk.yml). * fix: revert DOCS_FLUE_CF_TOKEN mapping — not the same as CLOUDFLARE_API_TOKEN * fix: write temp .dev.vars so Vite plugin passes token to Worker env in CI * fix: gitignore .dev.vars and clean up on all exit paths * fix: inject DOCS_FLUE_INTERNAL_TOKEN via vite config vars instead of temp file * fix: gate eval routes behind eval-only flag and fix flue() ordering * fix: address code review findings in eval harness, run-evals, and eval fixtures - CR-05e7a2d07fd4: signal handlers now exit process (130/143) - CR-23f106b05580: null exit code from signal-killed evals treated as failure - CR-97bd650c24de: error handler on server spawn - CR-403793fb5932: remove misleading await on sync spawn() - CR-7cdbe6ebe90c: throw on failed/aborted agent settlement outcome - CR-ce21b70c73e1: include last history-fetch error in timeout message - CR-1432df3ef9c4: encode agentName, normalize baseUrl trailing slashes - CR-baa534c160a3: type predicates instead of as casts - CR-a187fed8c4d2: fix invalid arrow function syntax in fixture - CR-87ca8a89dd92: provide PR template, filter assertions to title/desc findings - CR-86c59fe03330: assert confidence is medium or high, not just not-low - CR-11f19caad313: replace non-null assertions with shape guards - CR-b636760451a7: pin upload-artifact to SHA - CR-4d234e71f0a4: gitignore vitest-results.json * fix: handle non-terminal settlement timeout and assert ignored finding id - CR-5eb2ae9c8a04: throw timeout error when history fetches succeed but agent never reaches a terminal settlement before the deadline - CR-38f31aa30e72: assert ignored_by_reviewer[0].id is SG-bbb222 and reviewer_note is non-empty * fix: use terminal settlement that caused loop break, not settlements.at(-1) CR-97f3e0151e02: If the last settlement is non-terminal while an earlier one is terminal, settlements.at(-1) would misdiagnose a settled run as a timeout. Use findLast with the terminal condition instead. * fix: strengthen eval assertions and add missing eval cases - code-review: assert rule/severity/path/line on existing case, add clean pass case - conventions: assert rule/severity on existing cases, add scope-accuracy case - style-guide: assert rule/severity/path/line on existing case, add body H1 case - spam-filter: add support-request off-topic case, add PR-with-real-diff pass case - reconcile: add weak-comment case (finding stays active) - AGENTS.md: fix harness description (?wait=result -> fire-and-forget + poll), update coverage table to match new cases * fix: broaden eval assertion regexes for model vocabulary variance - code-review: match fire/discard/floating/ignored in rule text (model uses 'fire-and-forget fetch result discarded') - code-review clean pass: assert no false-positive on same issue class rather than zero findings (model nitpicks even clean code) - conventions: match product/area/prefix in rule text for title finding (model uses skill's Rule 1 name, not 'title') - AGENTS.md: update coverage table wording * fix: address code review findings in eval harness and fixtures - CR-ad06158bb788: Extract isTerminalSettlement helper, reuse terminal from loop - CR-e8ee85ef67fe: Fix addedLines/fileContent indentation and line numbers in code-review eval - CR-69bcc2686126: Add word boundaries to rule-name regexes in code-review eval - CR-5ca948bd4c35: Tighten titleFinding to match only title-specific terms - CR-7a376ee81538: Distinguish scopeFinding from descFinding with scope-specific terms - CR-8277af305fa7: Expect conservative is_spam=false for off-topic support requests - CR-f05fa98f6558: Anchor reason regex with word boundaries in spam-filter eval - CR-1af2a86c6f00: Reuse shared PR constant in style-guide eval - CR-bfd3551d062a: Add missing line assertion for H1 finding in style-guide eval * fix: lower review fan-out concurrency to 2 and remove dead env helper - CODE_REVIEW_CONCURRENCY: 5 → 2 - STYLE_GUIDE_CONCURRENCY: 5 → 2 - Delete unused envPositiveInt helper (lib/env.ts) — no imports, no tests * fix: route CI eval model calls through docs-flue AI Gateway DOCS_FLUE_AI_GATEWAY_ID was missing from the evals job env, so CI model calls bypassed the gateway and went directly to Workers AI. * fix: use DOCS_FLUE_AI_GATEWAY_ID secret instead of hardcoded value * fix: accept either is_spam verdict for off-topic support request eval The model may return is_spam:true or false for a misplaced support request. Assert only that the reason identifies it as off-topic/ support-related, not the specific verdict. * fix: expect is_spam:true for off-topic support request Off-topic support requests should be closed with the redirect comment. Revert CR-8277af305fa7 — it conflated spam with off-topic. The bot treats both the same: is_spam:true triggers close, with different comment/label based on the reason. Keep the word-boundary fix on the reason regex. * fix: address code review findings on eval suite - Forward DOCS_FLUE_AI_GATEWAY_ID into Worker vars during eval runs - Align code-review fixture addedLines line number and indentation with fileContent - Tighten conventions title assertion to check evidence/suggestion, not just rule - Tighten conventions scope assertion to require scope-specific terms, not generic 'change' - Skip CR-ad06158bb788 (already fixed on branch)github.com-cloudflare-cloudflare-docs · 19966009 · 2026-07-30
- 0.6ETVchore: upgrade Flue to 0.9.1 and isolate into its own workspace (#31240) * chore: upgrade Flue bot to 0.9.1 * regenerate pnpm lock * fix: pin Vite for Astro checks * fix: remove unused Flue workflow id * chore: isolate Flue into its own pnpm workspace * chore: move flue.config.ts into .flue/ and ignore generated vite cache * chore: remove root flue.config.ts * chore: format eslint.config.jsgithub.com-cloudflare-cloudflare-docs · 40a5d9a1 · 2026-06-04
- 0.6ETVfeat: add Dependabot review workflow to docs bot (#31258) * feat: add Dependabot review workflow with GitHub API-backed repo tools * fix: remove stale junk from wrangler.jsonc * chore: empty stale R2 keys list * fix: summary table at top, per-package details collapsed * style: format * fix: address PR review — reaction swap, empty packages guard, dedup fetchPrAuthor, fix JSDoc --------- Co-authored-by: cloudflare-docs-bot[bot] <cloudflare-docs-bot[bot]@users.noreply.github.com>github.com-cloudflare-cloudflare-docs · 67600b5d · 2026-06-05
- 0.5ETVfeat: add unit tests for trusted flue functions (#32186) * feat: add unit tests for trusted flue functions * fix: resolve typecheck and eslint issues in test files * fix: correct malformed hunk headers in diff fixtures * docs: add Testing section to .flue/AGENTS.mdgithub.com-cloudflare-cloudflare-docs · e30a7f1b · 2026-07-21
- 0.5ETV[Flue] Add image style-guide rules and read_repo_file to style-guide agent (#32488) * [Flue] Add image style-guide rules and read_repo_file to style-guide agent * [Flue] Clarify public/ vs src/assets/ guidance for images * [Flue] Mock read_repo_file in evals via Vite alias instead of fake SHA The style-guide agent's read_repo_file tool was failing in CI evals because HEAD_SHA was a fake value (abc123def456), causing GitHub API 404s. The agent would loop trying to resolve context and not produce findings. Fix: add an eval-only mock of makeReadRepoFileTool that returns synthetic file content from a fixture map keyed by ref. Wire it via a Vite plugin that redirects only style-guide-file.ts's import of github-repo-tools to the mock, only when DOCS_FLUE_AGENT_EVALS=1. Production agent and tool code are untouched. All 9 style-guide evals pass, including the previously failing 'flags a raw <img> tag' case. * [Flue] Update rule-authoring guidance: agent can now read full file context * [Flue] Soften rule-authoring examples guidance to prefer conciseness * [Flue] Use exact basename match for eval mock redirect * [Flue] Fix code-review eval: remove word boundaries from rule regexgithub.com-cloudflare-cloudflare-docs · be7b2c2c · 2026-08-03
- 0.5ETVfeat: add Flue spam and off-topic filter agent (#30832) * chore: ignore .worktrees/ directory * Revert "chore: ignore .worktrees/ directory" This reverts commit 4c311f351c244e78bb448e8df9407b289a92ad9f. * feat: add Flue spam-filter agent for GitHub issues and PRs * chore: rename Flue spam and off-topic filter * fix: address Flue filter review feedback * just-bash is needed by flue * add observability * deploy should sync skills * add logging to spam agent * add more loggings * disable invocation logs * enable traces * better log messages * disable traces * fix eslint * ignore flue dist in eslint * add urls to more logs * fix: isolate Flue filter sessions * fix: improve Flue orchestrator verdict logs * chore: migrate Flue to 0.7, add flue.config.ts, fix local dev * [Flue] Handle reopened and ready_for_review events in spam filter * chore: fix prettier formatting in orchestrate.ts * [Flue] Comment out low-value webhook received/ignored logs * [Flue] Add spam/off-topic labels when closing issues and PRs * chore: remove unused agents dependency * chore: restore agents dependency (required by Flue generated entry)github.com-cloudflare-cloudflare-docs · 71b09d2a · 2026-05-19
- 0.4ETVfix: self-heal Flue incremental review diff on rebase and upstream merges (#32070) * fix: self-heal flue incremental review diff on rebase and upstream merges The code-review and style-guide specialists computed their incremental diff as a three-dot compare of the last-reviewed head SHA against the current head. That is only correct when the branch is a clean forward extension of the last-reviewed SHA. After a rebase/force-push the old SHA is orphaned, so the compare's merge-base regresses to the old fork point and the delta sweeps in every upstream commit the branch absorbed — the review then flags findings in files the PR never touched. A production->PR merge ("Update branch") has the same effect while still reporting status: ahead. The prior self-heal only fired on a 404 (base SHA garbage-collected), so neither the rebase nor the merge case was covered. Add fetchFilesForDiffMode (lib/diff-fetch.ts), shared by both specialists, which trusts the incremental delta only when the compare succeeds, its status is ahead/identical, and every file in the delta belongs to the PR's net diff. Any violation self-heals to the full PR diff. comparePullRequestHeads now returns the compare status/ahead_by/ behind_by to support this. * fix: paginate GitHub file/compare lists and encode compare refs Address review findings on the diff self-heal: - getPullRequestFiles now follows Link-header pagination instead of fetching a single per_page=100 page, so the PR net-diff set used by fetchFilesForDiffMode's containment check is complete for PRs with more than 100 changed files. - comparePullRequestHeads paginates the compare file list (deduping by filename, since the compare endpoint paginates over commits and can repeat files across pages) and captures status/ahead_by/behind_by from the first page. This keeps the incremental delta and the upstream-file self-heal decision from being based on a truncated first page. - The compare base/head refs are URL-encoded (preserving '/') so refs with special characters produce a well-formed request.github.com-cloudflare-cloudflare-docs · e5652f8c · 2026-07-17
- 0.4ETV[flue] In-process review fan-out, native skill bundling, and R2 reduction (#31516) * [flue] Replace style-guide child-workflow fan-out with in-process sessions Collapse the per-file style-guide review from N child workflows (admitted over HTTP + Durable Streams long-poll) into concurrent sessions within the code-review orchestrator's own Durable Object. One harness over a single shared workspace, hydrated once, with one session per file fired via a concurrency pool; a single file's failure degrades to an empty result instead of aborting the whole review. This removes the separate child-workflow DOs that were the unit getting evicted mid-poll (the interruption that failed PR #31514), and deletes the admit/poll plumbing (lib/poll-run.ts retained for the spam-filter gate). - Add lib/style-guide-inproc.ts (hydrate-once + per-file session fan-out) - Rewrite orchestrator fan-out to call runStyleGuideReviewInProcess - Delete lib/style-guide-fanout.ts (only the orchestrator used it) - Retire the style-guide-review workflow + its DO class (v4 deleted_classes migration) * [flue] Bundle skills + references in build; stage diff in Workspace; shrink R2 to per-PR state Adopt Flue's native skill mechanism instead of fetching skill/reference content from R2 at runtime, and stage the per-run PR diff directly in the shared Workspace now that review runs in-process. - Import all four skills (style-guide-review, reconcile-code-review, spam-and-off-topic-filter, dependabot-review) with { type: "skill" } and register them on their agents; drop the runtime R2 SKILL.md fetches and workspace writes. - Move the style-guide reference rules into the skill directory so they ship as packaged skill resources; rewrite SKILL.md to read them via the read tool at the advertised packaged paths (patch parsing stays on the code tool). Manifest file paths updated to skill-root-relative. - Replace writeDiffToR2 with writeDiffToWorkspace: the orchestrator writes manifest/pr/patches straight into the shared Workspace; delete the R2 hydration (lib/style-guide-hydration.ts) and the comments.json round-trip (comments already reach reconcile via in-memory args). - Remove the obsolete content-sync tooling (bin/sync-agents.ts, bin/sync-skills.ts) and drop the sync step from flue:deploy. R2 is retained only for cross-run per-PR state (review-{sha}.json snapshots and the auto-review counter); no content is pushed to R2 on deploy anymore.github.com-cloudflare-cloudflare-docs · 454a3ab0 · 2026-06-17
- 0.4ETVchore: add contributing router skill, consolidate authoring skills (#31501) * [Chore] Add contributing router skill, consolidate authoring skills Introduce .agents/skills/contributing as the single entry point for contributing to the docs. It routes to task-specific references and absorbs the pr, changelog, docs-review, and code-review skills. - Add SKILL.md router with ground rules, intake, task index, validation - Add writing-docs, content-types, choosing-components, and information-architecture references - Move pr/changelog/docs-review/code-review into contributing/references - Remove the changelog, pr, review-code-examples, and styleguide commands and their dangling symlinks; adopt a skill-first approach - Update AGENTS.md to document the contributing skill * style: format * [Chore] Broaden contributing skill description to trigger on PR actions * [Chore] Add PR-sync guidance to pr.md; keep ground rules minimal * [Chore] Tighten contributing skill: delegate style rules, refine safety wording * [Chore] Make component selection exhaustive; add Type/MetaInfo, Icon, RSSButton, Example to catalog * style: format * [Chore] Align component catalog with styleGuide.component sync check --------- Co-authored-by: cloudflare-docs-bot[bot] <cloudflare-docs-bot[bot]@users.noreply.github.com>github.com-cloudflare-cloudflare-docs · f153fab8 · 2026-06-16
- 0.4ETVConvert AI model docs UI from React to native Astro (#32343) * Convert AI model docs UI from React to native Astro Breaks out the UI-only changes from PR #30505 so the middlecache PR can focus solely on data loading. Catalog filter controller: - Replace the large ModelFilters.tsx React island (449 lines) with a vanilla JS <script> that owns filter/sort/URL state and re-flows the corner-mark grid — no React state management needed - Split the old island into small, self-contained React islands: FilterDropdown/FilterDropdownWrapper (multi-select) and SortSelect/SortSelectWrapper (sort order) that fire CustomEvents - All islands restyled to Nimbus design tokens (border-border, bg-card, text-foreground, etc.) matching the old island's styling Model detail page: - Replace plain <h2 id> section headings with AnchorHeading so they get the .heading-wrapper anchor link structure from the rehype pipeline - Extract inline Open/Download SVGs into SchemaFileLinks.astro SchemaDisplay: - Replace Date.now() schemaId with a stable hash of the schema JSON so sessionStorage expand/collapse state persists across builds ModelFeatures: - Fix stale links: /workers-ai/glossary/ → /workers-ai/platform/glossary/ - Fix stale link: /workers-ai/function-calling → /workers-ai/function-calling/ * Address code review findings (CR-446f, CR-44f4, CR-2232, CR-d5d3, CR-781f, CR-fa02, CR-1cec, CR-ce42) Security: - Replace set:html JSON injection in <script> with data-* attribute (Astro escapes attribute values, preventing </script> breakout) Accessibility: - Add aria-label to SchemaFileLinks open/download icon-only links - Add aria-label to function-calling external link in ModelFeatures Correctness: - Lowercase heading slugs in headings array + AnchorHeading calls so TOC anchor links match the IDs github-slugger produces - Remove false CustomEvent claim from SortSelect.tsx JSDoc (the wrapper dispatches events, not the presentational component) - Remove leading space in countLabelEl.textContent (doubled with the existing {" "} separator) - Replace URLSearchParams.size with toString() === '' for older browser compatibility Code quality: - Extract shared link class string to const in SchemaFileLinks.astrogithub.com-cloudflare-cloudflare-docs · 6f94029c · 2026-07-27
- 0.3ETVchore: consolidate agent skills and create shared style guide references (#30735) * chore: consolidate agent skills and create shared style guide references - Add .agents/references/style-guide.md — canonical writing and formatting rules - Add .agents/references/components.md — full MDX component catalog with props - Add .agents/references/procedures.md — step-writing rules for how-tos and tutorials - Update changelog, docs-review skills to reference shared style guide - Remove content-rules.md (content merged into shared reference) - Fix changelog skill code examples section (WranglerConfig/TypeScriptExample rules) - Fix docs-review quick-reference table (adds PackageManagers row, removes duplicates) - Rename verify-dependabot-pr → dependabot-review - Remove npm-to-pnpm skill (outdated) - Update AGENTS.md: remove duplicated component docs, add skills/references index, fix description field annotation * chore: add missing components to agent reference (Badge, Card, YouTube, Stream, APIRequest, CURL, WranglerCommand, Markdown) * chore: add prebuild check to keep components.md in sync with style guide pages * chore: document all remaining components in agent reference, remove exclusion list from check script * chore: move component docs check to CI pre-build step, not package.json prebuild * fix: format check-component-docs.ts, add formatting reminder to AGENTS.md * chore: remove circular reference from components.md * chore: add bidirectional sync check for component docs, add missing styleGuide.component to badges.mdx * fix: remove confusing WranglerConfig carve-out from code-review skillgithub.com-cloudflare-cloudflare-docs · dc6d3ce5 · 2026-05-12
- 0.3ETVchore: clean up Flue routing and workflow state (#31409) * chore: clean up Flue routing and workflow state * chore: share Flue internal auth helpersgithub.com-cloudflare-cloudflare-docs · b0f7f7f1 · 2026-06-11
- 0.3ETVdocs: fix agent guidance and style-guide drift after Nimbus migration (#32495) - Replace stale 'Expressive Code' references with 'Astro Code' across agent references, Flue review rules, and live style-guide pages - Replace 'Starlight' with 'Nimbus' in FileTree references - Fix src/content/products/ paths → src/content/directory/ in AGENTS.md and contributing skill IA guidance - Add bun to PackageManagers guidance (npm/yarn/pnpm/bun) - Add glossary to valid pcx_content_type lists - Add .md to allowed file types in src/content/ - Fix prop drift: TypeScriptExample omitTabs, LinkButton icon boolean, ProductChangelog publish_future_dated_entry + numberOfEntries, AnchorHeading slug optional, Steps allows <Step> children, Stream showMoreVideos default false, ResourcesBySelector directory optional, Badge expanded variants, Plan enterprise type - Remove stale FeatureTable skipAvailability prop - Remove stale ExtraFlagDetails child-of-WranglerCommand guidance (slot machinery was dropped during Nimbus migration) - Fix SubtractIPCalculator to prefer barrel import from ~/components - Upgrade mandatory component violations from suggestion to warning in Flue code-blocks review rules - Remove nonexistent tags allowlist rule from Flue frontmatter ref - Add Step to Flue manifest.json component names for Steps - Make changelog products frontmatter optional (folder product is implicit) - Remove duplicate products row from AGENTS.md content collections tablegithub.com-cloudflare-cloudflare-docs · 42d0ccf9 · 2026-08-03
- 0.2ETVchore: consolidate astro-config.ts into root astro.config.ts (#32258)github.com-cloudflare-cloudflare-docs · 212881bb · 2026-07-22
- 0.2ETV[Docs] Prevent preview deployments from being indexed (#32467) * [Docs] Prevent preview deployments from being indexed Add anti-indexing measures to the preview Worker (worker/index.preview.ts) that apply to all preview deployments — both existing GitHub WFP previews and new GitLab Workers Preview URLs. Production (worker/index.ts) is unaffected. Changes to worker/index.preview.ts: - Override /robots.txt with Disallow: / and Content-Signal: ai-train=no, search=no, ai-input=no (no sitemap line) - Add X-Robots-Tag: noindex, nofollow, noarchive, nosnippet, noimageindex to every response - Inject <meta name="robots"> with the same policy into HTML responses via HTMLRewriter - Return 404 for /sitemap-index.xml and /sitemap-*.xml Test infrastructure: - Add wrangler.preview.test.json for preview Worker tests - Add 'Workers (Preview)' vitest project - Add worker/index.preview.worker.test.ts with 12 tests covering robots.txt, X-Robots-Tag, HTML meta injection, and sitemap blocking * [Docs] Fix weak element existence assertion in preview tests querySelector returns null (not undefined) when no match is found. toBeDefined() passes on null, so the assertion was misleading. Changed to not.toBeNull().github.com-cloudflare-cloudflare-docs · 523c8507 · 2026-07-31