Skip to content

Commit a9f057e

Browse files
Merge pull request #1 from darkresearch/e/clean-benchmark
2 parents 3b3fc2b + 386e98c commit a9f057e

58 files changed

Lines changed: 7781 additions & 833 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ai-rules.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# AI Assistant Rules for Fireteam
2+
3+
This file contains rules for AI coding assistants (Cursor, Claude, Warp, GitHub Copilot, etc.)
4+
5+
## Python Version: 3.12+ ONLY
6+
7+
**CRITICAL**: This project requires Python 3.12 or higher.
8+
9+
- ✅ Use: `python3.12` or higher
10+
- ❌ Never use: Python 3.9, 3.10, or 3.11
11+
- Dependencies like `claude-agent-sdk>=0.1.4` require Python 3.10+, and we standardize on 3.12+
12+
13+
### Checking Python Version
14+
```bash
15+
python3.12 --version # Should show Python 3.12.x or higher
16+
```
17+
18+
## Dependency Management: Use `uv`
19+
20+
**CRITICAL**: Always use `uv` for Python package management.
21+
22+
- ✅ Use: `uv pip install`, `uv add`, `uv venv`
23+
- ❌ Never use: `pip install`, `pip3 install`, standard pip commands
24+
25+
### Why `uv`?
26+
- 10-100x faster than pip
27+
- Better dependency resolution
28+
- Drop-in replacement for pip
29+
- Production-ready and maintained by Astral (creators of Ruff)
30+
31+
### Common Commands
32+
```bash
33+
# Create virtual environment
34+
uv venv
35+
36+
# Activate virtual environment (macOS/Linux)
37+
source venv/bin/activate
38+
39+
# Install all dependencies
40+
uv pip install -r requirements.txt
41+
42+
# Install a single package
43+
uv pip install <package-name>
44+
45+
# Add a new dependency (updates requirements.txt)
46+
uv add <package-name>
47+
48+
# Sync to exact versions
49+
uv pip sync requirements.txt
50+
```
51+
52+
## Installing `uv`
53+
54+
If `uv` is not installed:
55+
```bash
56+
# macOS/Linux
57+
curl -LsSf https://astral.sh/uv/install.sh | sh
58+
59+
# Or with Homebrew
60+
brew install uv
61+
```
62+
63+
## Summary
64+
65+
1. **Python**: Always 3.12+
66+
2. **Packages**: Always use `uv`, never `pip`

.cursorrules

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Fireteam Development Rules
2+
3+
## Python Version
4+
- Always use Python 3.12 or higher
5+
- Never use Python 3.9, 3.10, or 3.11
6+
- When creating virtual environments, use: `python3.12 -m venv venv` or `uv venv`
7+
8+
## Dependency Management
9+
- Always use `uv` for Python dependency management
10+
- Never use `pip`, `pip3`, or `pip install` directly
11+
- Install dependencies with: `uv pip install <package>`
12+
- Sync dependencies with: `uv pip sync requirements.txt`
13+
- Add dependencies with: `uv add <package>`
14+
15+
## Example Commands
16+
```bash
17+
# Create virtual environment
18+
uv venv
19+
20+
# Install dependencies
21+
uv pip install -r requirements.txt
22+
23+
# Add a new dependency
24+
uv add <package-name>
25+
26+
# Sync dependencies
27+
uv pip sync requirements.txt
28+
```

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ SUDO_PASSWORD=claude
88
# Git configuration (optional overrides)
99
# GIT_USER_NAME=Your Name
1010
# GIT_USER_EMAIL=your.email@example.com
11+
12+
# Anthropic
13+
ANTHROPIC_API_KEY=""

