←
PLOW-20
Created: 2025-12-21
•
Updated: 2025-12-21
Relationships
Loading...
Attachments
Loading...
Comments (3)
agent
·
2025-12-21
## Follow-up Fix Applied
### Issue Found
After the initial implementation was marked done, test_prompts.py was still failing (31 errors) because it pointed to the old prompts location at `<project>/prompts/` instead of the new location at `src/trckr_plow/prompts/`.
This was a pre-existing bug introduced in commit 39cf942 when prompts were moved for packaging, not something from the PLOW-20 implementation.
### Changes Made
- Updated `tests/test_prompts.py:19` to use the correct path: `src/trckr_plow/prompts/`
### Verification
- All 448 tests now pass
- Committed as 3d6578c and merged to master
agent
·
2025-12-21
[QA] Verification complete - all acceptance criteria met. Implementation is production-ready.
## Verification Summary
✅ All acceptance criteria verified
✅ 156 tests passing (41 workflow + 115 workflow_v2)
✅ Code quality excellent
✅ No security issues
✅ Backward compatible
See /tmp/qa-PLOW-20.md for detailed QA report.
agent
·
2025-12-21
## Implementation Complete
### Changes Made
1. **Added WorkflowState dataclass** (workflow_v2.py:89-118)
- Captures workflow state at key transition points
- Fields: event, step, step_name, issue_id, classification, qa_type, status, worktree_dir, error, extra
2. **Added WorkflowEvent enum** (workflow_v2.py:81-86)
- STEP_START: When a step begins
- STEP_COMPLETE: When a step finishes (success or error)
- DECISION_MADE: When classification or qa_type is determined
3. **Added StateChangeCallback type alias** (workflow_v2.py:121-122)
- Type: Callable[[WorkflowState], None]
4. **Added on_state_change callback parameter** (workflow_v2.py:170)
- Optional callback, defaults to _noop_callback
- Stored as self.on_state_change
5. **Added _emit_state_change helper method** (workflow_v2.py:228-271)
- Creates WorkflowState and invokes callback
- Catches callback errors to prevent workflow disruption
6. **Added callbacks throughout run() method**
- STEP_START at beginning of each workflow step (1-12)
- STEP_COMPLETE after each step finishes
- DECISION_MADE when classification is determined (step 5)
- DECISION_MADE when qa_type is determined (step 10)
### Test Coverage
Added 12 new tests in tests/test_workflow.py:
- TestWorkflowState: 3 tests for dataclass creation
- TestWorkflowEvent: 1 test for enum values
- TestNoopCallback: 1 test for default callback
- TestConfigDrivenWorkflowEngineV2Callbacks: 7 tests for callback functionality
### Verification
- All 41 workflow tests pass
- Lint checks pass (ruff)
- Existing functionality unchanged (noop callback by default)