Merge remote changes and add TTL/expiration tests (bd-d6aq)

- Resolved beads.jsonl merge conflict
- Created test_reservation_ttl.py with 4 integration tests
- Tests short TTL (30s), reservation blocking, auto-release, and renewal
- Mock server implements full TTL management with expiration tracking
- All tests passing in ~57s (includes 30s wait for expiration)
- Updated integration test README with new test documentation
This commit is contained in:
Steve Yegge
2025-11-08 02:24:39 -08:00
9 changed files with 1300 additions and 425 deletions

View File

@@ -32,6 +32,22 @@ Agent Mail server failure scenarios test that validates graceful degradation.
- 1s HTTP timeouts for quick failure detection
- Mock HTTP server avoids real network calls
### test_reservation_ttl.py
Reservation TTL and expiration test that validates time-based reservation behavior.
**What it tests:**
- Short TTL reservations (30s)
- Reservation blocking verification (agent2 cannot claim while agent1 holds reservation)
- Auto-release after expiration (expired reservations become available)
- Renewal/heartbeat mechanism (re-reserving extends expiration)
**Performance:**
- Uses `--no-daemon` flag for fast tests
- 30s TTL for expiration tests (includes wait time)
- Total test time: ~57s (includes 30s+ waiting for expiration)
- Mock HTTP server with full TTL management
## Prerequisites
- bd installed: `go install github.com/steveyegge/beads/cmd/bd@latest`
@@ -54,10 +70,16 @@ python3 tests/integration/test_agent_race.py
python3 tests/integration/test_mail_failures.py
```
**Run test_reservation_ttl.py:**
```bash
python3 tests/integration/test_reservation_ttl.py
```
**Run all integration tests:**
```bash
python3 tests/integration/test_agent_race.py
python3 tests/integration/test_mail_failures.py
python3 tests/integration/test_reservation_ttl.py
```
## Expected Results
@@ -71,6 +93,11 @@ python3 tests/integration/test_mail_failures.py
- Each test validates graceful degradation to Beads-only mode
- JSONL remains consistent across all failure scenarios
### test_reservation_ttl.py
- All 4 tests should pass in ~57 seconds
- Tests verify TTL-based reservation expiration and renewal
- Includes 30s+ wait time to validate actual expiration behavior
## Adding New Tests
Integration tests should: