From cb4e01ab096426226f610c398688b584381fa457 Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 23 Feb 2026 23:43:11 +0000 Subject: [PATCH] story-kit: create 121_story_test_coverage_io_watcher_rs --- .../121_story_test_coverage_io_watcher_rs.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .story_kit/work/1_upcoming/121_story_test_coverage_io_watcher_rs.md 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