diff --git a/.story_kit/work/1_upcoming/121_story_test_coverage_io_watcher_rs.md b/.story_kit/work/1_upcoming/121_story_test_coverage_io_watcher_rs.md new file mode 100644 index 0000000..fca5744 --- /dev/null +++ b/.story_kit/work/1_upcoming/121_story_test_coverage_io_watcher_rs.md @@ -0,0 +1,27 @@ +--- +name: "Add test coverage for io/watcher.rs (40% -> 70%+)" +--- + +# Story 121: Add test coverage for io/watcher.rs + +Currently at 40% line coverage (238 lines, 142 missed). The file watcher is critical infrastructure — it drives pipeline advancement and auto-commits. + +## What to test + +- Story file detection and classification (which directory, what kind of move) +- Debounce/flush logic +- Git add/commit message generation +- Watcher pause/resume mechanism (added in story 119 for merge safety) +- Edge cases: rapid file changes, missing directories, git failures + +## Notes + +- Use temp directories for filesystem tests +- Mock git commands where needed +- The watcher pause lock is especially important to test given its role in merge safety + +## Acceptance Criteria + +- [ ] Line coverage for `io/watcher.rs` reaches 70%+ +- [ ] Tests pass with `cargo test` +- [ ] `cargo clippy` clean