# mgf-test-web — ProofWarden

**The testing & CI authority console.** Per project, browse the test catalog, run
tests, watch them live, see full history, and start + watch CI — all through a
single entry point that *cannot* be bypassed.

The rule that defines the product: **a given test can never run twice at once**,
no matter how it was launched (CLI, this website, an AI agent, or CI). A per-project
resident **warden** is the *sole executor*; everyone submits run *requests*; nothing
else ever spawns a test. Single-flight is enforced **by construction**, via an atomic
**lease registry** (heartbeat + TTL + audited reclaim) — fail-closed when the warden
is down.

```
mgf-fedres (spine: schemas, sync engine, live NDJSON, run-records)
      |
mgf-test-web
  base : the warden broker + lease registry + testctl CLI + runner adapters
  |      (pytest-via-mtest, shell). FastAPI-free — CI installs this.
  [web]: the ProofWarden console (Catalog / Running / History / CI)
      ^
mgf-test-supervisor (mtest) — driven as a library in a child process
```

- **warden** — the resident broker (`testctl serve`); the only thing that runs a test.
- **testctl** — the CLI: `catalog`, `status`, `run`, `watch`, `cancel`, `ci start`, `serve`.
- **single-flight** — same test + same effective config relaunched → **coalesce** (attach,
  don't double-run); different work on a busy project → **queue**; warden down → **refuse**.

## Status

**A4 spike** — the single-flight core (lease registry + acquire decision + the warden).
Pre-implementation for the rest; see the plan + spec in `mgf-fedres/docs/planning/`.

## License

MIT © The Magogi Foundation
