The outer shell timeout must be larger than pytest's internal timeout (300s)
to allow pytest to handle its own timeout gracefully and perform cleanup.
Changes:
- Increased outer timeout from 180s to 360s (300s + 60s buffer)
- Made timeouts configurable via environment variables
- Added clear documentation about timeout hierarchy
- Display timeout configuration at runtime
Timeout hierarchy:
1. Individual test: 20s (markers)
2. Pytest session: 300s (pyproject.toml)
3. Outer shell: 360s (for cleanup)
4. GitHub Actions: 6 hours (default)
This prevents the outer timeout from killing pytest before it can finish
its own timeout handling, which was likely causing the hanging issues.