Commit Graph

4 Commits

Author SHA1 Message Date
Lukas May
37a90db28c test(06-02): add comprehensive CoordinationManager tests
18 tests covering:
- Queue management (queueMerge, getQueueState)
- Dependency ordering (getNextMergeable with priority)
- Success path (processMerges with clean merges)
- Conflict handling (detect conflicts, create resolution task, send message)
- Error handling (missing repositories, missing agent)

Exports DefaultCoordinationManager from coordination module index.
2026-01-30 21:09:29 +01:00
Lukas May
4535707bc8 feat(06-02): enhance conflict bounce-back with agent messaging
Adds MessageRepository to DefaultCoordinationManager for conflict notification:
- Creates info message to agent when merge conflict occurs
- Message includes conflicting file list and resolution instructions
- System-generated messages use senderType='user' with null senderId
- Refactors conflict description into cleaner array.join format
2026-01-30 21:07:46 +01:00
Lukas May
6d7894bde4 feat(06-02): implement DefaultCoordinationManager adapter
Implements CoordinationManager interface with:
- In-memory merge queue with dependency tracking
- Dependency-ordered merging (getNextMergeable)
- Merge queue state tracking (queued, in_progress, merged, conflicted)
- Event emission for all merge lifecycle events
- Basic conflict handling (creates resolution task)
2026-01-30 21:06:54 +01:00
Lukas May
0570d21ad6 feat(06-01): add CoordinationManager port interface
- MergeQueueItem type for merge queue entries
- MergeStatus type: queued | in_progress | merged | conflict
- MergeResult type with task context
- CoordinationManager interface with methods:
  - queueMerge: queue completed task for merge
  - getNextMergeable: get next task with resolved dependencies
  - processMerges: process all ready merges
  - handleConflict: bounce-back for conflict resolution
  - getQueueState: query queue by status
2026-01-30 21:03:54 +01:00