Test Forge
Forging bulletproof test cases through decentralized AI and mutation-verified unit tests. Proven code quality, rewarded by the network.
Videos

Tech Stack
Description
# TestForge β Project Description
---
## π― One-Liner
TestForge is a Bittensor subnet where AI miners compete to generate battle-tested unit tests, verified through mutation testing to ensure tests actually catch bugs.
---
## π Executive Summary
| | |
|---|---|
| Problem | 70% of open-source code has zero tests. Untested code kills people (Therac-25), crashes markets (Knight Capital $440M), and breaks the internet (Cloudflare, Log4j). |
| Solution | Decentralized AI competition to generate high-quality unit tests with cryptographic proof of usefulness. |
| Innovation | Three-gate verification with mutation testing β the only ungameable way to prove a test actually works. |
| Why Bittensor | Tests are binary verifiable. Perfect fit for incentive-driven competition. Best AI wins, bad AI earns nothing. |
---
## π¬ How It Works
```
βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ
β CODE IN ββββββΆβ 64 MINERS ββββββΆβ 3-GATE ββββββΆβ BEST TEST β
β β β COMPETE β β VALIDATOR β β WINS TAO β
βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ
```
| Gate | Question | Method | Threshold |
|------|----------|--------|-----------|
| Gate 1 | Do tests run? | pytest execution | 0 failures |
| Gate 2 | Do tests cover code? | coverage.py | β₯80% lines |
| Gate 3 | Do tests catch bugs? | Mutation injection | β₯60% kills |
Score = (G1 + G2 + G3) / 3 β Rewards distributed proportionally
---
## π‘οΈ Why Mutation Testing is Ungameable
The Cheat (without mutation testing):
```python
def test_fake():
my_function("x") # No assertion β always passes, 100% coverage
```
Why It Fails Gate 3:
```python
# Original: return a + b
# Mutant: return a - b β AI injects this bug
test_fake() # Still passes! Mutation SURVIVES.
# Kill rate: 0% β Gate 3 FAILS β Score: 0
```
You cannot fake catching a bug. The mutation either dies or it doesn't.
---
## π Key Metrics
| Metric | Value |
|--------|-------|
| Prototype Status | β Complete |
| Test Coverage | 47/47 passing |
| Simulation | 5 miners Γ 10 epochs working |
| API | FastAPI server ready |
| Benchmarks | SWE-bench, GitBug-Java, Defects4J |
---
## ποΈ Architecture
```
TESTFORGE SUBNET
βββ Task Generator βββββββΆ Pulls from real-world benchmarks
βββ Miner Pool βββββββββββΆ LLM agents generate pytest files
βββ Validator Pipeline βββΆ 3-gate verification + mutation engine
βββ Score Engine βββββββββΆ Proportional reward distribution
βββ Bittensor Chain ββββββΆ On-chain weight updates
```
---
## π° Economics
| Role | Emission Share | Incentive |
|------|----------------|-----------|
| Miners | 41% | Generate better tests β earn more |
| Validators | 41% | Run honest verification β earn stake |
| Subnet Owner | 18% | Grow the network β grow value |
---
## π Go-To-Market
| Phase | Timeline | Target | Goal |
|-------|----------|--------|------|
| 1 | Months 1-6 | Bittensor devs | 10 miners, 3 validators |
| 2 | Months 6-12 | Open source repos | GitHub Action, 100 repos |
| 3 | Year 2 | Enterprise | Self-hosted, $100k contracts |
---
## π Competitive Advantage
| vs Copilot/ChatGPT | vs Other Subnets |
|--------------------|------------------|
| β Verified quality | β Binary scoring (not subjective) |
| β Mutation-tested | β Focused on ONE task |
| β Decentralized | β Real benchmarks |
| β Continuously improving | β Ungameable mechanism |
---
## π¦ Deliverables
| Artifact | Status | Link |
|----------|--------|------|
| GitHub Repo | β Live | [Test-Forge](https://github.com/manjeetsharma0796/Test-Forge) |
| Core Engine | β Complete | testforge β 8 modules |
| Validation Pipeline | β Complete | 3-gate system |
| Mutation Engine | β Complete | 6 mutation operators |
| Tests | β
47 passing | /tests/ |
| Simulation | β
Working | python main.py simulate |
| Documentation | β
Complete | /docs/ β 5 guides |
| API Server | β
Ready | python main.py serve |
---
## β‘ Quick Start
```bash
git clone https://github.com/manjeetsharma0796/Test-Forge.git
cd Test-Forge
pip install -r requirements.txt
python -m pytest tests/ -v # 47 passed β
python main.py simulate # Watch miners compete
```
---
## π― The Ask
Select TestForge for Round 2.
We will deploy a fully functional subnet on Bittensor testnet demonstrating:
- Working miner competition
- Live 3-gate validation
- Real TAO emissions to the best test generator
---
> "The best test is one that catches bugs before users do. TestForge makes AI prove it."
---
GitHub: [github.com/manjeetsharma0796/Test-Forge](https://github.com/manjeetsharma0796/Test-Forge)
Progress During Hackathon
simulation build
ideation and top layer architecture ready
integration -- upcoming months
Fundraising Status
0