Files
executus/examples/reviewer
steve a87e7d2c72
executus CI / test (pull_request) Failing after 3s
executus CI / test (push) Failing after 1m9s
fix: address verified gadfly P5 findings (canary robustness)
All 3 cloud models converged (all "minor" — example code, no blocking):
- Consolidate: a model whose every lens errored now reads "review incomplete",
  not a misleading "no issues found" (all 3 models). + test.
- Consolidate: swarm-cancelled (unattributed) cells now surface a "swarm
  cancelled — N cell(s) did not run" banner instead of vanishing (all 3). + test.
- main: io.ReadAll(os.Stdin) error is surfaced (all 3); a TTY stdin no longer
  hangs forever (TTY guard, minimax).
- providerOf: a bare tier name now keys its own PerKey bucket instead of all
  bare tiers collapsing onto "tier" (minimax, glm-5.2) — distinct tiers throttle
  independently.
- Review doc reworded (the closure, not fanout, carries per-cell errors).

Left as documented example-scope behavior: no per-cell timeout (caller supplies
ctx), unknown-severity → lowest rank (no crash).

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

examples/reviewer — the light-tier canary

A gadfly-shaped adversarial PR reviewer built on the executus core only — no batteries, no database, no host adapters. It exists to prove that the core is sufficient for a static-binary light host (gadfly's shape), and that such a host keeps a go.sum free of gorm/redis/discordgo/sqlite.

What it exercises, all from core:

Concern executus core piece
Env-driven model fleet + tier overrides config.Env + model.Configure
Tier resolution + failover model.ParseModelForContext
N models × M lenses swarm fanout.Run (with PerKey per-provider caps)
Structured findings per cell model.GenerateWith[T]
One report section per model, worst-verdict-led Consolidate (local)

Run

REVIEWER_MODELS=fast,thinking \
ANTHROPIC_API_KEY=sk-... \
go run ./examples/reviewer -diff "$(git diff HEAD~1)"

Config (all optional, REVIEWER_-prefixed env):

  • REVIEWER_MODELS — csv of tier names / provider/model specs (default fast)
  • REVIEWER_MODEL_TIER_<NAME> — override a tier's resolved spec
  • REVIEWER_MAX_CONCURRENT — total in-flight swarm cells (default 6)
  • REVIEWER_PROVIDER_CONCURRENCY — per-provider cap (default 3)

Test

reviewer_test.go runs the whole swarm against majordomo's fake provider (hermetic, no network) and asserts the consolidated verdicts. A go list -deps check in CI confirms the package pulls in no battery and no DB driver — the light-tier invariant.