Files
gadfly/.gitea/workflows/adversarial-review.yml
T
Steve Dudenhoeffer 79da1bfde3
Build & push image / build-and-push (pull_request) Successful in 8s
Adversarial Review (Gadfly) / review (pull_request) Successful in 14m47s
feat(reusable): ship the curated swarm as the default config consumers inherit
Make the reusable workflow's input defaults BE the standard Gadfly swarm so a
consumer subscribes by just calling it (no `with:` block) and inherits:
- models: 3 strong cloud (minimax-m3, glm-5.2, deepseek-v4-pro) + Claude Code
  (sonnet, opus, opus:max)
- specialists: the 5-lens default suite (security, correctness, maintainability,
  performance, error-handling)
- provider_concurrency: ollama-cloud=3,claude-code=3 (all three claudes at once)
- timeout_minutes default 45 -> 90 (5 lenses x 2 passes over a slow lane)

The default is opinionated (needs OLLAMA_CLOUD_API_KEY + CLAUDE_CODE_OAUTH_TOKEN);
consumers override `models:` for cloud-only / other providers. gadfly's own
caller is slimmed to inherit (only allowed_users remains). examples/reusable.yml
keeps a cloud-only `models:` override so a public copy works with just the
Ollama key. README/CLAUDE.md updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 22:05:31 -04:00

55 lines
2.1 KiB
YAML

# Gadfly reviewing its OWN PRs — a thin CALLER of the reusable workflow
# (.gitea/workflows/review-reusable.yml), dogfooding the "subscribe" path. The
# reusable holds the image pin, env plumbing, AND the default swarm; this file
# holds only the triggers, the actor gate, secret forwarding, and allow-list.
#
# Advisory only — never blocks a merge. It inherits the default swarm: 3 cloud
# models + Claude Code (sonnet, opus, opus:max), 5-lens suite, 3 claudes at once.
name: Adversarial Review (Gadfly)
on:
pull_request:
types: [opened, reopened, ready_for_review]
issue_comment:
types: [created]
workflow_dispatch:
inputs:
pr_number:
description: "PR number to review"
required: true
permissions:
contents: read
issues: write
pull-requests: write
concurrency:
group: gadfly-${{ github.event.issue.number || github.event.pull_request.number || github.event.inputs.pr_number }}
cancel-in-progress: true
jobs:
review:
# Security: only trusted users may trigger a secret-bearing run via a PR
# comment (pull_request + workflow_dispatch are already trusted). Mirrors
# the allowed_users input below, the in-container belt-and-suspenders check.
if: >-
github.event_name != 'issue_comment'
|| (github.event.issue.pull_request
&& (github.actor == 'steve'
|| github.actor == 'fizi'
|| github.actor == 'dazed'))
uses: ./.gitea/workflows/review-reusable.yml
# Least privilege: forward ONLY the secrets this swarm uses (cloud + Claude
# Code + findings telemetry), not `secrets: inherit`. GITEA_TOKEN is auto.
secrets:
OLLAMA_CLOUD_API_KEY: ${{ secrets.OLLAMA_CLOUD_API_KEY }}
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
GADFLY_FINDINGS_URL: ${{ secrets.GADFLY_FINDINGS_URL }}
GADFLY_FINDINGS_TOKEN: ${{ secrets.GADFLY_FINDINGS_TOKEN }}
with:
# Inherit the default swarm (3 cloud + Claude Code sonnet/opus/opus:max,
# 5-lens suite, all three claudes concurrent) from review-reusable.yml.
# Only the consumer-specific allow-list is set here.
allowed_users: "steve,fizi,dazed"