Test
927835cb0e
feat(T1.3): implement activity timeout tuning automation
- Add internal/tuning package with intelligent timeout analysis
- Implement TimeoutAnalyzer for tracking activity execution metrics
- Calculate percentile-based timeout recommendations (P95, P99)
- Generate confidence scores based on sample size and failure rate
- Implement TimeoutLessonsStore for persistent lesson tracking
- Store lessons in per-task JSONL files with effectiveness tracking
- Generate TimeoutTuningSignal objects for planner integration
- Generate human-readable lesson format for planner context
- Support three-tier priority signaling (high/medium/low)
- Analyze multiple activities concurrently
Analysis Features:
- Track duration, success/failure, timestamps for each execution
- Identify undertuned activities (P99 exceeds timeout)
- Detect overtuned activities (timeout > 2x P99)
- Calculate confidence scores (40% sample data + 60% reliability)
- Generate recommendations with reasoning
Lesson Management:
- Persist lessons per task in JSONL format
- Support lesson effectiveness tracking
- Format lessons for planner input
- Enable feedback loop for timeout optimization
Test Coverage:
- 14 analyzer tests (metrics, analysis, persistence)
- 22 lessons tests (storage, signals, formatting)
- 36 total tuning tests, all passing
- Edge cases: empty metrics, all failures, multiple activities
Key Design:
- P99 + 20% buffer for safe timeout values
- Weighted confidence scoring for reliable recommendations
- Separation: Analyzer (metrics), Lessons (storage), Signals (integration)
- Thread-safe analyzer with RWMutex
- No external dependencies added
Closes T1.3
2026-08-23 16:47:31 -07:00
..
2026-08-23 16:47:31 -07:00
2026-08-20 22:43:21 -07:00
2026-08-20 22:43:21 -07:00
2026-08-21 21:57:01 -07:00
2026-08-20 22:44:42 -07:00
2026-08-20 22:10:14 -07:00
2026-08-20 22:43:21 -07:00
2026-08-20 22:41:54 -07:00
2026-08-20 22:41:54 -07:00
2026-08-20 22:41:54 -07:00
2026-08-20 22:41:54 -07:00
2026-08-20 22:41:54 -07:00
2026-08-20 22:41:54 -07:00
2026-08-20 22:41:54 -07:00
2026-08-20 22:41:54 -07:00
2026-08-20 22:41:54 -07:00
2026-08-23 16:43:30 -07:00
2026-08-23 16:33:49 -07:00
2026-08-23 16:47:31 -07:00
2026-08-23 16:31:33 -07:00