Skip to content

Fix fs/watch debounce batching#24716

Merged
etraut-openai merged 1 commit into
mainfrom
etraut/fix-fs-watch-debounce
May 29, 2026
Merged

Fix fs/watch debounce batching#24716
etraut-openai merged 1 commit into
mainfrom
etraut/fix-fs-watch-debounce

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

Summary

fs/watch was using a local debounce wrapper whose deadline was initialized once and then reused after the first batch. Once that stale deadline was in the past, later file changes could bypass the intended 200ms debounce and send noisier fs/changed notifications.

This moves the debounce wrapper into codex-file-watcher as DebouncedWatchReceiver, resets the debounce deadline for each event batch, preserves pending paths across cancelled receives, and updates app-server fs/watch to use the shared wrapper.

Fixes #24692.

@etraut-openai etraut-openai changed the title [codex] Fix fs/watch debounce batching Fix fs/watch debounce batching May 27, 2026
@etraut-openai etraut-openai marked this pull request as ready for review May 27, 2026 06:20
@etraut-openai etraut-openai force-pushed the etraut/fix-fs-watch-debounce branch from 1753ffc to b42029a Compare May 27, 2026 06:21
@etraut-openai etraut-openai requested a review from euroelessar May 27, 2026 06:46
@etraut-openai etraut-openai merged commit 522f549 into main May 29, 2026
31 checks passed
@etraut-openai etraut-openai deleted the etraut/fix-fs-watch-debounce branch May 29, 2026 06:09
@github-actions github-actions Bot locked and limited conversation to collaborators May 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fs/watch debounce only applies to the first event batch

2 participants