Skip to content

Coalesce reload cleanup workers by retained watch ownership - #200

Merged
PLN merged 3 commits into
mainfrom
fix/reload-watch-cleanup-admission
Sep 13, 2026
Merged

PLN merged 3 commits into
mainfrom
fix/reload-watch-cleanup-admission

Conversation

@PLN

@PLN PLN commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Reloads could create another cleanup waiter for the same stale watch while its native close remained blocked. Reconciliation now admits each retained watch group once, coalesces repeated reloads and releases only worker admission after a completed wait. Failed native cleanup remains owned and a later reload can retry. Reloads with no new cleanup work start no worker.

The public Start/Reload regression counts this worker class through 32 reloads, verifies independent work and one native close, then checks retained failure and successful retry. It reproduces two waiters for one watch on the preceding implementation. A timer fixture also joins callback completion before comparing cached next-deadline observations.

Validation: twenty focused watch race repetitions passed. The full uncached suite passed every package except the timer fixture's observation race; after its correction, 100 repetitions and the complete timer suite passed. Vet, Windows/Linux staticcheck and documentation checks passed. Three combined watch/timer/idle/capture repetitions passed after integration. Final source 452afd26427e0dd9a22b658aabe86c87ffb96de7 passed CI 34765143769. Eight delayed-adapter/ownership cases passed ten repetitions each under SYSTEM and a headless standard user (2.100/0.827 seconds), without skips and with full process/profile cleanup. R2 acceptance remains open.

@PLN
PLN merged commit 936957a into main Sep 13, 2026
3 checks passed
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