Metadata-Version: 2.4
Name: progon
Version: 0.6.26
Summary: Run a project's tests on shared test VMs with one command; built for AI coding agents.
Author: rebaseandpanic
License-Expression: MIT
Project-URL: Homepage, https://github.com/rebaseandpanic/progon
Project-URL: Documentation, https://github.com/rebaseandpanic/progon/blob/main/client/docs/agent-runbook.md
Project-URL: Changelog, https://github.com/rebaseandpanic/progon/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/rebaseandpanic/progon/issues
Keywords: testing,test-runner,ai-agents,mutation-testing,cli
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# progon

progon runs a project's tests (unit, integration or mutation, in any language)
on shared test VMs with **one command**, and the agent gets back **only what it
needs**: the verdict and counters, and the failed tests with their location and
cause. No logs to read, no context wasted. Common test frameworks and mutation
tools have dedicated adapters ([supported today](#supported-today-and-planned));
anything else runs through the shell adapter, which reads the exit code, TAP or
JUnit XML.

## Quick start

Give your agent [client/docs/agent-runbook.md](client/docs/agent-runbook.md)
(`progon help start`) and the addresses of your test VMs. It installs the
client, writes the project's profile and makes the first run.

The client alone: `uv tool install progon` or `pipx install progon` (PyPI), or
`progon.pyz` from the [latest release](https://github.com/rebaseandpanic/progon/releases/latest).

- No VMs yet: install progon-server on one, [server/docs/install.md](server/docs/install.md).
- Describe a project by hand: [client/docs/project-setup.md](client/docs/project-setup.md)
  (`progon help setup`).

## Why

progon is built for one scenario: AI agents that run tests themselves while
they develop, including mutation tests on the diff, instead of pushing and
waiting for a CI pipeline on a runner.

Doing that without progon hurts in three ways:

- **The development machine.** Test suites, databases in containers and
  mutation runs need a lot of CPU, memory and disk. Several agents testing at
  once on a laptop or a dev host slow it down or take it down.
- **The agent's context.** An agent that runs tests itself reads the whole
  output: build logs, stack traces, thousands of passing tests. That burns
  tokens and pushes the actual work out of its context.
- **Mutation runs are a black box.** A mutation tool often prints nothing
  useful until it finishes, so the agent cannot tell how many mutants are done
  and how many are left, and either waits blindly or polls logs.

progon's answer:

1. Set up one or more test VMs and install progon-server on them.
2. Each project's agent writes a declarative profile, `.progon/<project>.toml`,
   once.
3. From then on a test run is one command. progon picks a VM, sends the
   source, runs the tests in a container, collects the results and cleans up.
   The agent gets a short summary instead of the logs; details come only on
   request, and live progress (including done/total and time left for mutation
   runs) is one more command.

The context stays small, the development machine stays free, and the tests run
where there is room for them.

## What the agent gets

- **One command runs the tests.** VM choice, source upload, the run, result
  collection and cleanup happen inside; the agent does none of it by hand.
- **Only what it needs comes back.** The verdict, the counters and one line per
  failed test with its location and cause. Details only on request.
- **The context stays clean.** No build logs, no thousands of passing tests, no
  log polling: progress is one more command with a one-line answer.

## How it works

Terms used below: a **kind** is one named way to run a project's tests in its
profile (`unit`, `integ`, `mutation`, ...); **narrowing** is the optional
selection after the kind (packages, filters, test ids, files); a **grant** is a
VM's reservation of CPU, memory and disk for one run; the **broker** is a
per-grant Docker API proxy through which a run starts its own containers.

- **Quotas.** Every run holds a grant for the CPU, memory and disk it asked
  for; a VM admits a run only when it has room, so many agents can test at once
  without overloading a VM. A run that does not fit goes to another VM or, with
  `--quota-wait`, waits for room.
- **Any number of VMs, no centre.** VMs never talk to each other. The client
  asks every VM in its `vm.hosts` for free room at once and takes the one with
  the most; adding capacity is one more VM in that list.
- **No daemon.** progon-server is a command called over ssh; a grant whose
  client died ends once its lease has passed, at the next `acquire`, `gc` or call
  for that grant on that VM, and its containers, networks, volumes and workdir are removed.
- **Disk.** The server keeps a reserve free, counts the disk budgets of live
  grants and refuses image preparation below a floor.
- **Locally** progon only reads git, packs the snapshot, talks ssh and parses
  the downloaded reports.

## Usage

```
progon <project> <kind> [narrowing...]    # e.g. progon api unit ./internal/search/
progon status <run>    progon wait <run>    progon show <run> --failed
```

A real run of this repository's own tests:

```
$ progon client unit tests.test_summary
run client-unit-20261126-211906-689a: client unit tests.test_summary
run client-unit-20261126-211906-689a: on vm2, grant 60c929563207485ca00ee70d3aae9b42
progon client unit: GREEN (tests.test_summary, vm2, 7s)
  tests.test_summary: 40 passed, 0 failed
total: 40 passed, 0 failed in 1 suite(s)
```

A failed test adds one line, `FAIL <suite> <test>: <first assertion line>`, and
`progon show <run> --failed` prints its details. The exit code is the verdict:
0 green, 1 failed, 2 infrastructure or cancelled, 3 timeout, 64 usage.

## Features

- One command per run; narrowing in the stack's own terms (packages, filters, test ids, files)
- A short summary, exit code = verdict; a run that executed no test is never green
- Details only on request: `progon show <run> --failed | --skipped | --infra`, any view as `--json`
- One-line live status, with done/total and time left for mutation runs
- Mutation on the diff (`--since`), split across VMs (`--split N|auto`) with one combined score
- `--baseline-without fix.patch`: proves the new tests fail without the fix
- Profile and targets checked before any VM is used (`progon check`)
- Fixtures (databases, queues, stubs) and `docker` / `docker compose` / `docker build` inside the run through a per-grant Docker broker
- Hardened run container: no capabilities, no network unless asked, the runner's uid
- The client is one file and updates itself from the VMs

Every key and option: [client/docs/profiles.md](client/docs/profiles.md).

## Supported today and planned

✅ works today · 🗓 planned. "diff" means `--since` (mutate only changed lines),
"incremental" means results are kept between runs.

| Stack | Tests | Mutation |
|---|---|---|
| Go | ✅ `go test -json` | ✅ gomutants (diff, incremental) |
| .NET | ✅ `dotnet test` on VSTest or Microsoft.Testing.Platform: xUnit, MSTest; NUnit goes through the same TRX path but has no test fixture yet · 🗓 TUnit | ✅ Stryker.NET (diff) on VSTest; `--test-runner mtp` is passed through as is · 🗓 incremental baseline |
| JS/TS | ✅ Vitest, Jest · 🗓 Node test runner, Playwright Test, Mocha, Deno, Bun | ✅ StrykerJS (diff, incremental) |
| Python | ✅ unittest, pytest · 🗓 Robot Framework | ✅ mutmut · 🗓 Cosmic Ray (diff, incremental) |
| Anything else | ✅ shell adapter: exit code, TAP or JUnit XML | — |
| JVM (Java, Kotlin) | 🗓 Gradle, Maven (JUnit 5/6, Kotest, Spock) | 🗓 PIT |
| Rust | 🗓 cargo-nextest | 🗓 cargo-mutants (diff) |
| PHP | 🗓 PHPUnit, Pest | 🗓 Infection (diff) |
| Ruby | 🗓 RSpec, Minitest | |
| Scala | 🗓 sbt, Mill | 🗓 Stryker4s |
| Dart / Flutter | 🗓 `dart test`, `flutter test` | |
| C / C++ | 🗓 CTest, GoogleTest, Catch2 | |
| Elixir / Erlang | 🗓 ExUnit, Common Test | |
| Swift | 🗓 `swift test` | |

Also planned: disk autonomy on the VMs (eviction of unused runner images,
free-space thresholds, disk state in `status`), a pool list served by the VMs
so a client needs one address.

## progon, CI and local runs

| | CI pipeline | Tests on the dev machine | progon |
|---|---|---|---|
| Feedback | push, then wait for a runner | immediate | immediate, one command |
| Load on the dev machine | none | all of it | none |
| What the agent reads | job logs | the whole tool output | a short summary; details on request |
| Mutation on the diff | rarely set up | possible, heavy | `--since`, `--split` across VMs |
| Progress of a long run | job log | tool output, often none for mutation | one line: done/total, time left |
| Many agents at once | runner queue | they slow each other down | quotas on shared VMs |
| Cleanup | runner | by hand | the grant cleans up after itself |

## Requirements

- **Client:** Python 3.11+, `git`, `ssh` and `scp` with key-based access to the VMs.
- **VM:** Linux on amd64, rootful Docker at `/var/run/docker.sock` (Engine 26.0+ for binds below `/work/repo` or `/work/results` through the broker) with the
  compose plugin, Python 3.11+, an ssh user with Docker access (no root needed
  for progon itself). BuildKit runs additionally need subordinate ids and unprivileged user namespaces.
  Details: [server/docs/install.md](server/docs/install.md).

## Limitations

- Only `linux/amd64` images and builds.
- Rootless Docker on the VM is not supported.
- progon shares VMs between trusted agents: ssh access to the server user is
  the trust boundary, and Docker access is root on the host. It is not a
  sandbox for untrusted code.
- There is no server-side queue: waiting for room is the client polling, up to
  `--quota-wait`.

## Documentation

| Document | For | What |
|---|---|---|
| [README.md](README.md) | everyone | this page: what progon is, how it works, features, requirements, limitations |
| [client/README.md](client/README.md) | users, tools | the `progon` CLI, output contract, `show` views, exit codes |
| [server/README.md](server/README.md) | operators, contributors | progon-server commands, state, draining a VM, the end-of-run fence |
| [client/docs/agent-runbook.md](client/docs/agent-runbook.md) | a user's agent | from nothing to a first run (`progon help start`) |
| [client/docs/project-setup.md](client/docs/project-setup.md) | a project's agent | writing `.progon/<project>.toml` (`progon help setup`) |
| [client/docs/profiles.md](client/docs/profiles.md) | everyone | full profile reference |
| [client/docs/configuration.md](client/docs/configuration.md) | users | client config: VMs, owner, environment variables, updates |
| [client/docs/model.md](client/docs/model.md) | tools | verdicts and the normalized `report.json` |
| [client/docs/adapters.md](client/docs/adapters.md) | contributors | adding a test stack or mutation tool |
| [client/docs/verification.md](client/docs/verification.md) | contributors | checking a change on real VMs |
| [server/docs/install.md](server/docs/install.md) | operators | installing progon-server on a VM |
| [server/docs/protocol.md](server/docs/protocol.md) | contributors | protocol 1 between client and server |
| [AGENTS.md](AGENTS.md) | contributors | layout, rules, build and tests of this repository |
| [CONTRIBUTING.md](CONTRIBUTING.md) | contributors | running the tests without VMs, checks, bug reports, pull requests |
| [SECURITY.md](SECURITY.md) | everyone | trust model, what a run is hardened against, reporting a vulnerability |
| [CHANGELOG.md](CHANGELOG.md) | everyone | releases of the client and the server |
| [RELEASING.md](RELEASING.md) | maintainers | versions, tags, how a release is made, release files |

## License

MIT, see [LICENSE](LICENSE).