.github/workflows/test.yml

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
push:
7+
branches: [ main ] # Only run on direct pushes to main
8+
9+
jobs:
10+
fast-tests:
11+
name: Fast Tests (Unit + Lightweight)
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python 3.12
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.12'
21+
22+
- name: Install uv
23+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
24+
25+
- name: Create virtual environment
26+
run: uv venv
27+
28+
- name: Install dependencies
29+
run: |
30+
source .venv/bin/activate
31+
uv pip install -r requirements.txt
32+
33+
- name: Run all fast tests
34+
run: |
35+
source .venv/bin/activate
36+
pytest tests/ -m "not slow and not e2e and not integration" -v --tb=short
37+
38+
e2e-tests:
39+
name: End-to-End Tests (API)
40+
runs-on: ubuntu-latest
41+
timeout-minutes: 20 # Fail fast if tests hang
42+
# Run on main branch and e/* branches for testing
43+
if: |
44+
github.ref == 'refs/heads/main' ||
45+
startsWith(github.ref, 'refs/heads/e/') ||
46+
startsWith(github.head_ref, 'e/')
47+
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- name: Set up Node.js
52+
uses: actions/setup-node@v4
53+
with:
54+
node-version: '20'
55+
56+
- name: Install Claude CLI
57+
run: |
58+
npm install -g @anthropic-ai/claude-code
59+
echo "Claude CLI installed at: $(which claude)"
60+
claude --version
61+
62+
- name: Set up Python 3.12
63+
uses: actions/setup-python@v5
64+
with:
65+
python-version: '3.12'
66+
67+
- name: Install uv
68+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
69+
70+
- name: Create virtual environment
71+
run: uv venv
72+
73+
- name: Install dependencies
74+
run: |
75+
source .venv/bin/activate
76+
uv pip install -r requirements.txt
77+
78+
- name: Run E2E tests
79+
timeout-minutes: 15 # Per-step timeout
80+
env:
81+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
82+
PYTHONUNBUFFERED: "1" # Force immediate output
83+
run: |
84+
source .venv/bin/activate
85+
echo "Starting e2e tests at $(date)"
86+
pytest tests/ -m "e2e" -v --tb=short -s --log-cli-level=INFO
87+
echo "E2E tests completed at $(date)"
88+
89+
- name: Upload logs on failure
90+
if: failure()
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: e2e-test-logs
94+
path: |
95+
/tmp/fireteam-test-*/
96+
tests/**/*.log
97+
retention-days: 7
98+
99+
integration-tests:
100+
name: Terminal-bench Integration
101+
runs-on: ubuntu-latest
102+
# Temporarily disabled - needs debugging
103+
if: false
104+
105+
steps:
106+
- uses: actions/checkout@v4
107+
108+
- name: Set up Python 3.12
109+
uses: actions/setup-python@v5
110+
with:
111+
python-version: '3.12'
112+
113+
- name: Set up Docker
114+
uses: docker/setup-buildx-action@v3
115+
116+
- name: Install uv
117+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
118+
119+
- name: Install terminal-bench
120+
run: uv tool install terminal-bench
121+
122+
- name: Create virtual environment
123+
run: uv venv
124+
125+
- name: Install dependencies
126+
run: |
127+
source .venv/bin/activate
128+
uv pip install -r requirements.txt
129+
130+
- name: Install Fireteam adapter
131+
run: |
132+
source .venv/bin/activate
133+
cd benchmark
134+
uv pip install -e .
135+
136+
- name: Run terminal-bench integration test
137+
env:
138+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
139+
run: |
140+
source .venv/bin/activate
141+
pytest tests/ -m "integration" -v --tb=short
142+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ Thumbs.db
3434

3535
# Logs
3636
logs/
37+
38+
# Benchmark runs
39+
runs/

CLAUDE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Claude AI Assistant Rules for Fireteam
2+
3+
## Python Version Requirements
4+
- **REQUIRED**: Use Python 3.12 or higher for all operations
5+
- **NEVER** use Python 3.9, 3.10, or 3.11
6+
- When checking Python version, ensure it's 3.12+: `python3.12 --version`
7+
8+
## Dependency Management
9+
- **REQUIRED**: Use `uv` for all Python dependency management
10+
- **NEVER** use `pip`, `pip3`, or standard pip commands
11+
- `uv` is a fast, modern Python package installer and resolver
12+
13+
### Common Operations
14+
```bash
15+
# Install dependencies from requirements.txt
16+
uv pip install -r requirements.txt
17+
18+
# Install a single package
19+
uv pip install <package-name>
20+
21+
# Create virtual environment with uv
22+
uv venv
23+
24+
# Sync dependencies (install exact versions from lockfile)
25+
uv pip sync requirements.txt
26+
```
27+
28+
## Why These Rules?
29+
- Python 3.12+: Required by `claude-agent-sdk>=0.1.4` and provides better performance
30+
- `uv`: 10-100x faster than pip, better dependency resolution, production-ready

0 commit comments

Comments
 (0)