Skip to content

Fix watcher cleanup, empty-reload guard, and stale README#43

Merged
jpr5 merged 1 commit intomainfrom
fix/watcher-cleanup-and-readme
Mar 19, 2026
Merged

Fix watcher cleanup, empty-reload guard, and stale README#43
jpr5 merged 1 commit intomainfrom
fix/watcher-cleanup-and-readme

Conversation

@jpr5
Copy link
Contributor

@jpr5 jpr5 commented Mar 19, 2026

Summary

Post-merge follow-up to PR #40. Addresses 3 findings from code review:

  • Watcher error handler now clears debounce timer and closes FSWatcher to avoid indeterminate state after fs.watch errors
  • Reload guards against replacing fixtures with empty array on parse failure, preserving previous working fixtures
  • Update README Future Direction to reflect that --validate-on-load and validateFixtures() now exist

Test plan

  • All 565 existing tests pass
  • Manually verify watcher error recovery (kill the watched file's filesystem)
  • Verify reload with invalid JSON preserves previous fixtures

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 19, 2026

Open in StackBlitz

npm i https://pkg.pr.new/CopilotKit/llmock/@copilotkit/llmock@43

commit: b6d756f

@jpr5 jpr5 force-pushed the fix/watcher-cleanup-and-readme branch from 81cc100 to 92f8769 Compare March 19, 2026 21:08
@jpr5 jpr5 force-pushed the fix/watcher-cleanup-and-readme branch from 92f8769 to b6d756f Compare March 19, 2026 21:15
@jpr5 jpr5 merged commit 5e47385 into main Mar 19, 2026
9 checks passed
@jpr5 jpr5 deleted the fix/watcher-cleanup-and-readme branch March 19, 2026 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant