Test
ab79cf33bc
feat(routing): implement ActivityKnowledgeBase with loader
Task 1.2 & 1.3 COMPLETE ✅
Core knowledge base infrastructure:
- activity_knowledge_base.json: Catalog of 8 activities with metadata
- CloneRepoActivity: Clone Git repo (stable, 1 retry)
- AnalyzeCodeActivity: AST analysis (flaky, 3 retries)
- SecurityScanActivity: SAST scanning (2 retries)
- GenerateReportActivity: Report generation (1 retry)
- DeploymentPreCheckActivity: Pre-deployment validation (flaky, 2 retries)
- NotifyStatusActivity: Slack/email notifications (flaky, 3 retries)
- ApproveWorkflowActivity: Human approval (120m timeout)
- ArchiveResultsActivity: Cloud storage archival (flaky, 2 retries)
- knowledge_base.go: KnowledgeBase loader with methods:
- LoadKnowledgeBase(path) - Load from JSON file
- LoadKnowledgeBaseFromDefaultPath() - Auto-discover file
- GetActivity(name) - Lookup single activity
- GetActivityNames() - List all activity names
- HasActivity(name) - Check existence
- GetTimeoutForActivity(name) - Get timeout from KB
- GetRetryPolicyForActivity(name) - Get retry config
- IsFlaky(name) - Check if flaky
- GetDependencies(name) - Get activity dependencies
- ListActivitiesByCategory(category) - Filter by category
- Validate() - Check for circular dependencies
- PrintSummary() - Human-readable summary
- knowledge_base_test.go: 14 unit tests
- Test loading, lookup, filtering, dependencies
- Test timeout/retry extraction
- Test validation logic
- All tests PASS ✅ (22/22 total)
Acceptance criteria met:
✅ Knowledge base loads successfully
✅ All 8 activities properly defined
✅ Flaky/stable flags correctly set
✅ Dependencies validate with no cycles
✅ Timeout/retry extraction works
✅ Unit tests pass (14/14 KB tests)
✅ Ready for validator (Task 1.4)
Effort: 5 hours (estimated 3+2)
Files: activity_knowledge_base.json (10.3KB)
knowledge_base.go (246 lines)
knowledge_base_test.go (324 lines)
2026-08-31 19:26:16 -07:00
..
2026-08-23 18:02:39 -07:00
2026-08-23 17:49:43 -07:00
2026-08-23 17:48:15 -07:00
2026-08-23 17:23:35 -07:00
2026-08-23 16:49:25 -07:00
2026-08-23 17:15:10 -07:00
2026-08-23 18:02:39 -07:00
2026-08-23 17:48:15 -07:00
2026-08-21 21:57:01 -07:00
2026-08-23 18:01:18 -07:00
2026-08-23 18:01:18 -07:00
2026-08-23 18:02:39 -07:00
2026-08-23 17:17:51 -07:00
2026-08-23 17:48:15 -07:00
2026-08-23 17:32:55 -07:00
2026-08-23 16:33:49 -07:00
2026-08-23 17:24:46 -07:00
2026-08-23 17:21:23 -07:00
2026-08-23 17:48:15 -07:00
2026-08-21 15:58:46 -07:00
2026-08-23 17:25:52 -07:00
2026-08-23 16:33:49 -07:00
2026-08-29 21:49:24 -07:00
2026-08-23 16:33:49 -07:00
2026-08-23 17:11:56 -07:00
2026-08-23 17:30:05 -07:00
2026-08-23 18:02:39 -07:00
2026-08-23 16:43:30 -07:00
2026-08-31 19:26:16 -07:00
2026-08-23 18:01:18 -07:00
2026-08-23 17:31:37 -07:00
2026-08-23 16:47:31 -07:00
2026-08-23 18:01:18 -07:00