Skip to content

feat: add filesystem watcher for event-driven model re-validation - #172

Open
miyunari wants to merge 1 commit into
mainfrom
feat/file-change-watcher
Open

feat: add filesystem watcher for event-driven model re-validation#172
miyunari wants to merge 1 commit into
mainfrom
feat/file-change-watcher

Conversation

@miyunari

@miyunari miyunari commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Add fsnotify-based file watcher to the validation agent that triggers model re-validation immediately when files on the PVC change (create/write/remove/rename), instead of waiting for the next polling interval
  • Add --watch flag to the validation-agent binary and watch field to the ContinuousValidation CRD spec
  • Recursive directory watching with 2-second debounce to coalesce rapid multi-file writes
  • The --interval polling ticker remains as a safety net for network filesystems (NFS, CIFS) where inotify cannot observe remote writes

Supported storage backends

  • Local/block-backed: NVMe, SSD, HDD, iSCSI, Ceph RBD, AWS EBS, GCE PD, Azure Disk, local PVs, emptyDir, hostPath

Not supported (use interval fallback)

  • Network filesystems: NFS, CIFS/SMB, GlusterFS, CephFS (FUSE-mounted)

Resolves: SECURESIGN-3615

Test plan

  • Unit tests for watcher: file write, create, remove, subdirectory creation, debounce coalescing, context cancellation (6 tests, all pass)
  • Existing webhook tests pass (19 tests)
  • Full build passes
  • CI checks pass
  • e2e validation with a PVC-backed model on a Kind cluster

🤖 Generated with Claude Code

Use fsnotify/inotify to watch the model path for file changes and trigger
re-validation immediately, instead of waiting for the next polling interval.
The interval-based ticker remains as a fallback for network filesystems
(NFS, CIFS) where inotify cannot observe remote writes.

Adds --watch flag to validation-agent, Watch field to ContinuousValidation
CRD, and watcher package with recursive directory watching and debounce.

Resolves: SECURESIGN-3615

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Nina Bongartz <pninak@web.de>
@miyunari
miyunari force-pushed the feat/file-change-watcher branch from 5833601 to 8681af7 Compare August 7, 2026 14:46
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