Skip to content

fix(watch): coalesce rebuilds triggered during a burst of file changes - #14202

Open
glours wants to merge 1 commit into
docker:mainfrom
glours:watch-rebuild-coalescing
Open

fix(watch): coalesce rebuilds triggered during a burst of file changes#14202
glours wants to merge 1 commit into
docker:mainfrom
glours:watch-rebuild-coalescing

Conversation

@glours

@glours glours commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

What I did
compose watch triggered one rebuild per debounced batch, so a burst of edits arriving faster than the debounce window (e.g. from a coding agent editing several files) queued up several rebuilds in a row instead of a single consolidated one.

Rebuilds now run asynchronously through a small scheduler that coalesces requests received while a rebuild is in flight into one trailing rebuild, without adding latency to an isolated edit. This also closes a race where a plain restart could run concurrently with an asynchronous rebuild of the same service.

Related issue
N/A

(not mandatory) A picture of a cute animal, if possible in relation to what you did
image

@glours
glours requested review from a team as code owners September 9, 2026 07:35
@glours
glours requested a review from ndeloof September 9, 2026 07:35
compose watch triggered one rebuild per debounced batch, so a burst of
edits arriving faster than the debounce window (e.g. from a coding
agent editing several files) queued up several rebuilds in a row
instead of a single consolidated one.

Rebuilds now run asynchronously through a small scheduler that
coalesces requests received while a rebuild is in flight into one
trailing rebuild, without adding latency to an isolated edit. This
also closes a race where a plain restart could run concurrently with
an asynchronous rebuild of the same service.

Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
@glours
glours force-pushed the watch-rebuild-coalescing branch from a840592 to 3e3f0eb Compare September 9, 2026 10:51
@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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