[flue] In-process review fan-out, native skill bundling, and R2 reduction#31516
Conversation
Review⏸️ Automatic reviews for this PR are paused. This PR has already received 2 automatic reviews. To run another review, a codeowner can comment
✅ No style-guide issues found in commit CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
|
UnknownError: The operation timed out. |
|
@mvvmm Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
|
/bonk reaview |
Review of PR #31516Status: Approve — Clean infrastructure refactor with no blockers. ArchitectureIn-process fan-out ( The graceful-degradation behavior is well done: a single file's failure (catch + empty result) does not abort the pool, and the file is deliberately excluded from Native skill bundling correctly adopts Flue 0.11 patterns. Importing skills with Correctness & safety
Notable details
Non-blocking nits
Bottom line: This is a solid modernization that reduces complexity, eliminates a failure mode, and moves to native Flue 0.11 patterns. Ship it. |
|
Preview URL: https://bc3de138.preview.developers.cloudflare.com |
…sions 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)
…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.
da6d547 to
bc3de13
Compare
Summary
Infrastructure changes to the Flue-powered docs review bot (
.flue/) — no user-facing documentation content is changed. Modernizes the bot to current Flue (0.11) patterns in two related parts.1. Replace child-workflow fan-out with in-process sessions. The style-guide review previously fanned out into N child workflows, each admitted over HTTP and polled via Durable Streams. Each child was a separate Durable Object, so a single DO eviction mid-poll could terminalize a child and fail the whole review. The per-file review now runs as concurrent sessions inside the orchestrator's own Durable Object: one harness over a shared workspace, one session per file via a concurrency pool, with a single file's failure degrading to an empty result instead of aborting the review. The standalone
style-guide-reviewworkflow and its DO class are retired (v4deleted_classesmigration).2. Native skill bundling, Workspace-resident diff, and R2 reduction. Adopt Flue's native skill mechanism instead of fetching skill/reference content from R2 at runtime:
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 R2SKILL.mdfetches and workspace writes.SKILL.mdreads them via the nativereadtool at the advertised packaged paths (patch parsing stays on thecodetool).writeDiffToWorkspacereplaceswriteDiffToR2); delete the R2 hydration and thecomments.jsonround-trip (comments already reach reconcile via in-memory args).bin/sync-agents.ts,bin/sync-skills.ts) and drop the sync step fromflue:deploy.R2 is retained only for cross-run per-PR state (
review-{sha}.jsonsnapshots and the auto-review counter); deploy no longer pushes any content to R2.Validated with
tsc --noEmit,flue build --target cloudflare(reference rules confirmed bundled into the worker), andprettier. The one behavior-affecting change is the style-guide skill's reference loading (code tool → nativereadtool);alwaysreferences are confirmed working in local runs, with conditional/component references the remaining check.