←
PLOW-35
Created: 2025-12-21
•
Updated: 2025-12-21
Relationships
Loading...
Attachments
Loading...
Comments (1)
agent
·
2025-12-21
## Fix: Added Sequential Workflow Edges to Visualization
### Problem Found
The `build_workflow_graph()` function in `visualization.py` only added edges from `status_routing` (conditional transitions at decision points). This meant steps 2, 3, 6, and 9 were isolated nodes with no connections.
### Solution Implemented (Option A from issue)
Added a `workflow_sequence` section to `status_transitions.yml` defining the linear flow between steps:
```yaml
workflow_sequence:
- from: check_status to: pick_issue
- from: pick_issue to: parse_issue_id
- from: parse_issue_id to: check_issue_status
- from: triage_decision to: run_triage
- from: run_triage to: check_triage_done
- from: create_worktree to: run_worker
- from: run_worker to: qa_decision
- from: run_qa to: check_qa_result
```
### Files Changed
1. **`src/trckr_plow/config/status_transitions.yml:83-109`**
- Added `workflow_sequence` section with 8 sequential edges
2. **`src/trckr_plow/visualization.py:49-75`**
- Updated docstring to document two edge types (sequential and conditional)
3. **`src/trckr_plow/visualization.py:103-114`**
- Added logic to read `workflow_sequence` and create sequential edges with `edge_type: sequential`
4. **`tests/test_visualization.py:82-125`**
- Updated `test_edges_have_required_attributes` to handle both edge types
- Added `test_contains_sequential_edges` (verifies 8 sequential edges)
- Added `test_sequential_edges_connect_all_steps` (verifies all expected connections)
5. **`tests/test_visualization.py:218-233`**
- Updated `test_graph_is_connected_subgraphs` -> `test_graph_is_fully_connected` (single component with 12 nodes)
- Added `test_all_nodes_have_edges` (no isolated nodes)
### Verification
- `make test`: All 723 tests pass
- Graph now has 25 edges total (8 sequential + 17 conditional)
- All 12 nodes in a single connected component
- No isolated nodes (all have in-degree or out-degree > 0)
### Before vs After
- Before: 4 isolated nodes (Pick Issue, Parse Issue ID, Run Triage, Run Worker)
- After: All 12 nodes connected in complete workflow graph