Skip to content

feat(plugin): add lazy mtime-based file watcher module (#826)#907

Merged
JeremyDev87 merged 1 commit intomasterfrom
taskmaestro/1774357975/pane-2
Mar 24, 2026
Merged

feat(plugin): add lazy mtime-based file watcher module (#826)#907
JeremyDev87 merged 1 commit intomasterfrom
taskmaestro/1774357975/pane-2

Conversation

@JeremyDev87
Copy link
Owner

Summary

  • Add FileWatcher class in hooks/lib/file_watcher.py for lazy mtime-based file change detection between hook invocations
  • Uses os.stat().st_mtime comparison with no external dependencies
  • Default watch patterns for packages/rules/.ai-rules/**/*.md and codingbuddy.config.json
  • Graceful handling of missing/deleted files (FileNotFoundError → detected as change)
  • Add hooks/lib/__init__.py shared library package

Test plan

  • test_snapshot_captures_mtimes — temp files created, mtimes recorded
  • test_detect_changes_finds_modified_files — modified file detected after snapshot
  • test_detect_changes_returns_empty_when_unchanged — no false positives
  • test_handles_nonexistent_files_gracefully — deleted file = change detected
  • test_default_patterns_include_ai_rules_and_config — default patterns verified
  • test_glob_expansion_for_patterns**/*.md expands to nested files correctly
  • All 6 tests pass, CI checks pass (lint, format, typecheck, coverage, circular, build)

Closes #826

Add FileWatcher class that detects rule/config changes between hook
invocations using os.stat().st_mtime comparison. Includes snapshot,
detect_changes, and glob pattern resolution with sensible defaults
for .ai-rules and codingbuddy.config.json.
@vercel
Copy link

vercel bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codingbuddy-landing Ready Ready Preview, Comment Mar 24, 2026 1:26pm

@JeremyDev87 JeremyDev87 self-assigned this Mar 24, 2026
@JeremyDev87 JeremyDev87 merged commit cd8da20 into master Mar 24, 2026
25 checks passed
@JeremyDev87 JeremyDev87 deleted the taskmaestro/1774357975/pane-2 branch March 24, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(plugin): file watcher for completion detection and auto-reload

1 participant