Skip to content

feat: harden YamlConfigWatcher for production use#2

Merged
devspexx merged 1 commit intomasterfrom
feat/watcher-hardening
Apr 4, 2026
Merged

feat: harden YamlConfigWatcher for production use#2
devspexx merged 1 commit intomasterfrom
feat/watcher-hardening

Conversation

@devspexx
Copy link
Copy Markdown
Owner

@devspexx devspexx commented Apr 4, 2026

Summary

Improves the robustness, safety, and performance of the YamlConfigWatcher to make it production-ready.

Changes

  • Added retry mechanism for file reads to avoid partial/locked file issues
  • Introduced event throttling to prevent excessive reload triggers
  • Improved debounce handling for rapid filesystem events
  • Added diff size limit to prevent excessive memory usage
  • Hardened watcher thread lifecycle and exception handling
  • Improved logging for failure scenarios and edge cases
  • Ensured safe execution when plugin is disabled

Technical Notes

  • Maintains O(n) diff complexity with optimized line parsing
  • Avoids regex-based splitting for better performance
  • Uses defensive guards against transient filesystem states (delete/recreate)

Result

More stable, predictable, and safe configuration reload behavior under real-world conditions.

@devspexx devspexx merged commit cd993e2 into master Apr 4, 2026
@devspexx devspexx deleted the feat/watcher-hardening branch April 4, 2026 19:16
@devspexx devspexx changed the title Harden YamlConfigWatcher for production use feat: harden YamlConfigWatcher for production use Apr 5, 2026
@devspexx devspexx added the Enhancement An improvement to existing functionality without changing its core behavior. label Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement An improvement to existing functionality without changing its core behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant