26 lines
1020 B
Markdown
26 lines
1020 B
Markdown
|
|
# Task ID: 127
|
||
|
|
|
||
|
|
**Title:** EpicTask repository and service layers
|
||
|
|
|
||
|
|
**Status:** pending
|
||
|
|
|
||
|
|
**Dependencies:** 117, 123
|
||
|
|
|
||
|
|
**Priority:** medium
|
||
|
|
|
||
|
|
**Description:** Create EpicTaskRepository and EpicTaskService with edge graph management and cycle detection
|
||
|
|
|
||
|
|
**Details:**
|
||
|
|
|
||
|
|
Create src/mcpd/src/repositories/epic-task.repository.ts and src/mcpd/src/services/epic-task.service.ts:
|
||
|
|
1. Repository: CRUD for EpicTask, edge CRUD for EpicTaskEdge, findByEpicId
|
||
|
|
2. Service.addEdge(): before creating edge, walk toId's transitive dependencies (via dependsOn edges), reject if fromId is reachable (cycle detection)
|
||
|
|
3. Service.removeEdge(): simple delete
|
||
|
|
4. Service.getGraph(): return nodes with edges for visualization
|
||
|
|
5. Service.computeCompleteness(): calculate percentage of doneCriteria met per node
|
||
|
|
6. Follow existing repository/service patterns
|
||
|
|
|
||
|
|
**Test Strategy:**
|
||
|
|
|
||
|
|
Unit tests: test edge creation, test cycle detection rejects A→B→C→A, test completeness calculation with mixed met/unmet criteria, test transitive dependency walk.
|