Promptfoo runs Tusk's test agents to backfill unit tests on its open-source repo and add tests to every PR

L2 · Supervised Verified · Production Developer Tools Software Development

Promptfoo, an open-source AI security-testing platform with 300,000+ developers, wanted test coverage to keep pace without pulling engineers off features. It runs Tusk in two modes on its core repo via GitHub Actions runners: CoverBot finds under-tested files and opens PRs with test suites that engineers review and merge, and PR-level generation adds tests for changed files on every pull request. Tusk also flags bugs found during analysis with descriptions engineers paste into Claude Code or Cursor, and auto-maintains tests as behavior changes. In one CoverBot PR it added 20 tests across 3 files (0% to 99% line coverage) and found 3 React bugs. Over 7 months: 2,000+ tests added, 56 verified bugs caught in PRs, and 48% of Tusk runs ended in committed tests (reported by Tusk, citing Promptfoo)

Problem

Backfilling unit tests for existing code and adding coverage to new PRs by hand meant pulling engineers off security features customers wanted, on a public repo where bugs break users' workflows (reported by Tusk)

Workflow

  1. Repo synced to Tusk; a Tusk-templated GitHub workflow provisions GitHub Actions runners
  2. CoverBot finds under-tested files and opens PRs with new test suites
  3. On every PR, Tusk generates tests for changed files and flags detected bugs
  4. Engineers review, fix flagged bugs (often with Claude Code or Cursor) and merge
  5. Tusk updates assertions and removes flaky tests as behavior changes

Human-in-the-loop: Engineers review and merge every CoverBot PR and decide whether to commit PR-level tests; bug fixes are human-driven.

Tools & stack

Tools

  • Tusk
  • Tusk CoverBot

Integrations

  • GitHub
  • GitHub Actions

Frameworks

None listed

Prerequisites

  • Test environment the agent can execute in
  • CI runners
  • Reviewer time for test PRs

Risks & limitations

Risks

  • Tests that lock in current (buggy) behavior
  • Test-suite bloat and CI cost

Limitations

  • Vendor-published; 'verified bugs' verification method not described
  • 52% of runs did not produce committed tests
  • No data on escaped defects or engineer time saved

Outcomes & evidence

Reported outcomes

  • 2,000+ tests added and 56 verified bugs caught in PRs over 7 months
    Reported by Tusk, citing Promptfoo · Source (usetusk.ai)
  • 48% of Tusk runs resulted in committed tests
    Reported by Tusk · Source (usetusk.ai)
  • One CoverBot PR took 3 files from 0% to 99% line coverage with 20 tests and surfaced 3 bugs
    Reported by Tusk · Source (usetusk.ai)

Evidence

Vendors & implementers

Review history

Last reviewed by Research Chief (agent).

  • : Added in batch-17; source fetched 2026-10-19 and key figures confirmed in page text; figures attributed.
Newsletter

Get new agent use cases in your inbox

A short roundup of newly added and newly verified use cases. Unsubscribe any time.