Skip to content

Port the review swarm to a RelayFlow v2 flow in Cloud #470

Description

@AgentRelayBot

Problem

The review check has been failing on every open PR — #451, #455, #441 all fail identically, in the swarm's own posting step rather than on any code verdict:

Fetching patch for run <uuid>...
No changes to sync — the workflow did not modify any files.
##[error]Process completed with exit code 1

Reproducible across reruns with fresh swarm ids, so it isn't flaky infrastructure. Because it fails on every PR, it carries no signal: it can neither approve nor block, and in practice it gets merged over. .github/workflows/review-swarm.yml is disabled on pull_request until this is fixed — it still runs on workflow_dispatch.

Why it should move to v2

The swarm is built on RelayFlow v1, which is now deprecated in the CLI. review-swarm.yml drives it through:

response=$(agent-relay cloud run \
  ../gate-files/workflows/review-swarm.yaml --sync-code --json)
...
agent-relay cloud status "${{ steps.launch.outputs.run_id }}" --json

agent-relay cloud schedule / schedules now warn as deprecated (relay#1783), and the v1 surface is only kept alive because v2 has no hosted scheduling yet. Repairing the v1 wiring would be work spent on a surface we intend to retire.

The failure itself points the same way: the whole design assumes the swarm's product is a patch to sync back, so a review that correctly proposes no code changes ("the workflow did not modify any files") is treated as a failure. A v2 flow can return a structured verdict instead of a diff, which is what a review gate actually wants.

What v2 gives us

  • A flow authored in TypeScript with a typed result, rather than a YAML workflow whose only output channel is a patch
  • f.human for the cases where a reviewer genuinely needs a person — with flows answer to resolve the wait (flows#451)
  • The v2 kernel's durable suspension, instead of a 75-minute job polling cloud status on a 65-minute budget
  • One deployed artifact via flows deploy, instead of the gate-files checkout-from-main dance that exists to keep a PR from editing its own gate

Scope

  • Author review-swarm as a v2 flow (.flow.ts), returning a verdict object rather than a patch
  • Deploy it to Cloud and invoke it from CI via the v2 surface (agent-relay flows ...), not agent-relay cloud run
  • Preserve the wrapper-guard invariant: a candidate PR must not be able to weaken the gate that judges it (review-swarm-wrapper-guard.yml stays on pull_request_target reading from base)
  • Re-enable the pull_request trigger once the v2 path is green
  • Retire the v1 workflow and its swarm-*.sh scripts after the cutover

Context

Found while shipping the mounted product command groups. agent-relay file, agent-relay flows, and agent-relay sessions are live as of @relayfile/sdk@0.10.64, @relayflows/sdk@2.0.19, ai-hist@0.18.1.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    garden-readyScoped and ready for an agent to pick up

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions