Repository navigation
Conversation
Activation confirmation waits for a file watcher to report removal of the canary. On Darwin, the immediate-removal test can time out after the canary has already been deleted because the watcher reports no event. Keep the watcher and also inspect the canary within the existing confirmation deadline. Only confirm when the canary entry is absent and its parent directory still exists. Inspection errors return an error, and a dangling symlink remains pending. The general wait and cancellation paths are unchanged. Add deterministic tests for removal without a notification, later removal, a persistent canary, inspection errors, a missing parent and a dangling symlink. The original missed-event and parent-removal failures are reproduced before the correction. The full patched package suites pass on Darwin and Linux with 17 library and 11 activation tests each.
The native canary-removal test can report TimesUp because it requires FSEvents to deliver a callback within one second. A failing diagnostic retained the original timeout and then received the matching removal callback after that deadline. The observed failure was late delivery, not evidence that confirmation handling lost the notification. Remove the polling fallback and restore upstream production behaviour. Have the native integration test await the watcher channel directly, without a wallclock deadline. The test still requires the actual confirmation event after immediately creating and removing the canary. If the watcher never delivers confirmation, the test remains pending until the test runner is stopped. Set a sixty-minute watchdog on the CI check job so CI stops a stalled build or test run. Test confirmation, cancellation, watcher errors, channel closure and timeout separately with a paused Tokio clock. The timeout test requires expiry at exactly the configured seven-second deadline. Enable Tokio's test-util feature only for development; the lockfile and production dependencies remain unchanged. The focused Darwin suite passes all ten activation tests. The retained red trace shows the original timeout followed by the matching native removal callback. Pinned Rust formatting also passes.
iainlane
marked this pull request as ready for review
October 6, 2026 22:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The native confirmation watcher test can fail on Darwin even though the watcher delivers the correct notification. The test creates and immediately removes the confirmation canary, then gives
danger_zoneone second to receiveWaitEvent::Confirmed. That deadline also requires the operating system to deliver the native callback within one second.The failure from upstream
cf64c8cis:In a failing diagnostic run,
FSEventStreamStartreturned success anddanger_zonereturnedErr(TimesUp)at the original one-second deadline. Keeping the watcher alive for three further seconds exposed the matchingRemove(File)callback. Notify accepted the canonical canary path. The original failure was retained: the diagnostic did not extend the deadline or turn the failed assertion into a pass.That trace demonstrates late delivery in this run. FSEvents notification latency is non-deterministic on a multitasking operating system. The production confirmation timeout defaults to 30 seconds; this investigation has not reproduced a failure at that default.
In the tests, separate the native notification test from the confirmation deadline. The previous wallclock deadline was prone to tripping on slow/loaded systems, making the test appear flaky. To help with this, the integration test now awaits the watcher channel directly and requires
WaitEvent::Confirmed, without such a deadline. Behaviour isn't changed - it still creates and removes the canary immediately, and the watcher still requires the matching removal event and path. However, since we're removing the wallclock deadline, we need another way to cap test runs. So in CI we're adding a sixty-minute watchdog to stop a stalled build or test run.Test the confirmation policy separately from native delivery latency. Five direct tests use a paused Tokio clock and cover confirmation, cancellation, watcher errors, channel closure and timeout. The timeout test requires expiry at exactly the configured seven-second deadline. Tokio's
test-utilfeature is a development dependency; the lockfile and production dependencies are unchanged.