compose/pkg
Nicolas De Loof 7ec29c82d4 fix(watch): interrupt stale rebuilds so watch converges
A rebuild whose build context was snapshotted before a newer change to
one of its own services is doomed: its output will be replaced by the
trailing rebuild anyway, and meanwhile a sync+restart change landing in
that window was silently lost — the sync went to the doomed container,
the restart was skipped, and the replacement image predated the edit.

The scheduler now gives each run its own cancellable context and
upholds one invariant: every request ends up covered by a rebuild whose
snapshot postdates it. A request naming an actively-rebuilt service
interrupts the run and folds its whole active set back into pending
(interruption kills the other services' rebuild too), so the trailing
rebuild redoes everything on a fresh snapshot. Requests for other
services keep coalescing without interrupting. handleWatchBatch drops a
restart only when the rebuild is pending (that one converges on its
own) and folds it into a Request when the rebuild is in flight —
recreate + start is the restart intent, converged. The run loop also
stops draining once the watch context is cancelled, which silences the
spurious "Build failed: context canceled" on Ctrl-C.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-09-14 10:47:07 +02:00
..
api PRIVATE_PORT optional for docker compose port 2026-09-11 11:35:18 +02:00
bridge fix(bridge): confirm before wiping non-empty convert output dir 2026-09-03 14:38:41 +02:00
compose fix(watch): interrupt stale rebuilds so watch converges 2026-09-14 10:47:07 +02:00
dryrun golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
e2e PRIVATE_PORT optional for docker compose port 2026-09-11 11:35:18 +02:00
mocks PRIVATE_PORT optional for docker compose port 2026-09-11 11:35:18 +02:00
remote golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
utils fix: make e2e tests pass reliably locally with Docker Desktop 2026-05-18 10:55:41 +02:00
watch golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00